# 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.

## 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 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.

##### 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 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.

1. 1
2. 2
Rutin
20
3. 3
khawk
16
4. 4
A4L
14
5. 5

• 11
• 16
• 26
• 10
• 11
• ### Forum Statistics

• Total Topics
633756
• Total Posts
3013707
×