Search Unity

How to offset bones in humanoid rig with

Discussion in 'Animation' started by warmanw, Apr 4, 2019.

  1. warmanw

    warmanw

    Joined:
    Feb 2, 2015
    Posts:
    32
    Hi guys cant find an answer to my question hope you can help us deliver nice experience to our game.

    We have several characters that use same animations. how can we achieve slightly different configuration of each characters avatar using same animation?

    Imagine having 2 identical humanoids where ones head is little higher and they both should share same animations

    I have read in some blog where was told that
    "The bones are not allowed to change their local translation relative to their parent."

    but maybe there are another ways to achieve this.
     
  2. DucVu_FX

    DucVu_FX

    Joined:
    Apr 4, 2019
    Posts:
    1
    I have something to share here and hope it will help.

    You should read this : https://docs.unity3d.com/560/Documentation/Manual/Preparingacharacterfromscratch.html

    I always rig my human character in T-pose with HumanIK in Maya then export all as FBX. After import in Unity I change rig to humanoid and create avatar from this model

    Let say you have 10 characters with same bone structure also have same joint's name , you can use only one avatar for other characters . your characters should have the same ratio or same style so they can inherit animations. The purpose of avatar in Unity is receive animation and map it in bones of character , no matter where the bone is.

    Make sure you hit the configure avatar button and check the Chest bone

    Create an Animator Controller and add all animation files on it , then you can apply 1 animator and 1 avatar for 10 characters

    Sorry if my English is not good , but you can give it a try and I hope my experience helpful
     
  3. warmanw

    warmanw

    Joined:
    Feb 2, 2015
    Posts:
    32
    idea is to have different avatars that can play same animation without shifting bones to position where they were animated in original avatar. for example if I have A(normal/animation was done on this) and B(head is little higher) avatars, I want to have B avatar animated starting from B's position and not A's
     
  4. mostlyhuman

    mostlyhuman

    Joined:
    Mar 16, 2013
    Posts:
    53
    Did you ever come up with a solution for this? My initial idea was to create a script that you could drop on each character that gets an array of all the clips in their animator controller and then there would be sliders to offset the joints additively for each animation, but after a couple days of searching I'm not seeing how to pull this off and I suspect it would not be very performant.
     
  5. npatch

    npatch

    Joined:
    Jun 26, 2015
    Posts:
    247
    Animation retargeting and Muscle Settings.
    Here's an overall explanation video by Nicky B.

    The only thing he doesn't mention is that animation clips that are set to humanoid, if opened in the Animation Window, are not transforms anymore but muscle animations. Muscle settings help define the limits for each setting where the animated muscles remap to.
    Here's another clip which shows the different body types.