KhronosGroup / glTF-Blender-IO

Blender glTF 2.0 importer and exporter
https://docs.blender.org/manual/en/latest/addons/import_export/scene_gltf2.html
Apache License 2.0
1.48k stars 316 forks source link

Imported 3D model with amature (exported glTF), objects that has been parented into the amature to be misplaced (wrong position) #2330

Open DrageonDB opened 2 weeks ago

DrageonDB commented 2 weeks ago

Describe the bug I tried to import an exported glTF (character), resulting many objects that has been parented into the amature to be misplaced.

To Reproduce Steps to reproduce the behavior:

  1. Import this model (link below) into Blender
  2. Then compare this with glTF viewer
  3. Hide amature
  4. Look the character

Expected behavior It should be show like this: (glTF viewer) Screenshot 2024-08-29 101039

Screenshots This is an observed result: (Blender) Screenshot 2024-08-29 100908

.blend file/ .gltf (mandatory) https://www.mediafire.com/file/yhthl5wlyo4ovcv/Wendiir_Neorgreth_%2528Free_download_-_.blend_and_texture_files_included%2529.zip/file

Version

DrageonDB commented 2 weeks ago

Admin edit : I deleted the comment with a malicious file

I don't recommend to download this bug fix. This file may be malicious and could potentially harm your computer. This file is VERY questionable.

julienduroure commented 2 weeks ago

First analysis : Seems we have an issue with multiple armatures management at import. Meshes that are misplaced are all parented to a bone that are part of a rig itself parented to a bone of an another rig Main rig : Rig Additional rigs: Eyes, TongueBone

DrageonDB commented 2 weeks ago

And then not only sub-rigs that affected, but the objects that parented into this main amature are affected too. I saw tasset in this model got moved a little bit to back, spiked poleyn, and even greaves and vambraces.

julienduroure commented 2 weeks ago

Note the the rig (in the .blend) has some dependency cycles, so we can't guarantee that everything is exported correctly


Dependency cycle detected:
  OBRig/tailSpine/BONE_CONSTRAINTS() depends on
  OBRig/tailSpine.001/BONE_READY() via 'Damped Track'
  OBRig/tailSpine.001/BONE_POSE_PARENT() via 'Pose -> Ready'
  OBRig/tailSpine/BONE_READY() via 'Parent Bone -> Child Bone'
  OBRig/tailSpine/BONE_CONSTRAINTS() via 'Constraints -> Ready'

I still have to check how deep this deps cycle impact the export