Sign in to follow this  

How do animations work?

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

I'm going to create my own animation system and I know how to interpolate between them etc but I don't know how they work in detail. How are they stored? 1 keyframe + the time until that keyframe is "reached"? If my animation consists of multiple keyframes, do I just calculate between the one I'm going to get to and the one before that? If you want to tell me I shouldn't do it or it's pointless or w/e (as I most often get) please don't bother replying. Thanks!

Share this post


Link to post
Share on other sites
yes as u asumed ur animation might consist of multiple keyframes and ul need to keep track of the amount of time that should pass between two adjacent keyframes.

for calculating all the inbetween frames u should use Slerp (spherical linear interpolation - just google it :P). slerp basicly takes 2 rotations and a value between 0 and 1. This value wil represent the "progress" between key frames where 0 would be "the previous keyframe" and 1 would be the "current".
so if the key frames are 2 seconds apart a value of 0.5 would mean youre exactly halfway (1s) between key frames. You will need to perfrom slerp on each angle in your models skeleton to get the final current frame.

Hope that helps :p

EDIT - there is of course simpler methods of interpolation than slerp but they wil not neccesarily yield smooth animations

[Edited by - EternityZA on June 22, 2009 6:46:49 AM]

Share this post


Link to post
Share on other sites

This topic is 3098 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this