Now that we are done with our first import, we can approach the many settings available in the Maya FBX exporter panel. There are several operations that require our attention, so follow us in our next recipe.
Open the scene with the model in Maya.
From the outliner panel, select the root node of your model. Be sure that the model is at the 0,0,0 position with 0,0,0 rotation.
In the top menu window, navigate to File | Export Selection and the Maya exporter panel will open.
Be sure that FBX export is selected from the drop-down menu at the bottom of the panel.
From the Options... panel on the right-hand side, let's examine the first group of settings. Edit the General Options, Reference Options, and Include Options tab, as shown in the following screenshot:
Now we can move to the next group of settings. In File Type Specific Options, make sure that the Include and Geometry settings are configured as shown in the following screenshot:
Next comes the animation-related group of properties. Since we are not importing animations with an FBX file, unflag the Animation option entirely. This action will disengage all the following properties (see that they are barred in the following screenshot).
Unflag Cameras, Lights, and Embed Media; we don't need any of them either.
Flag Input Connections in the Connections tab. Refer to the following screenshot for the last three steps:
Finally, in the Advanced Options tab, check that Units is set to Automatic.
Check that Axis Conversion is set to Up Axis: Y.
Check that FBX File Format is set to the latest Maya version available for your Maya installation (Binary FBX 2014, as we write). Refer to the following screenshot to be sure you have set everything correctly:
Set a
destination
directory for the export, most likely theAsset\FBX
directory in your Unity project.You can now press Export Selection to have the FBX file saved and ready to be used in Unity.
As you can see, there is quite a lot that can be tweaked with regard to exporting FBX files from Maya. What we offered here was a basic outline that will do for most cases. It is very likely that, depending on the specific need that would rise with your own project, you may need to use different settings on specific tabs. In such cases, we suggest you to refer to the official Unity documentation, where an entire section dedicated to exporting from Maya is available.
Anyway, at some point, you will have determined the optimal settings configuration for your project and won't need to reset them every time. Once you get your optimal configuration, the only change will be with regard to the Animation tab. Don't worry about it now; we'll get to importing animations soon.
If you check Unity's reference manuals (http://docs.unity3d.com/Manual/HOWTO-ImportObjectMaya.html), you may learn that Unity actually imports native Maya files, which means you can directly open Maya scenes (*.mb
and *.ma
files) in Unity. You can therefore ask, Why export FBX files into Unity at all?
There is more than one reason actually; one that is worth $4,000 is that FBX files are far more shareable than native Maya files. For example, to open a Maya scene in Unity, you must have Maya installed or the file won't open. If you expect to exchange files between people on their own PCs, you cannot assume that each one of them will have a Maya license. It will thus be safer to use formats that don't require additional costly software, as is the case with Maya (almost $4,000 per license).
That said, it is still quite useful to open Maya scenes in Unity. For example, in Unity you can immediately check the result of modifications made on a file in Maya without the need to export an FBX file with each new edit. Also, as already stated, Maya LT is going to export FBX file directly into Unity.