Hello Guest

Keyframed Skeletal Animation reset problem

  • 0 Replies
  • 4169 Views
Keyframed Skeletal Animation reset problem
« on: February 16, 2006, 20:14:50 »
Currently, I've implemented a keyframed skeletal animation system.  It works great, that is, until the animation ends, and I try to "reset" or reverse all the animations.  Then distortions start happening and it accumulates every time the reset happens.

Let me give you an example of how it works so maybe someone can pinpoint the problem:

Given:   Joint1(root) ->  Joint2 -> Joint3

Then, in a given animation I have commands - Translate or Rotate <joint> - and how long they should take (they interpolate).

So, if say ROTATE Joint1 90 degrees around Y over 3 seconds, it applies the rotation to Joint1, Joint2 and Joint3 by multiplying a "manipulation" (rotation in this case) matrix of each joint by the transformation.  If there's another command, say, TRANSLATE Joint 2 <10, 0, 0> over 2 seconds - it multiplies joint2 and joint3's "manipulation" matrix by this.

After all the commands have completed for this portion in time, I apply the commands starting at the root by multiplying the "manipulation" matrix with the current orientation matrix of the joint (as well as all attached vertices).

This works great as long as the animation keeps going forward, but once the animation is completed and I need to reset all the joints positions that happened in the animation and go back to frame 1 to loop again, distortions occur big time.  

Basically, for the "reset" I go through each command that ran in reverse order (although, exact ordering is difficult if not impossible as some commands overlap like:  Frame 1: Rotate over 3 frames, Frame 2: translate over 1 frame) and again, build the "manipulation" matrix for each joint, then apply them all.

I don't want to simply "reset" it to its default position after an animation - that would be easy - find the difference between the start orientation and end orientation and move/rotate it.  The reason why is I want to be able to start and run multiple animations concurrently...  Anyone have ideas of why my reset may not be working or have any suggestions to get more info?