Playing multiple animations at the same time

Started by
6 comments, last by unbird 10 years, 10 months ago
I thought about playing multiple animation at the same time for a character.
For example:
Sometimes I would have the character walking, while holding a machine gun, some other times the character could be walking while holding a pistol or even a knife.
So basically, I want to play the walk animation to handle the feet movement, at the same time I could play animation for holding a machine gun or a pistol (combined together).
My idea is that I could combine 2 animations together to get what I want:
Feet animation (walking or running) (Will never affect the arms)
Arms animation (holding a machine gun/pistol/knife/sniper) (Will never affect the feet)

character->walk();              // Play walking animation
character->holdGun(GUN_AK47);   // Play arms animation for holding weapon while still playing walking animation
I'm using D3D9 Animation and 3Ds Max.
Advertisement

I can't find a question anywhere. What is the problem? If you want general info, try googling "animation blending".

bone = (animation1 + animation2) / 2.0

Just average the animations together.

EDIT: I see i fell into the same trap as guy with beard. Assuming both animations are based on the same skeleton, just remove the averaging. If an animation only affects the arms, and another only affects the legs, then simply adding them together should give you the result your looking for, assuming that the animation data is all delta rotation/location from a bind pose.

Not sure if you guys understood me, I mean I want to mix both animation to create ANOTHER animation from them.

Feet animation + Arms animation = Final animation

What I know is animation blending is used for smooth transition between animations.

What you are describing is called "Animation Masking".

Any Animation Masking samples for D3D9 Animation?

There is a Frank Luna's pdf book downloadable on this page with stuff that you need.

There is also source code that accompanies that book but i can't remember where did i get it from.

Try googling it.

Luna.

Though I don't think the D3DX animation controller supports this masking out of the box, only blending.

+1 for Steve for teaching me a new term.

This topic is closed to new replies.

Advertisement