|FBX 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:
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:
Do not use Imperial because the FBX format uses the metric system (1 unit = 1 cm) by default.
Note that changing the units after the model was created does not change the data - only how it is interpreted.
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).
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:
Do NOT use !EXPERIMENTAL! Apply Transform during import. This can corrupt the animations internally!
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:
Select the FBX file and click Import FBX.
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)!
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).
After the transforms are fixed, select the mesh and add the Armature Modifier again. Play back the animations check whether the model looks okay.
The current versions of Blender can export FBX 6.1 ASCII and FBX 7.4 Binary. Choose FBX 7.4 binary.
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:
Enable !EXPERIMENTAL! Apply Transform.
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.
Select the output file and click Export FBX.