Skip to content

Morph target weights across multiple mesh primitives are under-specified #2612

Description

@aaronfranke

https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#morph-targets

The glTF 2.0 specification is currently lacking in detail with regards to morph target weights. It talks about multiple morph targets, multiple morphed attributes, but hardly mentions multiple primitives. They are mentioned here:

A morph target is a morphable Mesh where the primitives' attributes are obtained by adding the original attributes to a weighted sum of the target’s attributes.

For instance, the morph target vertices POSITION for the primitive at index i are computed in this way:

...but the prefix of "for instance" hints at an example, which is not clearly normative. Then, the only other mention in the functional text is in this sentence:

All primitives MUST have the same number of morph targets in the same order.

The spec should be updated to make the following clearer:

  • Does each morph target in a primitive always activate alongside the corresponding morph targets in the other primitives? (I think: yes)

  • Does each value in the weights array always activate all primitives together? Is it ever valid to separate them? (I think: yes and no)

  • The mesh schema describes weights with "The number of array elements MUST match the number of morph targets", but this should be clarified if it means overlapping or not. As written, one could make the mistake of thinking that 2 primitives with 2 morph targets each should have 4 entries in the weights array.

  • Should empty morph targets {} be used as placeholders in all mesh primitives to make sure the amount matches? Even for mesh primitives with no morph target data at all?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions