Apologies in advance for how basic this question might be. I’m trying to export an animated Maya model (animated by rigid binding skin) to FBX for use in Unity. When opened in Unity, the FBX (2011) file does not look proper at all.
I’ve managed to go through the process of importing animated fbx models to Unity already, but they did not involve joints.
So while baking the animations I should be selecting both, ie. exporting all?
I’ve tried with both maya and fbx files and unfotunately I’m getting the same thing!
Same in scene as in the preview window. Interestingly those polygons that do seem to work, when viewed in the animation preview in Unity will animate.
One thing I suspect I may have buggered up was not freezing transformations for polygons before animating them in Maya.
Also a quick note: If there is a way of removing joints but keeping the polygon animation in Maya, that would suit me well- as this is the only animation the model needs. Worst case scenario I could remove the joints and re-animated using polygon rotation but I would rather avoid that!
In Maya:
Edit->Delete All by Type->History
Edit->Delete All by Type->Non-deformer History
Attach skin to the mesh once again and all the animation stuff.
In Unity:
Import to Unity.
Select that file, in Inspector Import Settings, select RIG tab, choose animation type: Legacy
In animation tab add checkbox Bake Animations.
Apply and Drag object to the scene
Hm, I’ve given that a shot a few times and when I get to the Unity section, I choose Legacy, but ‘Bake Animations’ is always greyed out…
Thanks to your Maya instructions, I could get the joints and mesh (I froze the transforms when the polygons were not bound) to view properly in Unity when separated if I didn’t bind the skin to the skeleton.The joints can animate in Unity without anything attached to them.
The only problem is getting these polygons to follow joint animation in Unity. I should still be exporting the FBX from Maya with baked animation, correct?
I know it helps me to bake the keys in Maya before exporting the fbx. Not sure how much of an effect that will have… but I always go into the hyper graph hierarchy select all my joints and then go to Edit → keys → bake simulation… that will put a key frame every step of your timeline…
FBX settings
General Options - > check default file extension
under include → only smooth mesh is checked and reference container content
under animation - > check animation
under bake simulation → check bake simulation
under deformed models - > deformed models and skin is checked (although I don’t believe you can use deformed models
uncheck cameras and uncheck lights
scale factor - > centimeters
FBX file format → ASCII
FBX → 2013
works like a charm although I have to import texture maps separately.
Thanks a lot for the help, everyone. I ended up removing the joints and animating the polygons individually (luckily the model was VERY simplistic), due to a deadline I had. However I’m definitely going to experiment with the suggestions given here in future!
So on a current job I came across a similar situation in which all of my bones in the rig, minus the root were collapsing in on themselves. The problem I found was an attribute setting in the bones from Maya. It’s a check box called Segment Scale Compensate. It’s also a check box in the joint creation menu. You want this turned off. Otherwise with Unity not supporting it, all your bones kind of collapse into a singularity of sorts. Hope this helps any of you with a similar problem. I only found it myself by checking the fbx import warnings and errors in unity. Good luck!