I'm using XNA, and I'm well versed with the skinnedModel sample. I'm starting to make my own models and animations. I'd like to be able to take animations that apply to different, independent body parts and combine them. For example:

Let's say I have some animations for my characters body:

  • running
  • walking
  • standing

I also have some animations for my characters face:

  • frowning
  • smiling

Ideally, I'd like my character to have any facial expression when doing any action. So, they could be:

  • walking while smiling.
  • walking while frowning.
  • running while smiling.
  • running while frowning
  • ... and so on ...

However, I'm not sure how I should best manage this. I know that I could make N*M different animations (where N is the number of body animations and M is the number of face animations) and import them all, but this seems like a lot of work as the number of animations starts to increase.

If anyone has a smart way to handle this, I'd love to hear it.

  • 3
    \$\begingroup\$ keep the face and body as separated sprites. \$\endgroup\$ May 23 '12 at 22:21

The technique you're looking for is called "animation blending."

At the simplest level, this means that you take the bone positions of all current animations and "average" them out.

The skinned mesh sample should be easy to modify to do this yourself.

There is a lot more math behind doing things "right" but that'll get you started and you should be able to google more information now that you have the right keywords to search on.


Well, if you want something X and Y which can be combined freely, then you composition. For that you need to make parts X and Y independent from each other. Thus, as @GustavoMaciel suggests you need to separate face and body parts.

However the challenge here lies in the ability to combine parts smothly. So it can be quite possible that drawing all possible combinations can produce better results.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.