glTF-Validator
glTF-Validator copied to clipboard
Skin vertex weight normalization
The spec says:
The joint weights for each vertex must be non-negative, and normalized to have a linear sum of 1.0. No joint may have more than one non-zero weight for a given vertex.
The validator seems to check if the weights sum to one in groups of 4
Is this the desired behavior?
E.g. all of my customer's models have 8 weights. If feels more logical to me that the sum of these 8 weights should be one?
I'm trying to fix Maya2glTF to get rid of the normalization errors like these:
Weights accessor elements (at indices 2744..2747) have non-normalized sum: 0.9999983310699463
The weights sum is accumulated across all weights sets (4, 8, 12, etc). The error message may be better, though.
Could you please provide an example asset?
Here is an example (and old, non-normalized version of CesiumMan) that passes validation but in fact has non-normalized weights: https://github.com/google/model-viewer/issues/2450#issuecomment-902428164
Both models from that archive have unorm8
skinning weights. The CesiumMan.quantize-hi.glb
shows 320 relevant validation errors.
yeah, the quantized one is being caught just fine. But the base one just has a single warning, yet is still invalid.
Hmm wait, unorm8
skinning weights; that sounds like they just need to be divided by 255, yes? Maybe that is our bug; thanks!