This project is read-only.

Blending simultaneous animations

Aug 19, 2008 at 6:17 AM
Hi people,

I'm using XNAnimation in a game project at the moment and we need our characters to be able to play two animations at once. For example, we need animations for walking and attacking to be able to play simultaneously.

I'm currently using two AnimationController objects on the same skeleton. To apply both animations at once I'm getting both sets of SkinnedBoneTransforms and multiplying them together before passing them to the effect for rendering. This seems to be working fine - there's some dodginess with the animations when they're blended together in this manner, but I think that's because of the animations themselves rather than an algorithmic problem.

My question: is this the best way to achieve simultaneous animations?

If it is, I'll spend some time with our animator and we'll work out a system to make animations that'll cooperate nicely. If it's not, can someone suggest a better method?

Thanks for your time,
Aug 29, 2008 at 1:45 AM

XNAnimation currently does not support additive blending, that is used to blend two animations simultaneously. I believe you will not be able to implement that unless you modify the source code, because the matrices that you get in the animation controller are already in the absolute position and you don't know how the animation affected each bone (just its final position).

I plan to implement additive blending in the further but I'm really busy right now, so it might take more than a month before I could work on it... =(
Oct 27, 2008 at 11:06 AM
Are there still plans to implement additive animation blending?

Oct 28, 2008 at 1:25 PM
Edited Oct 28, 2008 at 1:28 PM
It seems bpevangelista hasn't updated the project in a while, I hope it doesn't go the same way as the XCLNA animation library. Your best bet for now is to use the multiple animation controller method described above.