Question

I'm trying skeletal animation in three.js, using a model which was exported from Blender as a JSON file.

I have tried following solution: https://stackoverflow.com/a/18770716/1512287

Then, loading model and playing animation worked fine. However, the angle of model's right arm is slightly incorrect.

Here is the live demo
https://dl.dropboxusercontent.com/u/1236764/temp/stackoverflow_20131023/index.html

and a capture of Blender.

As you can see, animations are not the same. right arm in three.js raises higher than blender one.

I'll also attach a Blender file. https://dl.dropboxusercontent.com/u/1236764/temp/stackoverflow_20131023/miku.blend

I was wondering if anyone could give me any information. Thanks,

Using three.js r62

Was it helpful?

Solution

They appear to be working from different starting positions, while moving the same amount. That is the angle from start to end would appear to be the same but blender moves from parallel to the ground down 45 degrees while three.js starts from straight up and moves down 45 degrees.

This also happens to be the difference between rest pose and pose 1. So blender is starting from rest pose then moves up 90 degrees to start at pose 1 then moves down 45 degrees.

three.js is instead starting at pose 1 and moving up 90 degrees to start the animation then moves down 45 degrees.

I'm not familiar with three.js but what if you set frame 1 to be the rest pose and have three.js animate from frame 2-41 or can you tell three.js to use a different pose to define rest.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top