Sign in to follow this  

Creating local space bone transforms

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this