Uninomicon

Documenting the dark corners of the Unity Engine.

User Tools

Site Tools


fbx_importing

Table of Contents

FBX Importing

Importing FBX files in Unity with the correct scale, rotation, and axis is fraught.

If you are just looking for a quick way to get models importing into Unity properly, take a look at the Pontoco Import/Export Settings.

The FBX Sanitizer tool can be used to validate an FBX file to verify that it will import into Unity with correct scale and rotation.


Scaling

FBX is in cm by default, but can support other units. Other unit scales are achieved in FBX by by setting GlobalSettings→Properties70→UnitScaleFactor property in the fbx. For example, a 1 meter cube in 'meters' should be stored in an fbx file like:

GlobalSettings:
  Properties70:
    UnitScaleFactor = (100.0)   # The 'unit' is 100 * 1cm 
CubeObject:
  Lcl Scaling = (1,1,1)

This file will show up in Unity's importer as '1m (File)'. image

Instructions for Blender

Instructions for Maya

3DS Max


Rotation

In the FBX file format, global axis alignment is stored in the GlobalSettings:

  • UpAxis: 0,0,1 (+Z)
  • FrontAxis: 0,1,0 (+Y)
  • CoordAxis: -1,0,0 (-X)
  • OriginalUpAxis: ??? [research needed]

Unity uses these properties to determine the coordinate system for the file. On import, the asset will be rotated to convert it from the file-coordinate system, to the Unity coordinate system. As of 2020.1, when “Bake Axis Conversion” is checked, these rotations will be baked into the meshes, rather than applied in the transforms.

For Blender it's important to note the difference between the terms “Front” and “Forward”. Front refers to the direction a model faces. In Blender this is -Y, in Unity this is +Z. Forward refers to the direction you would walk when looking at a model from the front. In Blender this is +Y and in Unity this is +Z. 1)

Instructions for Blender ~2.92

Instructions for Blender ~2.90

Instructions for Maya

Instructions for 3DS Max

1)
At some point pre 2015, Blender incorrectly had these terms swapped and exported all models with a 180 flip because of it.
2)
because of the previous bug, this is 180 degrees opposite to the correct axis. Blend files naturally have a +Y Forward aka. -Y Front orientation for axis
3)
Blender coordinates
4)
This feature was, interestingly, built to help export to Unity properly. However, this actually adds a root rotation to the file, which can confuse other tools
fbx_importing.txt · Last modified: 2022/01/26 20:53 by uninomiconadmin