10/12/2014

blender + three.js + bones = animations

On the topic of animations using bones in blender and exporting them to three.js:

Remember this: Never set the exporter to any align (this took me 4 hours to figure out), always align "none".

Three.js Exporter Options


Because: It will mess with the rotation of your bones while being animated. (In blender everything looks fine, and in three.js everything is fully out of whack.)

From what I figure: The exporter moves the whole model (and also all bones) if the alignment is changed while exporting. (So far so good), but the pivot points of the bones are *not* moved with the rest. This way, if an animation rotates a bone it now rotates around some point, but definitely not the position it rotates around in blender.

I found some pointers to similar problems in this question on stackoverflow and while the answers were interesting and gave me pointers, seems nobody had the alignment problem I had.

The tips form stackoverflow are:

- Delete the armature Modifier before exporting

- Checked the Vertex Groups

- Keyframes for ALL bones at the start and end of the animation

and my tips:

- Don't export with any alignment active in the exporter options

- Select the first action under model and under armature in the scene graph, and have the armature selected when exporting (not doing this led to another export error, where the action names are correct, but the action itself is a copy of the one before it)

All in all the exporting seems to be a very delicate process.

Why I had set the alignment to center is another story - it's about how I export the dungeon-parts and will be covered in a later post.

(Three.js & blender exporter Version 68)

No comments:

Post a Comment