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.
get relative Matrix from parent
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.
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.
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 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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement