Jump to content
  • Advertisement
Sign in to follow this  
texel3d

Get Relative transformation from absoulte transformation

This topic is 3568 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

Hi, i have the absolute transformation matrix of the joints of a skinned mesh. Is it possible to compute the relative transformation of each joint (relative to theit parent) ? is yes, how ? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Yes, that's possible. The following is assuming that you transform vertices from one space to another by using the order Matrix * Vector. (If you use the form Vector * Matrix, do the multiplications below in the opposite order)

Suppose you have the hierarchy O - B1 - B2, for 'Object space', 'Bone 1 space', 'Bone 2 space'. That is, B1 is the parent node of B2, and B2 is the leaf bone node. Also, you've got the following matrices:


wO: The matrix to transform from the object local space to world space.
wB1: matrix from B1 space to world space.
wB2: B2 space -> world space.


Now, to compute the relative matrices, you just do:

 
wO^-1 * wB1 = B1: The matrix from bone1 local space to the object local space.
wB1^-1 * wB2 = B2: The matrix from bone2 local space to the bone1 local space.


In general, if you've got a transformation matrix M from space A to space B, then M^-1 will be the transformation matrix from space B back to space A.
You can think of the example above like follows:

 
wB1^-1 * wB2 = B2->World followed by Inverse(B1->World)
= B2->World followed by World->B1
= B2->B1


And always remember your multiplication order based on your convention whether you go M*v or v*M.

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!