Search Unity

Question Huge Animation Issues

Discussion in 'Animation' started by Reid_Taylor, Mar 30, 2021.

  1. Reid_Taylor

    Reid_Taylor

    Joined:
    Oct 9, 2019
    Posts:
    57
    Im starting this thread because I need some solid answers. I've been using Unity for quite a long time and have started many projects. I am a programmer and my brother is an animator/modeler in Blender. We have started projects from a medieval open world game to a survival game. In all of these game we have had to stop because of severe animation problems. Mainly speaking of humanoid rigs/models. Here are some of the issues.

    • Import humanoid character with animations. When in scene the animation positions model way in the distance and is rotated weird.
    • Unity won't let an Imported model with rig be humanoid.
    • Blend file works but FBX doesn't and vise versa.
    • Lots of extra weird animations come with model on import.
    • Everything seems to work but the animations don't look like they do in blender.
    These are just a few of the issues we have encountered with Unity's animation/humanoid system. This could also could not be Unity and be a problem of Blender. This is part 1 of this thread. So, my question is: is it just us or does everyone else have these same problems? And if everyone has these problems what do people do to fix them? It can't just be a bad animation system because large games like Escape From Tarkov, Subnautica, Critical Ops, etc... use Unity and have complex animated humanoids. Thoughts?
     
    Last edited: Mar 30, 2021
    anycolourulike likes this.
  2. Reid_Taylor

    Reid_Taylor

    Joined:
    Oct 9, 2019
    Posts:
    57
    This is the second part of the thread, being my current issue. I have a rigged model that imports to Unity fine as a .blend file (doesn't work as FBX). The humanoid avatar fo this model works fine as .blend. Then I import new animations to Unity as FBX that come with an animation and the rig (set to create new avatar) without a mesh. This has partly worked so far. The humanoid allows the animations to be played on the original character rig/model. But because the rigs look weird on the new animation imports, the animations have weird traits to them that ruin the animation. Here are some captures:
    Configuring original model rig/avatar:
    l Screen Shot 2021-03-29 at 8.16.32 PM.png
    New animation files:
    Screen Shot 2021-03-29 at 8.16.50 PM.png
    Configuring Two new animation file rigs/avatars:
    Screen Shot 2021-03-29 at 8.17.07 PM.png Screen Shot 2021-03-29 at 8.17.32 PM.png
    As you can see the rigs/avatars of the new animation files are somewhat distorted and because of this they distort that animation which is obviously less than ideal... I should also mention that the rig is at no point changed in Blender. Can anyone help?
     
    Last edited: Mar 30, 2021
  3. Reid_Taylor

    Reid_Taylor

    Joined:
    Oct 9, 2019
    Posts:
    57
    We figured it out after lots of work! I don't know why no tutorials/articles/anyone say anything about this toggle: "Preserve Hierarchy". It was the key that fixed everything for us.
    Here are the steps that worked for us:
    • Import character file as .fbx
    • Select the character file in Unity and go to the “Rig” tab and set “Animation Type” to “Humanoid” and “Avatar Definition” to “Create From This Model”
    • Apply the changes to the character model then press “Configure” and ensure that the correct bones are in their correct slots
    • Go to the “Model” tab and toggle ”Preserve Hierarchy” on and Apply… This “Preserve Hierarchy” option was key for fixing all of our issues… Here is Unity Documentation of what it does:
    “Always create an explicit prefab root, even if this model only has a single root. Normally, the FBX Importer strips any empty root nodes from the model as an optimization strategy. However, if you have multiple FBX files with portions of the same hierarchy you can use this option to preserve the original hierarchy.

    For example, file1.fbx contains a rig and a Mesh and file2.fbx contains the same rig but only the animation for that rig. If you import file2.fbx without enabling this option, Unity strips the root node, the hierarchies don’t match, and the animation breaks.”

    • Import animation models as .fbx with the same rig as the character model
    • Select all animation files in Unity and go to “Model” tab and toggle “Preserve Hierarchy” on, then Apply
    • On all animations go to the “Rig” tab and set the “Animation Type” to “Humanoid” and “Avatar Definition” to “Copy From Other Avatar” and select the avatar created by the character model
    • Select an animation file and go to the “Animation” tab
    • These settings will differ depending on the animation
    • Loop will loop the animation
    • Loop pose will allow Unity to blend the animation so it loops seamlessly
    • Baking Into pose will correct certain movement (not sure what it does)
    • Based upon will change the way certain movement imports (not sure what it does)
     
  4. Reid_Taylor

    Reid_Taylor

    Joined:
    Oct 9, 2019
    Posts:
    57