Skip to content

Bug: glTF import fails to set mMethod in aiMesh #5303

Description

@stephengold

Describe the bug
After importing a glTF mesh with morphs, the mMethod field (in aiMesh) ought to be determined. However, it's typically aiMorphingMethod_UNKNOWN (0x0).

To Reproduce

  1. Download a glTF model file with morph animation. There are at least 3 in the Khronos sample models, so pick one:
  2. Import the glTF model to an aiScene.
  3. Iterate over the meshes in the aiScene; verify that all of them have mesh.mMethod == 0x0

Expected behavior
At least one of the meshes (specifically, all those with mNumAnimMeshes > 0) should have a determined morph method, either aiMorphingMethod_VERTEX_BLEND (0x1) or aiMorphingMethod_MORPH_NORMALIZED (0x2) or aiMorphingMethod_MORPH_RELATIVE (0x3).

If none of these methods accurately describes the morph method in the glTF spec, then another (non-zero) method should be defined in "mesh.h" .

Screenshots
not applicable

Platform (please complete the following information):

  • OS: Mint Linux
  • Browser: Firefox
  • Version: the 59b1234 commit of Assimp) (2023-09-14)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Blend shapesRelated to blend shapes/morph meshes (animation via changes to identical vertices via weights)BugGlobal flag to mark a deviation from expected behaviourglTF1.0Bugs related to the glTF1.0 format.glTF2.0Bugs related to the glTF2.0 format

    Type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions