Jump to content
  • Advertisement
Sign in to follow this  

Creating local space bone transforms

This topic is 2898 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to create local-space bone transforms out of only world-space bone position. My method to do this starts with creating world-space quaternion rotations for each bone. I then create an inverse world transform matrix for each bone. Then I go down my skeleton concatenating each bone's parent-inverse-world matrix with its own world transform. I am getting super messed up bones of course :D (or else I wouldn't be asking for help). I'm thinking that my world rotation calculations are very messed up. The way I'm calculating them is that I'm getting a vector from parent bone to current bone, and then crossing and dotting it with the x-axis to create a quaternion from the rotation axis and angle between. I'm just really confused D:

The reason I'm having to do this is because I'm running the CCD IK algorithm on my skeleton, and only using bone positions. Since I store my rotations as quaternions, I don't know how to update the rotations along with the new points. Perhaps convert quaternion to matrix, apply my IK rotation matrix to it, then pull quaternion back out?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!