Closed scurest closed 5 years ago
Will fix the exception.
Trying to read the spec to undertand how to manage this morph.
This is in glTF spec regarding meshes :
Implementation note: When positions are not specified, client implementations should skip primitive's rendering unless its positions are provided by other means (e.g., by extension). This applies to both indexed and non-indexed geometry.
This is in glTF spec regarding morph targets :
Implementation note: The number of morph targets is not limited in glTF. A conformant client implementation must support at least eight morphed attributes. This means that it has to support at least eight morph targets that contain a POSITION attribute, or four morph targets that contain a POSITION and a NORMAL attribute, or two morph targets that contain POSITION, NORMAL and TANGENT attributes. For assets that contain a higher number of morphed attributes, renderers may choose to either fully support them (for example, by performing the morph computations in software), or to only use the eight attributes of the morph targets with the highest weights.
(So this is not explicitly written that POSITION can be omitted in morph target too). So ... How to handle? Ignore this morph target? Create a morph target will same mesh as in primitive?
@donmccurdy any thoughts ?
It just means that the positions are not affected by the morph weights (the normals or tangents might be). I'd just skip creating the shape key since a shape key is basically a morph target for POSITIONs. And then you also need to skip creating actions that animate the weights of an instance of such a mesh.
Test File