Jump to content
  • Advertisement

Archived

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

Fragmo

fun matrix math problem

This topic is 5428 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

alright, I''ve been struggling with this off and on for quite a while now. What I''m trying to do is change one of the base matrices on a keyframed skeleton without screwing up all my keyframes in the process. here are the equations I''ve broken it down to. keyOld, baseOld, parentOld, resultOld and baseNew are all known and I wish to solve for keyNew. keyOld * baseOld * parentOld = resultOld keyNew * baseNew * parentNew = resultNew I believe that the parent matrix is irrelevant here which would allow me to simplify to: keyOld * baseOld = resultOld keyNew * baseNew = resultNew I also know that if keyOld is identity then keyNew is also identity, BUT they are not always equal. Does this problem even have a solution? thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
Well just solve it like a standard equation.

keyOld * baseOld = resultOld
keyNew * baseNew = resultNew

You want resultOld = resultNew
therefore,

keyOld * baseOld = keyNew * baseNew

KeyOld is known, baseOld is known, and keyNew is known, so solve for baseNew

Inverse(keyNew) * keyOld * baseOld = Inverse(keyNew) * keyNew * baseNew

.. simply ...

Inverse(keyNew) * keyOld * baseOld = Identity * baseNew

.. simply ...

Inverse(keyNew) * keyOld * baseOld = baseNew

.. and re-write ...

ANSWER: baseNew = Inverse(keyNew) * keyOld * baseOld

As to whether you can ignore the parent or child matrixes... not sure, you didn''t ask that so I didnt think about it

Jeff

Share this post


Link to post
Share on other sites
Thanks for the reply, but resultOld != resultNew which is what really makes it difficult since no matter how you look at it there will be 2 unknowns (keyNew and resultNew). I know there exists a matrix m such that baseOld * m = baseNew but that doesn''t seem to help since its just a substitute for a variable that I already know. *sobs*

Share this post


Link to post
Share on other sites
Hmm then I guess I am not sure what you are trying to do. As the original problem is stated, I believe it is solveable, but I must say if resultOld != resultNew then I don''t see how the two equations are related at all. Good luck though

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!