I am trying to save bone joints to a file, and am using this format. I was wondering if anyone could clear up a few questions I have

  1. why do I need to provide rotation data for the bone, if I already gave it the location?
  2. How do I calculate the rotation of each axis if I have the relative location from the parent joint?

** EDIT **

After doing some more digging, I think that it has something to do with quaternions, so, could someone point me to a good resource on using quaternions for bone joints?


I think I've solved it, but I don't understand how it works. I can't seem to find any google results explaining it. I'd appreciate if anyone could send resources explaining it to me.

  • 2
    \$\begingroup\$ A complete answer for this question means writing a chapter. Google these terms: skinning, md5 model, bones, skeleton, blending. You need to understand some concepts: hierarchical transformations, bone matrices, pose of an object, orientation quaternion, vertex blending/skinning. Try to understand what a hierarchical transform (parenting) system is first, then post your questions here. \$\endgroup\$
    – teodron
    Commented Sep 3, 2012 at 15:29
  • \$\begingroup\$ Can you point out the question please? \$\endgroup\$ Commented Nov 2, 2012 at 16:28
  • \$\begingroup\$ I guess now that I've done some more research, the question at the time I was posting would have best been "Where is there a good guide on how to use bone joints" \$\endgroup\$ Commented Nov 6, 2012 at 17:22

2 Answers 2

  1. In the end, bones are just simplified sets of data that generate standard transformation matrices.

    Bones have position and orientation in space, they can be scaled, they can be located anywhere and are not necessarily connected to one another. Yet, many approaches to skeletal animation skip some of those possibilities and work with simpler approach where bones could have as little as just rotation and length, or just position and rotation. Other data required to construct transformation matrix is calculated from that and assumptions (e.g. that bones always attach to parent bone, or that rotation is (0,0,0) by default).

  2. There are many ways and all of them will be valid. You can set (0,0,0) rotation, or you can set it to point or the next bone in hierarchy, or something else.

    From programmers point of view, Euler angles are simpler to code, but from animators point of view, Euler angles are harder to work with and require extra efforts to avoid Gimball locks.

  • \$\begingroup\$ @raser Hope that helps, after 3,5 years. ;-) How is your project? \$\endgroup\$
    – Kromster
    Commented Feb 16, 2016 at 12:17
  • 1
    \$\begingroup\$ It's good. I did manage to get something working, but put it on hold about 3 years ago :/ I should release a small demo on GitHub or something so other people can reference it :) \$\endgroup\$ Commented Feb 16, 2016 at 23:45

I'll tell you what I know about quaternions so far as I'm now attempting my own 3d animation. A quaternion is a combination of a Vector and a Scaler. A Vector are real number components that can represent direction distance or,velocity(i.e. (x,y,z)). A Scaler is a magnitude(distance/length) without an angle. with these you can calculate what you need to know about a particular bones capabilities like rotation and distance.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .