Jump to content

Playing multiple Bone Animations together?


TheConceptBoy
 Share

Recommended Posts

Hey everyone. Got a question about playing back two bone animations on one mesh. I sort of asked this question on Discord yesterday and immediately I thought I figured it out and got it working. Problem is that I don't know how I got this working and now that I've updated the animation and re-imported it. It stopped working again.

Last time I got it working basically on a Fluke and I'd like to understand the proper way of getting multiple animations running without one overriding the other. 

 

Say I've got a Rig of a Raracter. A Zombie per-se. If I wanted the zombie Legs animation to be animated separately from the upper body, and have upper body animation to switch without affecting the leg animations, can this be done and how do you go about prepping the animation of the rig? Do the Two animations  need to be on two different rigs? Any sort of keyframe overlapping I should avoid?

As mentioned earlier. It seemed like I got it to do just that, I am currently testing on a gun model + hands model with the chamber cocking back using one bone rig the hand using another. The It stopped working after I continued experimenting with it and I have no idea what it is that I changed that stopped the blending working.

Link to comment
Share on other sites

Ok, just found the reason why it wasn't workign so I'm posting it here for discover ability.

 

The reason it worked first and did not work after is most likely because my naming changed in Blender and when I re-imported animations for the gun into Leadwerks, it couldn't find the right bone to play the animation for.

Now these two answers have helped:

 

So basically what I did is First Play the whole arm gun animation and then play the single bone animation. 

pistol_9mm->PlayAnimation("shot", 0.05, 0, 1);
pistol_9mm->PlayAnimation("shot_b", 0.01, 0, 1);

shot_b is the chamber of the gun moving and shot is the recoil animations for the whole wrist.

 

The chamber and the wrist are a part of two different rigs in Blender. One is parented so that when the wrist moves, the chamber moves with it, but that apparently doesn't mean that when you play the wrist animation, the chamber will play it's animation too. Only if both the gun AND the wrist are made from the ONE same rig with all bones connected to the same root, is when you'll get all bones playing the same animation all together.

 

image.thumb.png.fa17e5c71ce56c394fede564036954ed.png

 

Now from what I've interpolated based on the above mentioned threads, If you DO have a single rig for the entire mode, like a zombie that can play the run animation with the lower body and either a sprint or attack animation with it's upper body depending on the proximity to the player, then you will have to actually find the specific parent bone that starts the upper body and call it's animation like this.

 

wholeBody_Enemy->PlayAnimation("sprint", 0.05, 0, 1);
wholeBody_Enemy->FindChild("upperBody")->PlayAnimation("attack_swipe", 0.01, 0, 1);

 

So you want to find that first bone that starts the upper body set of bones and fire an attack animation only for it.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...