Search Unity

Position & Rotation data missing when using imported fbx animations

Discussion in 'Animation' started by NickNJD, Jan 2, 2021.

  1. NickNJD

    NickNJD

    Joined:
    Nov 28, 2020
    Posts:
    2
    Hoping someone can help me with importing an FBX with animations. I'm getting yellow text with (Missing!) after it when I actually come to use the imported animations in an Animation Controller.

    Here is everything I did:

    I've got a weapon mesh in Blender with a simple armature like so:
    blenderArmature.png
    There are four animations, each as a separate Action - Idle, Shoot, PutAway and TakeOut. They play perfectly fine in Blender.
    I've exported the fbx with the mesh and the armature selected, with the following settings:
    BlenderExport.png

    I've then imported the fbx into Unity. The model itself is fine and all works.
    For the Rig Import Settings, I've selected Generic, then "Create From This Model" for Avatar Definition. For Root node I've selected PistolHandle (as that is the highest level bone within the armature).
    On the Animation tab, all four animations are present and correct. You can play them in the preview window and they look perfect. So far so good.

    I've got the weapon object itself in Unity as a prefab, and added an Animator component to it.
    I've created a new Animation Controller asset and hooked the Animator to it.
    I've selected the imported model's Avatar as the Animator's Avatar.
    Inside the Animation Controller, I've dragged the animations from inside the imported mesh onto the Animator window.
    And here is where the problems start. If I now select the animations, the Animation window says that all the data is missing (yellow text with (Missing!) after it):
    AnimationsMissing.png
    Now if I actually just play the Idle animation, which only moves the root bone, it looks like it work (despite the yellow errors). But the other animations that involve other bones play all wrong, barely moving at all. It's as if only changes to the root bone are being played. Actually hooking up the animations and getting them to play in script is working fine, it's just the animations themselves that are broken.

    I guess I must have missed a step somewhere but I can't see what. Any help is much appreciated! Thanks!
     
  2. cryptton2004

    cryptton2004

    Joined:
    Nov 5, 2017
    Posts:
    1
    I'm experiencing something similar. Were you able to find a solution to this? I've been trying to fix it the entire day.
     
  3. NickNJD

    NickNJD

    Joined:
    Nov 28, 2020
    Posts:
    2
    Yeah, so my issue was that I was replacing the root object's mesh with the new one with animations. For some reason it only worked when the weapon mesh + animations were added as a child of the weapon object. I don't know why exactly, but worth a try if you're stuck.
     
  4. InezDias

    InezDias

    Joined:
    Nov 9, 2015
    Posts:
    1
    seems to be related to either renaming or reparenting things in Blender. When hovering the mouse pointer over the yellow message, it shows you the exact path (including hierarchy down from the armature) for the missing bone. Make sure this is how it looks in Blender as well.
     
unityunity