2
$\begingroup$

I have a problem understanding the rotation of bones. While objects are rotated around their axis as expected bones seem to behave differently (Even when the objects are parented).

In the first picture you see the sample object once with bones and once with separate objects. You can also see that the rotation angles are different while the result is (more or less) the same. However for the first bone and the respective object the rotation angles are both 0.

This picture shows the rest pose.

For my export script I want the rotations of the bone to be like the object rotations. I use quaternions but for understanding the problem better I displayed euler angles in the pictures.

Thanks in advance!

$\endgroup$
1
$\begingroup$

There are a few issues here:

  1. The orientation of the bone at rest is not the same as the object. By default, the Y axis on each bone is along the main axis of the bone (i.e. the direction the bone is pointing). As blender uses Z-up as its standard coordinates, this most likely corresponds to the z axis on your object.
  2. Your object pivot point (the orangey dot when it is selected) does not match the pivot for the bone. This may, but not necessarily, cause differences in the rotations.
  3. Euler rotations are not path independent, and as a result there are multiple ways to end up in the same orientation. Euler rotations are essentially a number of ordered rotations required to reach a given orientation, but there may be multiple ways to reach the same orientation. In this case try copying the values from the object to the bone and see which results you get.
$\endgroup$
  • $\begingroup$ Sorry for the duplicate comment, I accidentally posted and could not edit anymore. @Sazerac Thanks for the quick answer. 2. Is the pivot point the same as the bone's head? In this case it is set correctly and the orange dot is something else. Maybe that's the origin of the armature. 3. When using quaternion's the issue stays the same. When I assign a Euler angle or quaternion of the object to the bone the result is different. $\endgroup$ – soerensen Feb 21 '17 at 0:24
  • $\begingroup$ @soerensen can you add a picture of the objects in their rest positions (clear all rotations) alongside the bones in their rest positions? That may shed some more light on this $\endgroup$ – Sazerac Feb 21 '17 at 1:20
  • $\begingroup$ Maybe i did not make myself clear enough. The left object use an armature, the right object is actually three separate objects. I attached a blend file where I used parenting so the location is the same as the bone head/tail's location. dropbox.com/s/5mgv2eexgcewajc/armature_test5.blend?dl=0 $\endgroup$ – soerensen Feb 21 '17 at 16:26
  • $\begingroup$ @soerensen I am aware of that. Ctrl-R will clear rotation on an object and pot it back in its original orientation. In this case the up axis for the object is Z, while the up axis for the bone is Y. $\endgroup$ – Sazerac Feb 21 '17 at 23:05
  • $\begingroup$ Thanks for the tip with the axis. Do you have any idea what the reason is why they changed the axis for bones? I also found out that you can display the axis for both objects and bones in the properties window under the display tab for the object/armature, which is very helpful. So I assume a rotation with -90 degrees around the X-Axis should give me the right rotation. But it somehow doesn't (sorry I could not post the result as it was too long): q=Quaternion(( math.sqrt(0.5), -math.sqrt(0.5),0,0)) #rotation with -90 deg around x axis q*Quaternion((0.653,-0.271,0.271,-0.653)) $\endgroup$ – soerensen Feb 22 '17 at 0:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.