Jump to content
  • Advertisement
Sign in to follow this  
Medo Mex

Playing multiple animations at the same time

This topic is 2016 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 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 this post


Link to post
Share on other sites
Advertisement

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 this post


Link to post
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 this post


Link to post
Share on other sites

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.

Share this post


Link to post
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

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!