- Home /
Disappearing Root on animations
Hi all,
We are using animations from Mixamo for a Unity project. Everything was working great up until yesterday, when two animations we downloaded appeared in Unity with no root.
Have checked all the anims in Maya and they all appear fine. Even more strangely I have re-downloaded an anim that was previously working, and on import to Unity there is no root, so now I have two versions of exactly the same anim, one with a root and one without?!
Can't tell what is stopping the root importing - have attempted to attach a screenshot for clarity on the problem (you should be able to see in the Project tab some anims have a root and some don't).
Any help or advice much appreciated.
Answer by Paulius-Liekis · Jun 08, 2011 at 11:47 AM
I can't see your screenshot (screenshot of your setup would really help)
As long as your model and animation are in the same folder and you use model@animation notation Unity should add extra root as expected.
We are actually having this problem as well. We basically have a male and female version of our rigs, and one set of animations that plays on both (hierarchy named the same). The name of the animation did not originally keep it from importing properly, and we can just drag the animation file onto our TPoses.
If a TPose fbx gets renamed in unity, does it affect the animation files it's associated with? That's the only thing I think happened. In my version of unity (where i haven't renamed anything) the animations all import with their roots, and play fine. On someone else's, Unity seems to be deleting "Bip01" the biped root on import. The fbxs still have the complete rig and anim when brought back into the 3d software... So it's definitely something we're doing in engine/project!
This has happened on a project before, it happened when I changed the name of the animation to no longer match the name of the TPose. This doesn't appear to be the case currently.
Does anyone have an idea of while Unity would delete the root node, or how to get around it? Last time I fixed it through trial and error but it would be great to know reasons why!
Update: Ah-hah! The animations in question were being imported into a different folder(how it is organized on our SVN). Just like you said, as long as they're in the same folder!!
It would still be supremely helpful to find out why Unity goes through the trouble of hiding the root in this instance? Is there a functional purpose to that? Or...what exactly IS it doing? :P
@John: I think you're hitting a known design issue in Unity. If your file has more than one root object, then unity inserts another root for all roots. If file has just a single root, then Unity used it as a root. Because of this people run into this problem: in mesh file they have mesh and hips as roots in the file; in other animation files they have just hips, i.e. single root, so people get mismatched. The easiest workaround: just add a cube or any other node to file which has just a single root - then all files will be imported in the same way.
BTW: Unity doesn't hide roots - "it adds root to file which has multiple roots".
The first thing people say when they hear it: why don't you just add root to all models (no matter how many roots there are in the file)? Problem is: if you have just a single mesh (for example a cube), you want it to be imported as a single object without any extra roots...
Thanks for the explanation! That is starting to make more sense to me! Actually I think you may have told me before about the root matching issue in one of my previous questions! I didn't realize that it took affect when an animation file is placed in a separate folder from the assigned TPose! If I were to add a mesh or other root object to my animation files, does that allow them to be stored in separate directories? I still don't fully understand how the location and the structure relate to one another!
Your answer
Follow this Question
Related Questions
Animation without rigging? 2 Answers
How to rig model enough to animate in unity? Just need skeleton? 4 Answers
Is it possible for two models to share one set of bones? 1 Answer
Aniamtion rigging, hand not holding gun? Transform 'Rig 1' not found in HumanDescription. 0 Answers
How do you add an animation to an imported 3D model? 1 Answer