Playing multiple animations at the same time

This topic is 1843 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

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.

Share on other sites

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

Share on other sites

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.

Edited by Burnt_Fyr

Share on other sites

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.

Share on other sites

What you are describing is called "Animation Masking".

Share on other sites

Any Animation Masking samples for D3D9 Animation?

Share on other sites

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

Try googling it.

Share on other sites

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.

Edited by unbird

1. 1
2. 2
Rutin
18
3. 3
4. 4
5. 5

• 14
• 12
• 9
• 12
• 37
• Forum Statistics

• Total Topics
631428
• Total Posts
3000027
×