get relative Matrix from parent

Started by
2 comments, last by lauris71 12 years, 7 months ago
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.

Juan Camilo Acosta Arango

Bogotá, Colombia

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.
Lauris Kaplinski

First technology demo of my game Shinya is out: http://lauris.kaplinski.com/shinya
Khayyam 3D - a freeware poser and scene builder application: http://khayyam.kaplinski.com/

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?

Juan Camilo Acosta Arango

Bogotá, Colombia


[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.
Lauris Kaplinski

First technology demo of my game Shinya is out: http://lauris.kaplinski.com/shinya
Khayyam 3D - a freeware poser and scene builder application: http://khayyam.kaplinski.com/

This topic is closed to new replies.

Advertisement