Jump to content
  • Advertisement

Archived

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

Taulin

Is Matrix Interpolation bad? (X-files, and other formats)

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

When doing skinned animations, you generally have several key rotations and translations. Depending on the time, you calculate intermediate values, thus producing the animations themselves. However, most X file formats only give animation keys in Matrix forms. The DX SDK handles these by not calculating (interpolating) positions between them. This in turn produces animations much like the MD2(Quake) format (with less memory usage of course). What does this mean? If you only had 3 positions over a course of one second, then your animation will be pretty rough. My question is, is there anything wrong with using matrices (which have a combined state of Scale, Rotation and Transformation) as key frames, and interpolating between them?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Interpolating the coefficients in a matrix is B.A.D.

Here''s a reference for figuring out how to break down a transformation matrix into PRS (position-rotation-scale) components which you can then perform a LERP on and piece it back together.

The Matrix and Quaternions FAQ
http://skal.planet-d.net/demo/matrixfaq.htm


P.S. Note that the FAQ is using RH coordinate system and DirectX by default uses a LH coordinate system. So transpose the matrices before applying the FAQ stuff.

P.P.S. If you''re using quaternions, remember to normalize them!

TLC

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!