Jump to content
  • Advertisement
Sign in to follow this  
ThinkTwicz

OpenGL Playing animations in reverse

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

Hello everybody, Okay so here is the low down, I am currently using Jason Jurecka animation system and I am trying to get the animations to play in reverse. My engine teacher told us that we just had to pass in negative time and bam it played in reverse well that is just for that openGL system we where using. Does anyone have any ideas about how to go about getting the animations to play in reverse using Direct X and .x files here is a link to the system being used http://www.gamedev.net/reference/articles/article2079.asp skin and bone animation using: C++ Thanks Drew Current Game Project: Climb for Freedom

Share this post


Link to post
Share on other sites
Advertisement
getting it to play in reverses has nothing to do with your file format... it all depends on how your system is coded. It should be fairly easy for you to look at the animation code and pick out what variable is controlling the frame transition for the animation. Once you find that you can easily determine what you must pass to have it transverse the frames in reverse

Share this post


Link to post
Share on other sites
If you think about how animations are played, there is a starting configuration and an ending configuration and some variable representing time that interpolates between the two configurations. This is true no matter what kind of animation you are doing: morphing, edit transitions, skinning, etc.

Generally at time t=0 the animation is at the starting configuration and at time t=1 the animation is at the ending configuration. You can subdivide any larger animation into a sequence of simpler animations where each is controlled by t in [0,1].

To play the animation backwards, just use a function f(t) instead of t:

f(t) = 1 - t

Now when t=0, f(t)=1 and when t=1, f(t)=0. By driving the animation with f(t) instead of t, you are playing the animation backwards.

Generally animation code doesn't care whether you go forwards, backwards or even random access in the animation.

For physics simulations, however, its a different story...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!