-
-
Notifications
You must be signed in to change notification settings - Fork 36k
Description
Have been experimenting with bones + blender + three recently, and have run into some issues with the exporter.
Positions
All bones seem to be exported with world coordinates. However, the loader wants them to be relative their parents... Basic examples where the armature + first bones are in origo, and then just one child seem to work just fine, but with more complex skeletons it breaks.
I did a quick fix for this locally, basically changing code like a madman around
https://github.com/mrdoob/three.js/blob/r73/utils/exporters/blender/addons/io_three/exporter/api/mesh.py#L1077
I got it to work so that the coordinates were relative their parents, but that quickly got me to the second problem:
Rotations
All bones are exported with hard coded rotation (0,0,0,1)... This makes it a mess to rotate bones along their own axis, which is basically what you want to do.
Somehow the rotations and position of the bones need to be converted between global space and parent-relative space.
https://github.com/mrdoob/three.js/blob/r73/utils/exporters/blender/addons/io_three/exporter/api/mesh.py#L1086
I'm not sure how to provide better input on this matter, and I don't feel I know enough black magic to be able to solve it on my own.
Happy to provide blend-files if necessary!