Use Export To FBX (menu: GameObject > Export To FBX) to manually export GameObject hierarchies to an FBX file. The FBX Exporter exports selected objects and their descendants to a single FBX file. However, if you select both a parent and a descendant, only the parent’s hierarchy is exported.
The FBX Exporter exports the following objects:
The FBX Exporter exports multiple copies of the same Mesh as instances. The FBX Exporter also exports the following mesh attributes:
The FBX Exporter exports both Game Cameras and Physical Cameras.
NOTE: In Unity's Inspector, a Camera's Physical Camera property determines whether it is a Physical Camera or a Game Camera.
The FBX Exporter exports Physical Cameras, including these properties:
On export, the FBX Exporter sets the Aperture Height to 0.612 inches, and calculates the Aperture Width using this sensor back relative to the Camera's Aspect Ratio. For example:
* Full 1024 4:3 (1024x768)
* Aspect Ratio 4:3
* Aperture Width = 0.612 * (1024/768)
The Aperture Width and Height values appear in Unity's Inspector as the Sensor Size property in millimeters.
The FBX Exporter derives the Focal Length from the vertical Field of View (FOV) and the sensor back settings (Aperture Width and Aperture Height). The FBX Exporter uses the default FBX setting for Aperture Mode: Vertical.
Film Resolution Gate is set to Horizontal so that the importing software fits the resolution gate horizontally within the film gate.
The Near & Far Clipping Plane values have a range of 30 cm to 600000 cm.
In addition, the Projection type (perspective/orthographic) and Aspect Ratio are also exported.
The FBX Exporter exports Lights of type Directional, Spot, Point, and Area.
It also exports the following Light attributes:
Spot Angle (for Spot lights)
Color
Intensity
Range
Shadows (either On or Off)
The FBX Exporter exports these types of Constraints:
In addition, the FBX Exporter also exports the following attributes for all Constraint types:
The FBX Exporter exports the following attributes for the Rotation Constraint type:
The FBX Exporter exports the following attributes for the Rotation Constraint type:
The FBX Exporter exports the following attributes for the Position Constraint type:
The FBX Exporter exports the following attributes for the Scale Constraint type:
The FBX Exporter exports the following attributes for the Parent Constraint type:
The FBX Exporter exports Legacy and Generic Animation from Animation and Animator components, or from a Timeline clip.
In addition, it also exports the following animated attributes:
When exporting an FBX file, the following Export Options window opens, displaying options for specifying what gets exported.
Property: | Function: |
---|---|
Export Name | Specify the name of the FBX file to export. |
Export Path | Specify the location where the FBX Exporter will save the FBX file. |
Source | Transfer the transform animation from this object to the Destination transform. NOTES: - Source must be an ancestor of Destination - Source may be an ancestor of the selected object. |
Destination | Which object to transfer the transform animation to. This object receives the transform animation on objects between Source and Destination as well as the animation on the Source itself. |
Export Format | Select the format to use in the FBX file (ASCII or Binary). |
Include | Choose whether to export both Models and Animation, only Models, or only Animations. |
LOD level | For level of detail (LOD) groups, choose the desired level of detail to export (all, highest, or lowest). NOTES: - The FBX Exporter ignores LODs outside of selected hierarchy. - The FBX Exporter does not filter out objects that are used as LODs and doesn't export them if they aren’t direct descendants of their respective LOD Group |
Object(s) Position | Choose whether to reset the exported objects to world center, or keep world transforms during export. If you select multiple objects for export, and you choose Local Centered from this drop-down menu, the FBX Exporter centers objects around a shared root while keeping their relative placement unchanged. |
Animated Skinned Mesh | Check this option to export animation on objects with skinned meshes. If unchecked, the FBX Exporter does not export animation on skinned meshes. |
Compatible Naming | Check this option to control renaming the GameObject and Materials during export. The FBX Exporter ensures compatible naming with Autodesk® Maya® and Autodesk® Maya LT™ to avoid unexpected name changes between Unity and Autodesk® Maya® and Autodesk® Maya LT™. During export the FBX Exporter replaces characters in Unity names as follows: - Replaces invalid characters with underscores ("_"). Invalid characters are all non-alphanumeric characters, except for the colon (":"). - Adds an underscore ("_") to names that begin with a number. - Replaces diacritics. For example, replaces "é" with “e”. NOTE: If you have a Material with a space in its name, the space is replaced with an underscore ("_"). This results in a new Material being created when it is imported. For example, the Material named "Default Material" is exported as "Default_Material" and is created as a new Material when it is imported. If you want the exported Material to match an existing Material in the scene, you must manually rename the Material before exporting. |
Export Unrendered | Check this option to export meshes that either don't have a renderer component, or that have a disabled renderer component. For example, a simplified mesh used as a Mesh collider. |
Preserve Import Settings | Check this option to preserve all import settings applied to an existing fbx that will be overwritten in the export. If the GameObject is being exported as a new fbx, the import settings will not be carried over. |
NOTE: For FBX Model filenames, the FBX Exporter ensures that names do not contain invalid characters for the file system. The set of invalid characters may differ between file systems.
In order to export an animation clip from the timeline, in the Timeline editor select the desired clip, then from the top menu select GameObject > Export Selected Timeline Clip.
The FBX Exporter exports in centimeter units (cm) with the Mesh set to real world meter (m) scale. For example, if vertex[0] is at [1, 1, 1] m, it is converted to [100, 100, 100] cm.
In Autodesk® 3ds Max®, it is recommended to set the system units to centimeters to avoid any scaling on Model import and export.
There are no specific import options to adjust between Unity and Autodesk® Maya® and Autodesk® Maya LT™. When working in Autodesk® Maya® and Autodesk® Maya LT™, you can set the working units to meters if you prefer.
When working with large models in Autodesk® Maya® and Autodesk® Maya LT™, to ensure that the models clip to meters, adjust the scale of the near and far clipping planes for all cameras by 100x. In addition, you should scale lights and cameras by 100x so that objects display in the viewport.