#### Archived

This topic is now archived and is closed to further replies.

# Reversable equation?

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

## Recommended Posts

Are these equations reversable by just inversing the world matrix? It doesn''t work for me. Transform model-space vertex to world-space: Vertex = (world_bone_matrix1 * bone_weight1 * v) + (world_bone_matrix2 * bone_weight2 * v) + (world_bone_matrix3 * bone_weight3 * v) Transform world-space vertex to model-space: Vertex = (inverse_world_bone_matrix1 * bone_weight1 * v) + (inverse_world_bone_matrix2 * bone_weight2 * v) + (inverse_world_bone_matrix3 * bone_weight3 * v)

##### Share on other sites
v'' = (M1 w1 v) + (M2 w2 v) + (M3 w3 v)
= (M1 w1 + M2 w2 + M3 w3) v

v = (M1 w1 + M2 w2 + M3 w3)^-1 v''
= (M1^-1 1/w1 + M2^-1 1/w2 + M3^-1 1/w3) v''

Translation: divide by bone weights instead of multiplying.

##### Share on other sites
Multiplying a projected vertex with the inverse of the matrix it is projected with gives the old vertex.
EDIT: so your inverse matrix isn't correct

[edited by - Tree Penguin on June 2, 2004 1:41:44 PM]

##### Share on other sites
Except that''s not what it''s "projected" with (I assume you meant to say transformed, since there''s no projection going on).

There are two transformations in each bracketed term, which can be rewritten as v'' = M D v, where M is the bone matrix and D is identity times the bone weight. The inverse is (D M)^-1 = M^-1 D^-1, which is M^-1 / weight, resulting in v = M^-1 v'' / weight.

##### Share on other sites
Tried the division by weight, but it only make my model''s vertices explode. Will work on it some more.
thanks.

##### Share on other sites
It just struck me that (1/w1 + 1/w2 + 1/w3) won''t add up to 1,
as in the original equation (w1 + w2 + w3 = 1). Maybe this is why it is impossible to do?

1. 1
Rutin
41
2. 2
3. 3
4. 4
5. 5

• 18
• 20
• 14
• 14
• 9
• ### Forum Statistics

• Total Topics
633368
• Total Posts
3011536
• ### Who's Online (See full list)

There are no registered users currently online

×