glTF-Blender-IO
glTF-Blender-IO copied to clipboard
Exporting a scene with armature and parents, get weird result
Describe the bug When I have a structure of parented bones and export the scene, the result is unexpected i.e. meshes are flying all over the place. What is interesting is that if I export the file to obj and then using obj2gltf I create a gltf everything is fine.
To Reproduce Steps to reproduce the behavior:
- Open the attached file
- Export to gltf.
- Open the gltf file
.blend file/ .gltf 229.zip
Version
- OS: Ubuntu 19.04
- Blender Version 2.81
I thought that the transform of parented objects to bones was recently fixed. In my test example, at least, that works now, tested with b2.81 and the gltf master 1.1.16. (https://github.com/capnm/b8TransportRobot/tree/master/gltf)
Your blender project generates a lot of garbage and the animation transforms look also broken. I think it could help if you try to clean up your blender file and try to make a minimal test case.
Confirmed that the file provided is quite ... strange. Only 1 bone by armature, but lots of different armature objects ... A minimal blend will help for sure, as said by capnm
After recent refactoring, it looks really better. Seems there are still some missing animation, but all still part are OK, and animated parts (that are exported) are OK too. Probable root cause : Some bone constraints between 2 armatures. Constrained armature has no action/animation_data. Even with exported selection to bake animation of all selected objects, we currently don't bake bone animation
Hello, This is now fixed in current main branch, after animation refactor 64e3532f48ebdf878a1c9b81ade6d1a19c8ff890
Because some pieces are not animated directly, but using constraints, you can use "Bake all object animation" to solve the issue, and animate all object at export