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

Consider reporting max active morph targets

Open donmccurdy opened this issue 5 years ago • 3 comments

WebGL implementations are limited to 16 attributes, and may only allocate a subset of those to morph targets. Per the spec:

A conformant client implementation must support at least eight morphed attributes.

It would be helpful if the validator could report the maximum number of simultaneously active morph targets in a model, and report a warning if that is greater than 8. Not sure if that's a reasonable request, scanning through all possible combinations of time and animation states would clearly be difficult. Maybe just use the maximum number of active morph targets used in any single animation, and ignore implications of multiple animations being played simultaneously?

donmccurdy avatar Feb 04 '20 20:02 donmccurdy

Related: https://github.com/donmccurdy/three-gltf-viewer/issues/186.

donmccurdy avatar Feb 04 '20 20:02 donmccurdy

Verifying the number of simultaneously used morph targets per-animation is easy and will be implemented soon.

I don't think there's any reliable way to determine whether multiple animations are intended to be blended or scheduled.

lexaknyazev avatar Feb 04 '20 22:02 lexaknyazev

Per-animation analysis would be very helpful, thanks!

And agreed. I'm comfortable with leaving multiple combinations of animations out of scope.

donmccurdy avatar Feb 04 '20 23:02 donmccurdy