# 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.

## 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 on other sites
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 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...

1. 1
2. 2
Rutin
21
3. 3
4. 4
5. 5

• 13
• 26
• 10
• 11
• 9
• ### Forum Statistics

• Total Topics
633736
• Total Posts
3013601
×