Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Sharing animation clips between similar rigs

Discussion in 'Animation' started by LeRan, Jul 9, 2018.

  1. LeRan

    LeRan

    Joined:
    Nov 24, 2015
    Posts:
    104
    Hi forum,

    I'm making a game in which there are several characters with similar rigs, who should be able to use the same animations. The characters, rigs and animations are made in Blender and imported into Unity as .FBX files.

    Everything works fine for the first character, imported with its animations. But importing every character with all animations from Blender seems a waste of time and data, since those animations are the same : so I decided to import only Character A with all animations, and all the rest (Character B, C etc.) with only the rig, and share Character A's animations.

    But : even when Character B is equipped with the same Animator Controller as Character A, nothing happens : no animation clip plays at all, despite the fact the the States in the Animator happen correctly (e.g. the Character B object moves on scene, the Animator Controller displays the progress bar moving in the "walking" state, but Character B objet shows no animation at all).

    As far as I researched, it should work as long as all characters have the same rig with identical bone names, which is the case, so I don't understand what's wrong. Could the problem be that the Character A is imported along with a child object which has its own rig (a coffee cup with one single bone) ? If that's not the problem I'd like to keep my coffee cup...
     
  2. LeRan

    LeRan

    Joined:
    Nov 24, 2015
    Posts:
    104
    All right, I found the solution, here goes.

    The bone names must match, but they must match all the way from the very root of the armature. Examples :
    charaterA_armature>root>pelvis>...>right_hand
    charaterB_armature>root>pelvis>...>right_hand

    ... that will not match, until you rename "charaterB_armature" into "charaterA_armature" so that the whole path is identical.

    I lost a couple days on that but now science knows :/
     
    theANMATOR2b likes this.
  3. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,755
    Props for returning and explaining the solution.

    Alternative - research avatar definition and avatar masking - for the "extra" bones like the coffee cup.