Search Unity

Animation transforms marked as missing

Discussion in 'Animation' started by Berandas, Oct 13, 2016.

  1. Berandas

    Berandas

    Joined:
    Jan 4, 2013
    Posts:
    15
    Hey guys,

    I have this issue with my rig and animations:
    - my character rig has animation controller, using several different animations from separate animation files, I recently added new animation created in different 3D software (with the original rig), the animation is looping properly in the animator window, but there is no motion in the Scene (character remains in it's initial T-pose). After looking at everything, I found out that there is something wrong in the Animation window:



    All the keyframes and curves are present properly, freamerate is the same, all the bones are named correctly, everything else is also set the same way as on the older meshes and animations, but for some reason all the transforms here are marked as "missing".
    I really tried every possible way to find out what's wrong, but I am out of ideas now, does anyone have any clue?
     
  2. GrischaG

    GrischaG

    Joined:
    Apr 26, 2013
    Posts:
    40
    Hi Berandas,

    If you just import an animation you have to choose an avatar in the import options. Maybe you chose one and now it is missing. I had that once for no obvious reason but i dont know if that would cause the problem in your picture^^
    Just take a look at your import options and see if there is a working preview of your animation.
     
    JamesNunesRoundtable likes this.
  3. Berandas

    Berandas

    Joined:
    Jan 4, 2013
    Posts:
    15
    Hi, thanks for your reply.
    The avatar is there, it's using the same avatar as all the other animations. I also tried using both the anim file in the new rig file and the one I separated from it, but without any change.
     
  4. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    The curves that are in the clip don't match the names of the child gameobjects of the gameobject you're playing the animation on.
     
  5. Berandas

    Berandas

    Joined:
    Jan 4, 2013
    Posts:
    15
    Hey David, thanks for your advice, I double checked the hierarchy and there truly is a difference, I didn't notice this before, because the rigs were identical when imported into Blender. The old rig has one more "Bip001" level in Unity:



    But that's no bone or anything, I think the other software exported it in a bit different way and this is the result of it. The problem is that I am unable to reproduce this hierarchy when exporting the new rig from Blender. I tried adding one more bone as root, called "Bip001", but that messed up the animation completely, so no keyframes or curves were available. Renaming the skeleton, or the whole object has no effect on this and I already tried all possible combinations of checkboxes during the export dialogue.
     
  6. Berandas

    Berandas

    Joined:
    Jan 4, 2013
    Posts:
    15
    Okay, found the solution. I had to export a mesh object along with the rig, then it added the "Bip001" level to it.

    Thanks for your help, guys!
     
    CatDecaf and DavidGeoffroy like this.
  7. jister

    jister

    Joined:
    Oct 9, 2009
    Posts:
    1,749
    but this shouldn't be the solution. The difference is if u export mesh, i guess the export/import process creates an extra container on the top level. Try adding an extra empty one yourself in your 3d app.
     
  8. cyberjoys

    cyberjoys

    Joined:
    Dec 1, 2020
    Posts:
    66
    can someone hint me on how to detect such missing info, then i can delete those curve data from the animation clip
     
  9. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    We don't know which GameObject/Prefab was used to create the clip, or on which rig the clip is supposed to play.

    But if you do, you can use AnimationUtility.GetCurveBindings and compare the path attribute of each curve to your hierarchy using Transform.Find
     
  10. cyberjoys

    cyberjoys

    Joined:
    Dec 1, 2020
    Posts:
    66
    yeah man, AnimationUtility.GetCurveBindings was the api i used to tackle what i wanted, then compare with the prefab's Transform[], done. cheers
     
    DavidGeoffroy likes this.
  11. TensaHighscore

    TensaHighscore

    Joined:
    Sep 5, 2020
    Posts:
    2
    In my case, i Had the Animator.Somethings missing
    I simply did put CurveBindings and Editor Curves into variables from a working but Separated from any model animation clip and did use AnimationUtility.SetEditorCurves into the animation that I had in my exported model with same animation but has those Animator.Somethings missing
    and it worked ^^
    As far as i understood, the problem came from the names of animation clip properties being badly set when using FBX Exporter (Unity Package)
     
  12. aabee

    aabee

    Joined:
    Jun 4, 2016
    Posts:
    2
    I had this same issue and searching for an answer resulted in this thread.
    I finally managed to figure it out and I'm posting this solution here for others with the same problem so they don't have to spend hours scratching their heads at it. This is how my problem looked like:

    Untitled.png
    When I did a "very slow double click" on a name there, it lets me rename it and shows me the hidden parts:
    Untitled2.png
    This shows me the problem:
    The animation expects there to be a structure that looks like this:
    Parent (with animator component) -> LWB Root -> LWB Cap Armature -> Root (Bone) -> ...

    I had put the animator component to the LWB Root object, so it did not work. I moved it to the parent object of LWB Root, and it started working.

    TLDR; Your animator component is in the wrong place in relation to the animation target. Or. Your export adds some needless paths to the animation.
     
    Claudio1471 and AAAAAAAAAE like this.
  13. Claudio1471

    Claudio1471

    Joined:
    Oct 6, 2023
    Posts:
    2
    @aabee Thank you for posting your solution, it worked instantly. But I wonder, how did you figure it out? It's actually easy to fix once you understand why the problem is happening, but when you don't it almost seems impossible to fix, so how?