Jump to content
  • Advertisement
Sign in to follow this  
ja0335

get relative Matrix from parent

This topic is 2637 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.

My question is that. If i have a chain of bones an each one have the world transformation matrix, how can i obtain the transformation matrix relative to its parent?

thanks.

Share this post


Link to post
Share on other sites
Advertisement
If we call the world transformation matrix of bone B2W, then

B2P = B2W[sup]-1[/sup][sub]parent[/sub] * B2W

I.e. wou have to calculate the inverse of bone parent's transformation and multiple this with bone transformation. You can think about it as two-step transformation - first from bone to world, and then from world to parent, that will be concatenated into single matrix by multiplication.

Share this post


Link to post
Share on other sites

If we call the world transformation matrix of bone B2W, then

B2P = B2W[sup]-1[/sup][sub]parent[/sub] * B2W

I.e. wou have to calculate the inverse of bone parent's transformation and multiple this with bone transformation. You can think about it as two-step transformation - first from bone to world, and then from world to parent, that will be concatenated into single matrix by multiplication.


Hi Lauris...

im sorry if i am abussive if ask for a favor. May you explain me why is necessary calculate the inverse of the parent?

Share this post


Link to post
Share on other sites

[quote name='Lauris Kaplinski' timestamp='1317243444' post='4866952']
If we call the world transformation matrix of bone B2W, then

B2P = B2W[sup]-1[/sup][sub]parent[/sub] * B2W

I.e. wou have to calculate the inverse of bone parent's transformation and multiple this with bone transformation. You can think about it as two-step transformation - first from bone to world, and then from world to parent, that will be concatenated into single matrix by multiplication.


Hi Lauris...

im sorry if i am abussive if ask for a favor. May you explain me why is necessary calculate the inverse of the parent?
[/quote]
Think of matrix as a transformation from one coordinate system to another one.

Thus B2W transforms points from the bone local coordinate system to the world coordinate system
B2P transform points from bone local coordinate system to the local coordinate system of its parent.
The inverse matrix makes inverse transform - eg. B2W[sup]-1[/sup] transforms points from the world coordinate system to bone local coordinate system

We can always replace direct transform with sequential transforms giving the same results. Thus we first transform points from bone local coordinate system to world coordinate system (B2W) and then from world coordinate system to the local coordinate system of bone's parent (B2W[sup]-1[/sup][sub]parent[/sub]). The result is B2P matrix.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!