Get Relative transformation from absoulte transformation

This topic is 3478 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

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 on other sites
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.

1. 1
2. 2
3. 3
Rutin
22
4. 4
JoeJ
17
5. 5

• 14
• 30
• 13
• 11
• 11
• Forum Statistics

• Total Topics
631774
• Total Posts
3002295
×