Search Unity

Blending upper and lower body animations with animations from Mixamo properly?

Discussion in 'Animation' started by The702Guy1, Aug 8, 2022.

  1. The702Guy1

    The702Guy1

    Joined:
    Apr 24, 2022
    Posts:
    48
    So animation is definitely one of my weakest points for game development and I've just been using Mixamo animations while adding new features to my game. However I'm approaching the point where the wonky animations aren't cutting it anymore as I'm in the stage of cleaning my game up. I know that you can use different layers of the animations and assign avatar masks that move only certain bones if you assign the mask to the layer however the Mixamo hip bone is the root for the animations rotations and it causes weird deformations when you separate it into an Avatar mask. If I don't include the hip bone in the upper body mask then the upper body does not rotate at all and the upper body deforms because of that, if I include the hip bone in the upper body mask then it causes the legs to rotate with the upper body instead of staying on the ground.

    Here's what I've tried that hasn't been listed above, if you know something else that may work or see something in this list I could've approached wrong please let me know:

    - 2 layers of animations, one with the full body movements and one with the upper body movements set to additive when an upper body animation plays (e.g. walking while using a melee attack).

    - Changing the the full body layer to only lower body with an associated mask and doubling up animations on both layers, this caused the least deformation but it causes the animations to fight with each other and go out of sync.

    This has kind of put me at a stopping point in my game since basically all of the other features I want are there and now its time for clean up. Any help would be very greatly appreciated.
     
  2. The702Guy1

    The702Guy1

    Joined:
    Apr 24, 2022
    Posts:
    48
    Well sure enough after hours and hours of solution searching before making this post, I figured out my problem in less than 30 minutes after posting. If anyone is struggling with this here is what you can try that worked for me:

    1.) Make a base layer for animations that has no mask associated with it. In there place what ever animations you have that you want to affect the whole body. (e.g. run, walk, idle, etc.)

    2.) Make a 2nd layer and create an empty state with no animation as your entry state. This part was the main thing that was causing issues as instead of an empty state I had this set to an idle state.

    3.) Make an avatar mask that is has everything above the hips active but hips and below disabled and assign that avatar mask to your 2nd layer.

    4.) Add animations to your 2nd layer that you only want to have happen on the upper portion of your body while your lower body remains unaffected. (e.g. melee)

    5.) Make sure the blending in both layers is set to override.

    From there its just tweaking till it works right for you but that's what stopped the weird deformations for me. Step 2 and 3 are especially important. I hope this helps someone else.
     
    CodeSmile, Lifee00 and kvoepel3 like this.
  3. Snazsh

    Snazsh

    Joined:
    Feb 2, 2020
    Posts:
    1
    Hey I have the exact same issue and found your post here !

    I am trying to follow your step but my base layer is not playing animation, I have unselected everything in my character skeleton from the hips and down and assigned this to my 2nd layer (punch animation).

    I left the humanoid part all green above, did you leave it all green or you disabled legs and root as well there too ?
     
  4. Hotspot541

    Hotspot541

    Joined:
    Jun 3, 2019
    Posts:
    1
    This really helped. Anyone who can't see the animations not playing after making the new layer, make sure you have the weight up in the settings for the layer. This can be adjusted to your preference on how much you would like the combat animation to affect your movement/base layer animations.