Jump to content
  • Advertisement
Sign in to follow this  
Deliverance

Skeletal Animation Blending & Transitioning

This topic is 3079 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've successufully implemented skeletal animation and now i'm thinking of combining different animations and about transitioning. Currently i am doing it like this: i have animations for different upper body part and for lower body part. Combining these two animations is easy because the transformations affect different joints. I'm using collada and as far collada is concerned the animation at the joint level works by REPLACING the initial transformations with the joint's current transformation (be it translationX, translationZ, rotationY, rotationZ etc). So for example i have for a given joint this initial transformation: Translation.X: 1 Translation.Y: 0 Translation.Z: -1 Rotation.X: 45 Rotation.Y: -5 Rotation.Z: 10 And the joint replaces the Translation.X and Rotation.Y as follows: Translation.X': 5 Rotation.Y': 10 From these transformations i construct the joint matrix, that is the matrix that takes me from joint space to model space. Now, if i have two animations for the above joint, what will happen is that another few transformations will be replaced just like Translation.X and Rotation.y were replaced. Because the animations affect different joints replacements won't target the same transformation(Translation.X get's replaced and the it get's replace again, this must not happen). Having a system that has only upper body - lower body animations seems like too little. I am aware that many games use a more complex animation blending system with (sometimes, rare?) dozens of animations currently being blended. My question is how does such an animation blending system work?

Share this post


Link to post
Share on other sites
Advertisement
Couldn't you take each transformation you want to blend, multiply them by some blending factor (So for a 50/50 blend multiply them both by 0.5) and then multiply these "scaled" transformations together to get the final joint transformation?

This is a complete guess by the way. I know very little on the subject.

Share this post


Link to post
Share on other sites
It is done by blending the animation data before calculating the transformation from it. The translation is easily interpolated - a linear lerp should do the trick. Same for scaling, albeit you might want to implement logarithmic scaling if you ever happen to use scaling at all. Rotation blending is a bit more difficult. Rotation keys in an animation are usually expressed as a quaternion. And for quaternions, there's a nice operation called spherical interpolation available which does a weighted blend between two quaternions. Google for it, there's a nice entry for it in the Matrix&Quaternion-FAQ, for example.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!