glTF-Validator icon indicating copy to clipboard operation
glTF-Validator copied to clipboard

Validator fails for COLOR_0 in MorphTargets

Open AleksandarCebov opened this issue 3 years ago • 5 comments

In gLTF Specification 2.0.1 it says "Client implementations MAY optionally support morphed TEXCOORD_n and/or COLOR_n attributes." but validator fails to validate these optional attributes.

AleksandarCebov avatar Feb 10 '22 21:02 AleksandarCebov

This is going to be addressed in the upcoming release.

lexaknyazev avatar Feb 10 '22 22:02 lexaknyazev

Also, I think the validator should detect that, if Color morph targets are used, the Element type should be restricted to floating point values.

The reason is because since morph targets store relative values, it would be possible to have negative values in the morph target, which cannot be encoded to unsigned integers.

vpenades avatar Feb 14 '22 22:02 vpenades

Out of curiosity, is there someone using morph colours as relative values though? Or even morph in colours?

I do use colours in morph, but similarly to how any 2d painting apps operate, as absolute replacement (along with an alpha value as layer opacity).

I know the spec says otherwise, but I doubt much thoughts have been given on this subject since vertex colours in morph is not widely used.

stephomi avatar Mar 23 '22 04:03 stephomi

The original issue has been fixed.

In a case when all morph target deltas are positive, an exporter should be allowed to use smaller components. Since the validator cannot know the original values, it wouldn't be able to detect an error there.

lexaknyazev avatar Apr 09 '22 12:04 lexaknyazev

Any hope to get it fixed?

stephomi avatar Nov 28 '23 12:11 stephomi