Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

FBX import: humanoid rig creates extra GameObject ("hasExtraRoot")

Discussion in 'Asset Importing & Exporting' started by JohnnySunshine, Nov 20, 2017.

  1. JohnnySunshine

    JohnnySunshine

    Joined:
    May 11, 2013
    Posts:
    2
    Hi guys!

    I'm trying to import humanoid rigs from FBX files and then animate them. The animations are in separate FBX files.

    When I select "humanoid" for the rigs, Unity creates an extra gameObject beneath the main object. This makes it impossible to connect my rigs to animations, as their structure is different and Unity can't match the two avatars.

    The extra gameObject's name is the same as the original file. I also noticed that in the .meta file a certain "hasExtraRoot: 1" has appeared.

    Does anyone know what is this?

    It doesn't happen with every file, but always the same files. Re-exporting the file from maya to FBX doesn't help. If I overwrite the "hasExtraRoot: 1" to "hasExtraRoot: 0" in the meta file, Unity prompts to update the avatar definition, and when I hit apply, the flag is set to 1 again.

    What am I missing?

    Can it be an FBX error? What do I look for?

    Edit: I tried 2017.2.0f1 and 2017.2.0p2, both have the strange behavior. 5.6.4f1 works.
     
  2. hammer

    hammer

    Joined:
    Jul 11, 2012
    Posts:
    62
    Examine the node hierarchy of your scene in Maya before you export it to FBX. It may have multiple roots at the top of it. Perhaps you can delete any unwanted nodes.
     
  3. JohnnySunshine

    JohnnySunshine

    Joined:
    May 11, 2013
    Posts:
    2
    The Maya files should be okay.

    An update if anyone curious:
    I still don't have an answer, but I managed to circumvent this by deleting the animations in Unity, then closing Unity, then copying the animations into the project, then opening Unity.

    Reimporting stuff when Unity was open did not "correct" the mysterious flag.

    I don't consider this a solved problem though; I've no idea if this will come up again...
     
  4. james_cg

    james_cg

    Joined:
    Nov 13, 2019
    Posts:
    16
    I met this problem too, and here is how I solve it:

    I have an fbx named idle, which export from maya. When import to unity, and set Animation Type to Humanoid,
    "hasExtraRoot" will set to 1 by default.
    I found that, the fbx in maya, has an 'extra root' other than bip001. After I delete the 'extra root' and set bip001 be the root node, then export again from maya to unity, now everything is fine.