Skip to content

GLTFExporter not accounting for SkinnedMesh bindMatrix #20803

@zach-capalbo

Description

@zach-capalbo

Describe the bug

Using THREE.GLTFExporter to export a SkinnedMesh with a bindMatrix that is not the identity matrix results in the bindMatrix being lost. If the exported mesh is later imported,

To Reproduce

Steps to reproduce the behavior:

  1. Use FBXLoader to load the model from https://sketchfab.com/3d-models/mannequin-anatomy-aid-free-download-2f67c4384e7f4a5b86d84ae9199b7d3b
  2. See that mesh is properly aligned with skeleton (See Screenshot 1 below)
  3. Export mesh using THREE.GLTFExporter
  4. Import model exported in step 3
  5. See that mesh is improperly aligned with skeleton (See Screenshot 2 below)

Code

Fix proposed in: #20804

Live example

None at the moment. I can put one together if necessary.

Expected behavior

Skeleton should be properly aligned after being exported and re-imported.

Screenshots

  1. Mesh is properly aligned (on original import):

image

  1. Mesh is improperly aligned after importing exported GLB:

image

Platform:

  • Device: Any
  • OS: Any
  • Browser: Any
  • Three.js version: Noticed in 0.111.6/A-FRAME 1.0.4. Still appears to be present in dev

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions