Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Generic Animation + Character Body Parts

Discussion in 'Animation' started by navossoc, Aug 13, 2015.

  1. navossoc

    navossoc

    Joined:
    Apr 24, 2015
    Posts:
    3
    Well, I'm trying to learn how to "merge" several parts of a body (head, body, hands, legs, etc) in a generic rig animation.

    Let me explain better what I have and what I wanna to do.

    First of all, I have several animations clips with a dummy human skeleton, every clip is a different animation.
    Then I have more models (meshs) with parts of a human, like head, hands, etc...

    If I try to attach the animation clips directly to the body parts, it really works as expected (deform meshs)...
    But I have a character made of 3 parts, then I will need 3 skinned meshs + 3 animation controllers, this don't sound as a solution to me.

    Now I'm trying to create a dummy/empty object with the rig, attach the animation to this object and then attach all the parts of the body.

    I already did all that, but when the "dummy body" is animated he don't deform the meshs, they just move and rotate, but don't deform, also they are rotated.
    What is wrong? It's the model? It's the animation? It's the root bone? bind pose?

    I already tried everything and I really don't know where is the problem, some one can help me?

    If you guys need more information, just say and I will try to explain better.

    PS: The assets are from a SMD model I converted on 3DS and exported to FBX, maybe is that?
     
  2. Mecanim-Dev

    Mecanim-Dev

    Unity Technologies

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Have you try with one controller and 3 layer, each controlling a different body part, simply create an avatar mask on each layer and set which transform/body part this layer affect
     
  3. navossoc

    navossoc

    Joined:
    Apr 24, 2015
    Posts:
    3
    Hi, thanks for your answer.
    No, I didn't tried that, but I will...

    My objective is create a prefab "skeleton" with just the transforms (model rig) with 3 empty game objects (slots) for the skinned meshs (show in the picture as: head/lower/uuu).
    Then I will change on runtime that 3 slots with another meshs, representing each part of the body (head, upper, lower) in the skeleton.

    Like I was trying to do on the picture attached above.
    Do you really think what you suggest may solve my problem?

    Anyway, I will read more about animation layers/avatar masks, maybe I find the answer there.
    Thank you for point me that out.

    []'s
     
  4. Mecanim-Dev

    Mecanim-Dev

    Unity Technologies

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Yes it should, we have see a lot of user doing a setup similar to your, with one layer driving the character body and another layer driving facial animation.
     
  5. Cayleth

    Cayleth

    Joined:
    Sep 1, 2017
    Posts:
    1
    You're saying Avatar, though. Does that mean this method is functional only for rigs imported as "Humanoid?" I'm using the "Default, no toes" rig from Makehuman for my character (because it includes the facial animation handles which I may want to use later, and I will also be using variations with an added bone or two) and apparently, because of the hip structure, there are issues importing this rig as Humanoid.

    How can I achieve the same effect with a rig imported as "Generic?" Or, alternatively, get a more complicated rig to work with the mecanim system?
     
  6. Mecanim-Dev

    Mecanim-Dev

    Unity Technologies

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Layer and mask do work for humanoid and generic rig.
    an avatar is simply the definition of the rig which can be either humanoid or generic
     
    Cayleth likes this.