Click or drag to resize
DigitalRuneFBX Export from Blender

Here are a few tips for exporting FBX files from Blender.

This article assumes that you have basic knowledge about modeling and rigging in Blender.

Please note that the instruction and settings mentioned in this article were tested with Blender 2.76b. Other versions of Blender may behave differently. Other FBX files may require different settings.

This topic contains the following sections:

Units

Before creating a new model or importing an existing model into Blender, check the units settings. Go to Properties | Scene | Units and note the settings. The units should be set to either:

  • None (which is interpreted as 1 unit = 1 m)
  • Metric with Scale = 1.0 (which is interpreted as 1 unit = 1 m)
  • Metric with Scale = 0.01 (which is interpreted as 1 unit = 1 cm)

Do not use Imperial because the FBX format uses the metric system (1 unit = 1 cm) by default.

Blender-Units

Note that changing the units after the model was created does not change the data - only how it is interpreted.

FBX import

Many FBX models available on the web use bad conventions or settings not supported in MonoGame. In these cases it is necessary to import the model in Blender and apply the appropriate fixes.

The current versions of Blender can import FBX 7.4 (binary).

Important note Important

The FBX import in Blender is the main point of corruption, especially for animated models. Using the wrong settings can screw up a model or its animations - without an easy way to fix them later on!

In some cases the imported model and its animations look okay in Blender, yet it is not possible to export the model and produce a working FBX file. Therefore it is necessary to test FBX import/export settings early on!

To import an FBX file in Blender go to File | Import | FBX (.fbx). In the Main category, set the Scale to:

  • 100 if the Blender units are "None".
  • 100 if the Blender units are "Metric with Scale = 1"
  • 1 if the Blender units are "Metric with Scale = 0.01"

Do NOT use !EXPERIMENTAL! Apply Transform during import. This can corrupt the animations internally!

Blender-FBX-Import-01

In the Armature category either set Automatic Bone Orientation, or manually play around with the Primary Bone Axis and Second Bone Axis. Many FBX models use:

  • Primary Bone Axis = X Axis
  • Secondary Bone Axis = Y Axis
Blender-FBX-Import-02

Select the FBX file and click Import FBX.

Fixing the model

After importing the FBX file, animated models (mesh skinning) may look wrong. There might be a rotation transform between the mesh and armature. Here are instructions to fix this problem.

If the mesh is parented to the armature, clear the parent: Select the mesh in the 3D View, click Object | Parent | Clear Parent.

If the mesh has an Armature Modifier, remove the modifier.

Select the armature in the 3D View or the Outliner and check the transform of the armature: Go to Properties | Object | Transform. Apply any rotation, but do NOT apply any scale! The Rotation should be (0, 0, 0) and the Scale should be (1, 1, 1)!

Important note Important

A Scale other than (1, 1, 1) usually means that the FBX was imported with the wrong settings. The animation data might be corrupt! The animations may look fine in Blender, but you won't be able to export them correctly. In this case: Start over again and try different import settings!

Next, check the mesh. Select the mesh in the 3D View or Outliner and go to Properties | Object | Transform. Apply any rotation or scale. The Rotation should be (0, 0, 0) and the Scale should be (1, 1, 1). The Location of the mesh should be identical to the armature - ideally set both locations to (0, 0, 0).

Blender-Transform

After the transforms are fixed, select the mesh and add the Armature Modifier again. Play back the animations check whether the model looks okay.

FBX export

The current versions of Blender can export FBX 6.1 ASCII and FBX 7.4 Binary. Choose FBX 7.4 binary.

Note Note

Blender 2.68 could only export FBX 6.1 ASCII, but it had supported special settings (XNA Rotate Animation Hack, XNA Strict Options) for XNA. Blender 2.68 did not support importing FBX files.

See Exporting Animated Models From Blender To XNA when working with previous versions of Blender.

To export a model go to File | Export | FBX (.fbx). In the Main category set the Scale to:

  • 0.01 if the Blender units are "None".
  • 0.01 if the Blender units are "Metric with Scale = 1"
  • 1 if the Blender units are "Metric with Scale = 0.01"

Enable !EXPERIMENTAL! Apply Transform.

Blender-FBX-Export-01

In the Armature category you may want enable Only Deform Bones and disable Add Leaf Bones to exclude bones which are not required at runtime.

Blender-FBX-Export-03

Select the output file and click Export FBX.

See Also