Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a skeletal animation in Blender and play it in three.js

What is the correct process for creating model in Blender and playing it in three.js?

Talking about skeletal animation. What to export, and which functions to call in order to play the animation on three.js. Also how should a trivial JSON exported file look like in order to work in three.js.

How exactly should a pipeline look like for correct results?

like image 795
luke1985 Avatar asked Oct 04 '22 22:10

luke1985


1 Answers

When exporting your animated model, you need to have "Skinning", "Bones" and "Skeletal animation" options checked in the exporter. The resulting json file should contain, among other things, non-empty skinWeights, bones and animation properties, like in this file: http://mrdoob.github.com/three.js/examples/obj/buffalo/buffalo.js

For playing the animation with Three.js, start with this example: http://mrdoob.github.com/three.js/examples/webgl_animation_skinning.html (available in the three.js source package).

like image 64
Tapio Avatar answered Oct 13 '22 10:10

Tapio