• Advertisement

Archived

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

Key frame animation

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

Hi, I am trying to get key frame animation working but I don’t understand how to do the rotation interpolation. The rotation key frames are stored in an array of axis angles with the time. Each object also has a node that contains the local pos/rot and scale that are also used in the key frame calculation. All the data is loaded from an ASE file from 3DS MAX. Any help would be greatly appreciated.

Share this post


Link to post
Share on other sites
Advertisement
Convert the axis angle to a quaternion or a rotation matrix, and then interopolate them.

Share this post


Link to post
Share on other sites
I have tried converting the data to quaternion and using the following but it dose not work.

// quats
s = ControlRotTrack.Samples[index].Rotation;
e = ControlRotTrack.Samples[index+1].Rotation;

Slerp(&s,&e,Rot_t);
CreateMatrix(Rot.matrix);

I think I am meant to use the local rotation that is stored in the node but have no idea what to do?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Thanks for replying,
I have the rotation part working now.

Share this post


Link to post
Share on other sites

  • Advertisement