Jump to content
  • Advertisement


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


Matrix Interpolation for Animation?

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

Howdy, Would anyone know any good tutorials (or just a quick answer) about matrix interpolation? I am refering to creating a matrix based upon two key-frame matrices and a time. This will usually happen when you have two key frames for an animation, and only have a final concated matrix for each frame. The translation part is easy to pull out of the matrix, but everything else seems a little tricky. Any help or pointers to any info. would be great! Thanks!

Share this post

Link to post
Share on other sites
Using D3DX, matrix interpolation is actually quite fast and easy:

// TotalTime = length between 1st and 2nd matrices
// InterpolateTime = time from 0.0 to 1.0
D3DXMATRIX Matrix1, Matrix2;
float TotalTime, InterpolateTime;

Result = Matrix1 + ((Matrix2 - Matrix1) / TotalTime * (InterpolateTime * TotalTime));

Jim Adams

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!