# Get Relative transformation from absoulte transformation

This topic is 3568 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
Rutin
29
2. 2
3. 3
4. 4
5. 5

• 13
• 13
• 11
• 10
• 14
• ### Forum Statistics

• Total Topics
632961
• Total Posts
3009485
• ### Who's Online (See full list)

There are no registered users currently online

×