Search Unity

Blender human meta-rig and Mecanim Mo-Cap error: Coppied Avatar Rig Configuration mis-match.

Discussion in 'Animation' started by CloudyVR, Apr 20, 2017.

  1. CloudyVR

    CloudyVR

    Joined:
    Mar 26, 2017
    Posts:
    715
    I have been watching countless tutorials about how to animate my Blender models in Unity and make them walk. I soon found I could download "Raw Mocap Data for Mechanim" and it works fine on the supplied model.

    However I have created my own model and rigged it using Rigify.

    I have added it to my Unity scene and saw that Mecanim detected all bones and the muscles look fine.

    However,

    When I goto a Mocap data animation file and attempt to preview the animation using my avatar I get an error in the inspector under the Animation tab that states:

    """Copied Avatar Rig Configuration mis-match. Transform hierarchy does not match: Transform 'hips' for human bone 'Hips' not found."""

    What is going on? I can't get the animation to apply no matter how much Googling I do.

    Please help as I'm totally lost and don't understand why Rigify would be incompatible with Mecanim's Mocap library even though Mecanim says my rig fits the requirements and all I see are green indicators.
     
  2. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Did you changed the avatar source in the rigs tabs for those mocap data file?

    Normally you should import an animation with the rig it was made of, the importer resample the whole FK animation and generate a humanoid clip which then can be retargeted on any character, then to preview this animation on your character you just need to select the animation to show the inspector animation previewer and then drag'n drop your model on the previewer.

    If you did follow all those steps but still have an issue then this is unexpected and probably a new bug. Please log the bug with the project and some repro step and we will investigate
     
  3. CloudyVR

    CloudyVR

    Joined:
    Mar 26, 2017
    Posts:
    715
    Thanks Mecanim-Dev! I started looking into the way the rig was constructed for the mocap default avatar and I tried changing the bone names of my rig from Blender to match what I saw in Unity.

    Based on the way they rigged the mocap rig in Unity I tried renaming my rig to that convention:


    The default rig from the mocap library asset looks like this:


    After importing my model to unity and inspecting its rig I see this:



    I then tried applying my avatar model as the source avatar for one of the mocap animations.



    And I now get a different error message (good sign?):

    """Copied Avatar Rig Configuration mis-match. Transform hierarchy does not match: Transform 'Reference' for human bone 'RightUpperLeg' not found."""



    What doesn't make sense is that in both my rig and the Unity rig both have bones named "RightUpLeg" but the error specifically states "RightUpperLeg"?

    And after looking at the two rigs I see that Unity's has many more bones (especially in the face). Could that be the root of my issue? Is there any way to delete curves from an animation asset so that it isn't looking for those bones?

    Also I tried importing the .fbx into Blender and going that route instead, but I had some issues where the rig would not import correctly and it's rest position looked totally bonkers. So I created this post on blenderartists.org for that issue.

    Thanks!
     
  4. CloudyVR

    CloudyVR

    Joined:
    Mar 26, 2017
    Posts:
    715
    Update.

    Obviously I don't understand the concept behind mocap. I just tried all the different rigs provided by MakeHuman and none of them worked, all they did was generate similar mis-match errors (even the mocap rag)!!! I cant seem to grasp the concept here, why would motion capture data be offered as an asset if it can only be used with their provided model? How am I ever going to apply this to my models??? The people who provide the mocap data never mentions anything about the specifications for the rig (naming convention, bone lengths, parents, iks constrains, number of bones, ect..).

    This makes me feel like I'll never have time to learn Unity because this issue alone has already costed me several days and I've made absolutely no progress (well at least not in Unity, but I've learned a ton about animating with Blender)...

    I really want to learn Unity though, PLEASE HELP!!!!
     
    Last edited: Apr 21, 2017
  5. CloudyVR

    CloudyVR

    Joined:
    Mar 26, 2017
    Posts:
    715
    Progress!

    Using the approach as mentioned before I have updated Unity to 5.6 and now I am able to apply animations to the rigs I export from blender! But I still get error messages and its not a smooth process.

    However my one issue now is that my model is floating and sinking below the ground even though I have Foot IK on. Is that normal or should I still be concerned about my Blender rigs?
     
  6. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    It not something about mocap, it about how the humanoid rig work.
    So maybe I wasn't clear enough, but you need to import your animation clip with the same character rig that is was created.
    So by example for the asset store mocap package, all the fbx files are already all setup for you with the correct rig, you just need to import them. Once the import process is finish you will have a bank of humanoid animation clip ready to be used (retargeted) on any humanoid rig including yours.
    mocapimport.png


    About your character floating above the ground this is usually caused by the Default T-pose, you're character foot need to touch the ground otherwise you will get an offset like this, so go back to your avatar configuration and make sure that both feet touch the grid like this

    tpose.png