Jump to content
  • Advertisement

Archived

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

raydog

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.

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
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 this post


Link to post
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 this post


Link to post
Share on other sites
Guest Anonymous Poster
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 this post


Link to post
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 this post


Link to post
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?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!