Search Unity

My model's motion is noisy/busy compared to others

Discussion in 'Animation' started by dgoyette, Jan 23, 2020.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    I built and rigged a humanoid model in Blender. While it generally works, I notice that (compared to a Mixamo model) my model's movement is sloppy/noisy. When playing the exact same animation, my model's rig transforms move around more than the Mixamo model. Here are the examples. First, we have the Mixamo model. Notice how stable the foot is:

    YBot.gif

    Now, my model, performing the exact same animation:

    Robot.gif

    Notice how the feet are both drifting a lot more. In fact, it seems as if the entirely lower body were rotating around the hips.

    The animation being played doesn't include exact transforms. Instead, it uses different muscle settings:

    upload_2020-1-23_2-7-6.png

    I haven't done anything specific to these kinds of motions. Is this the reason why? Is this something I should be doing on Blender? I've tried tweaking the muscle settings in Unity to give each joint a reasonable range of motion, but doing so doesn't seem to correct things.

    I feel like there's a big piece of rigging I'm missing here. Could anyone suggest what that might be?
     
  2. mcmount

    mcmount

    Joined:
    Nov 15, 2015
    Posts:
    83
    Do you have Foot IK on in animator?
     
  3. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    I see Foot IK in the animator State:

    upload_2020-1-25_10-29-48.png

    I'm not using that on any of the animations. I tried enabling it just now, and it doesn't seem to change the behavior.
     
  4. StaticClass

    StaticClass

    Joined:
    Jan 31, 2014
    Posts:
    12
    Try changing Animation options, specifically Root Transform Position (XZ).

     
    Last edited: Jan 25, 2020
  5. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    I already had those options selected. I tried changing them just now, to see if they were affecting it, but changing those doesn't seem to make any different for this clip.

    Also, the animation looks fine when running on Mixamo's YBot model, as per the first image in my original post. It's only my own hand-rigged model that's showing problems. I assume it's something I've done wrong in rigging, but there's so much going on with Humanoid animations in Unity that I wouldn't know what specific things are wrong about my rigging that would cause this. I was hoping to have more than just a blind random guessing trying to tweak the model.
     
  6. StaticClass

    StaticClass

    Joined:
    Jan 31, 2014
    Posts:
    12
    What's the hierarchy of your rig? Do you have a root bone?
     
  7. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    Yes, here's the first few bones in my rig:

    upload_2020-1-25_21-5-22.png

    For reference, this is what the Mixamo model looks like:

    upload_2020-1-25_21-3-36.png

    My model has one extra transform in it, named "metarig", but it's not one of the bones. So, the "root" bone in my rig is "spine", which corresponds to "mixamorig:Hips" in the mixamo model.From that bone down, I believe the structure of the two rigs is the same.

    I've tried exporting from Blender without that "metarig" transform, but I've been unable to find a way to remove it. I'm not sure it matters, though, since it's not part of the rigging configuration.
     
  8. StaticClass

    StaticClass

    Joined:
    Jan 31, 2014
    Posts:
    12
    Can't see anything wrong with your setup.

    I had a problem few days ago with my walking animation where the leg would shake and glitch when lifted from ground. I fixed it by adding a default take or the first animation in my animation clips list is a T-Pose "animation" with only one frame.

    Does your rig have a proper T-Pose or did you enforce it via Enforce option?
    Also, did you check your model's weight paint in Blender? It might be that one of the bones is controlling too much (one of the spine bones)?

    Here is my rig, the orange bone on the ground is root and all the other bones are connected to it. This is quite useful if you are planning to use root motion.

     
  9. mcmount

    mcmount

    Joined:
    Nov 15, 2015
    Posts:
    83
    In animator, do you have the "Apply root motion" on? Also, make sure every animation state has that foot ik on.
     
  10. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    Thanks for the help on this, guys. It turns out that enabling Foot IK does resolve this for me, however, I was misled because it only works in Play mode, not when previewing in the editor. So I originally thought that Foot IK didn't make any difference, because it didn't change the behavior when I was previewing the animation on the Animation window:

    upload_2020-1-26_11-20-24.png

    If I preview the animation from there, the feet still slide around whether Foot IK is enabled or not. But when I actually run the game, the feet stay nicely where they should when Foot IK is on. So I think things look good now.

    So as far as why Foot IK works, I assume it's because the animator will ignore changes to the foot bone Position and Rotation values unless Foot IK is enabled? I see that this clip does contain position and rotation info for the feet:

    upload_2020-1-26_11-23-20.png

    So unless Foot IK is enabled, I guess those foot bone values are being ignored?

    I enabled Foot IK on the animation state in the animator itself. But it seems like the YBot model from Mixamo has Foot IK enabled at all times. I don't see a setting on the model for that though.

    Anyway, mystery mostly solved here. The animation clip is specifying foot position and rotation, and required Foot IK to be enabled to run properly, which I didn't have enabled. Foot IK doesn't work in the "Preview" of the clip, so that's why I didn't think it initially mattered. Thanks for the help.