Better Fbx Importer & Exporter

by meshonline in Scripts and Addons

Who Don't Need It?

If Blender is your only toolchain, you don't need this add-on.

Who May Need It?

Game developers

Who need to import FBX files into Blender and export FBX files to game engines.

3d digital artists

Who need to share your 3d artworks to other 3d digital artists who use other 3d softwares, or you want to sell your 3d artworks in various digital markets.

What is it?

Blender is lack of native FBX support, when we import some older and newer FBX files, it often fails.

So I made a better FBX importer and exporter with official FBX SDK from scratch.

The add-on is compatible with all FBX versions, from ASCII to binary, from FBX 5.3 to FBX 2020.

I have tested the importer and exporter with about one hundred commercial FBX files which made by 3d digital artists in 3ds Max, Maya or Cinema 4D, the add-on can import and export these FBX files successfully.

The exported FBX and DAE files have been verified in Unity Engine 2019, Unreal Engine 4 and Godot Engine v3.2 with no issues.

Features

  • Supports Blender 2.79b and Blender 2.80, 2.81a, 2.82, 2.83 Alpha.
  • Supports Blender Renderer, Cycles Renderer, and Eevee Renderer.
  • Supports N-Gons (Polygons consisting of more than 4 vertices).
  • Supports importing FBX, DAE, OBJ, DXF and 3DS files.
  • Supports exporting FBX, DAE, OBJ and DXF files.
  • Supports exporting FBX smoothing groups.
  • Supports automatic bone orientation.
  • Supports armature deform animation.
  • Supports exporting non-linear animation.
  • Supports shape key animation.
  • Supports multiple material sets.
  • Supports multiple UV sets.
  • Supports multiple vertex color sets.
  • Supports meshes attach to bones.
  • Supports mesh instances.
  • Supports generic node transform animation.
  • Supports dummy nodes.
  • Supports camera.
  • Supports lights.
  • Supports importing vertex animation of Maya format(.mc/.mcx) and 3ds Max format(.pc2).
  • Supports exporting vertex animation of Maya format(.mcx) and 3ds Max format(.pc2).
  • Compatible with all FBX versions.
  • Supports exporting from any generic rigging system.
  • Supports exporting retarget-able human armature from Rigify Auto-Rigging System.
  • Supports exporting game engine friendly armature and 3d models.
  • Supports Unity Engine 2019, Unreal Engine 4 and Godot Engine v3.2.
  • Supports Windows, Linux and macOS.
  • Limitations
  • Does not support IK bones.
  • Does not support custom bone shapes.
  • Does not support exporting multiple animation actions, but supports importing multiple animation actions.

Interface

Importer:

To import an FBX file, navigate to File->Import->Better FBX (.fbx).

Then you can select leaf bone style, set scale value and other parameters, select the FBX file, click 'Better Import FBX' button to import the FBX file.

Exporter:

To export to an FBX file, navigate to File->Export->Better FBX (.fbx).

Then you can select FBX version, set scale value and other parameters, enter a filename, click 'Better Export FBX' button to export to the FBX file.

Showcase

Here is an imported robot warrior in Cycles Renderer of Blender 2.79b, you may notice that his shield and weapon have already been attached to proper bones automatically, and all bones orientations have been corrected automatically, while the armature deform animation remains not changed.

Here is an imported ancient Chinese soldier in Eevee Renderer of Blender 2.80 Release Candidate, you may notice that his spear has already been attached to the right hand bone automatically, and all bones orientations have been corrected automatically, while the armature deform animation remains not changed.

Here are three characters in the Editor of Unity 2018, note that Santa's eyes, mouth and face are driven by shape key animation, and his body is driven by armature deform animation.

Here is one character in the Editor of Unreal Engine 4 v4.22.3, the scene is the famous starter scene - 'Table, Glass And Chairs', note that Santa's eyes, mouth and face are driven by shape key animation, and his body is driven by armature deform animation.

Here is one character in the Editor of Godot Engine v3.2, the exported character and animation work properly.

Here is a simple cloth simulation in Blender 2.82, you can export the vertex animation as Maya(.mcx) format or 3ds Max(.pc2) format files; You can also import Maya(.mcx) format or 3ds Max(.pc2) format vertex animation files into Blender.

Tutorial

Video Tutorial For v3.5 (Latest)

Video Package: Download the HD version of the video(Format:zip,Size:82MB,Date:Feb 20,2020).

Watch Online:


How To Install

The product is a zip file named 'better-fbx-addon-3.7.6.zip', unzip it anywhere, launch Blender, navigate to File->User Preference->Addons, click the 'Install Add-on from file...' button, a pop up dialog will appear, select 'better-fbx-addon/addon/2.7/fbx.zip', or 'better-fbx-addon/addon/2.8/fbx.zip', click the 'Install Add-on from file...' button on the pop up dialog, the addon will be installed to Blender's addons directory.

 When the pop up dialog closed, we are still on Addons page, type 'better' in the search box, two separate addons will be filter out, activate the two add-ons, then click the 'Save User Settings' button and close the 'Blender User Preference' window.

How To Upgrade

Download the new version of the product.

Launch Blender, navigate to File->User Preference->Addons, type 'better' in the search box, two separate addons will be filter out, click the small triangles beside the add-ons to expand the contents, click the 'Remove' buttons to remove the two separate add-ons.

Install the new version of the product.

Supported FBX Versions

  • FBX53_MB55
  • FBX60_MB60
  • FBX200508_MB70
  • FBX200602_MB75
  • FBX200608
  • FBX200611
  • FBX200900
  • FBX200900v7
  • FBX201000
  • FBX201100
  • FBX201200
  • FBX201300
  • FBX201400
  • FBX201600
  • FBX201800
  • FBX201900
  • FBX202000

Cycles/Eevee Material

Only static diffuse image texture is supported.

In node editor, if a Cycles/Eevee material has only one static image texture node, the add-on treats it as the diffuse image texture node, you don't need to do anything.

In node editor, if a Cycles/Eevee material has more than one static image texture nodes, please follow the steps:

  1. Add a new image texture node to the node editor.
  2. Let the image texture node hold the static diffuse image texture too.
  3. Make sure that the image texture node is not connected to any other nodes.

The add-on treats the orphan image texture node as the diffuse image texture node.

If you don't add the orphan image texture node to hint which image texture represents the diffuse image texture, the add-on treats the first static image texture node it found as the diffuse image texture node.

Generic Rigging System

This add-on can export from any generic rigging system.

The exported armature is generic, is not retarget-able, because the bones hierarchy has not been configured for game engines, but the animations work properly in any game engines.

I have verified Rigify Auto-Rigging System and Auto-Rig Pro.

If you are Auto-Rig Pro user, please use its own FBX exporter, for its exported armature is retarget-able, while from this add-on is not.

The exported FBX files can be imported to Unity Engine 2019 and Unreal Engine 4, and the animations work properly.

When you have finished your character, just export with this add-on, no extra setup needed.

Rigify Auto-Rigging System

There is a special gift to Rigify Auto-Rigging System.

This add-on supports exporting retarget-able human armature from Rigify Auto-Rigging System.

Retarget-able human armature means that Unity Engine 2019 and Unreal Engine 4 can recognize the human armature and map the bones hierarchy to game engine's inner bones hierarchy, you can retarget tons of animations to your armature in game engine.

When you have finished your character, just export with this add-on.

From the export interface, enable 'Only Deform Bones' option, set 'Fix Rig' option to 'Rigify Auto-Rigging System', the add-on will export retarget-able human armature instead of generic armature.

There is also an 'Only Selected Deform Bones' option, if you enable the option, the add-on will export only selected deform bones in 'EDIT' mode.

You should not rename the deform bones, but you can delete the useless bones, and add some user defined bones.

If you rename the deform bones, the add-on can get confused, the result can be wrong.

Please refer to FAQ to learn how to setup user defined bones.

Here is a Character with Rigify Auto-Rigging System in Blender 2.79b, it does not contain any armature deform animations.

Here is the same character in Unity Engine 2018, Unity Engine recognized all bones.

Here is the same character in Unreal Engine 4, Unreal Engine recognized most bones, a few bones have been mapped to wrong bones, but it's not difficult to fix the mistake.

For your convenience, here is the right mapping.

Optimize For Game Engine

The add-on can export game engine friendly 3d models, the exported 3d models have unit scale and zero rotations.

This feature is very useful for game development, for animation retargeting usually requires that the armature has unit scale and zero rotations, and it is easy to manipulate 3d models via code if they have unit scale and zero rotations.

You can use Blender's default setting to work, use meter as the unit of the scene, and use 1.0 as the scale of the scene.

When exporting, you need to enable the 'Optimize For Game Engine' option, for the option is disabled by default.

Just export the contents, the exporter will convert meter to centimeter automatically, and apply all rotations to zero automatically.

I have verified exported files in Unity Engine 2019.3.3f1, Unreal Engine v4.22.3, Godot Engine v3.2, all the armatures and 3d models have unit scale and zero rotations.

How To Export

There are two solutions:

1. Single FBX file

You may export the rigged character, the armature and all animation actions to a single FBX file.

To achieve this, you need to concatenate all actions to one big action, select the rigged character and the 'rig' armature, from the export interface, enable 'Selected Objects' option, enable 'Only Deform Bones' option, enable 'Animation' option, then export to an FBX file.

2. Multiple FBX files

You may export the rigged character and the armature without animations, then export the animations multiple times, finally you get a separate rigged character and multiple animation files.

To export the rigged character and the armature, you need to select the rigged character and the 'rig' armature, from the export interface, enable 'Selected Objects' option, enable 'Only Deform Bones' option, disable 'Animation' option, then export to an FBX file.

To export multiple armature deform animation files, you need to select the 'rig' armature, from the export interface, enable 'Selected Objects' option, enable 'Only Deform Bones' option, enable 'Animation' option, then export to an FBX file.

Then switch to another armature deform animation action, export to another FBX file.

Repeat the above steps, until all armature deform animation actions have been exported to multiple FBX files.

The workflow of exporting multiple shape key animations is similar to the former, select the character instead of the 'rig' armature, other parameters are the same.

Unity Engine 2019 and Unreal Engine 4 can import separate rigged character and multiple animation files.

But there are slight differences between Unity Engine 2019 and Unreal Engine 4.

Unity Engine 2019 can import separate armature deform animations and separate shape key animations, then assign them to the character later.

While Unreal Engine 4 requires that you must bind an armature deform animation and corresponding shape key animation together and put them into one FBX file, when importing, they generate one mixed animation sequence, including both the armature deform animation and the shape key animation.

If the character has no shape key animations, the workflow is exactly the same as the former.

But if the character also has shape key animations, you need to select both the rigged character and the 'rig' armature, other parameters are the same.

Remember to switch the armature deform animation action and the shape key animation action together before exporting the next animation action.

Non-Linear Animation

The add-on supports exporting non-linear animation.

If there exists any NLA-Tracks in the NLA editor, the add-on will export current non-linear animation instead of original keyframe action.

If you want to export original keyframe action, you must remove all NLA-Tracks from the NLA editor, then select original keyframe action in the 'Action Editor' tab of the 'Dope Sheet Editor'.

You need not to bake animation before exporting the non-linear animation, just export when you want.

Detail Of The Parameters

The parameters in the importer:

Normal

'Calculate' means that we don't use imported normals, we let Blender generate normals for us.

'Import' means that we use imported normals.

The default parameter is 'Calculate'.

Auto Smooth

Auto smooth (based on smooth/sharp faces/edges and angle between faces).

The default parameter is enabled.

Angle

Maximum angle between face normals that will be considered as smooth.

The default parameter is 60.0 degrees.

Shading

How to render and display faces.

'Smooth' means that render and display faces smooth, using interpolated vertex normals.

'Flat' means that render and display faces uniform, using face normals.

The default parameter is 'Smooth'.

Scale

If the imported 3d model looks too small or too large, you may change the value to let it have proper size.

The default parameter is 0.01.

Automatic Bone Orientation

Automatically sort bones orientations, if you want to preserve the original armature, please disable the option.

The default parameter is enabled.

Calculate Roll

Automatically fix alignment of imported bones’ axes when 'Automatic Bone Orientation' is enabled.

The default parameter is 'None'.

Bone Length

Bone length when 'Automatic Bone Orientation' is disabled.

The default parameter is 10.0.

Leaf Bone

There are two leaf bone styles - 'Long' and 'Short'.

'Long' means that the length of a leaf bone is equal to 1/1 of the length of its parent bone.

'Short' means that the length of a leaf bone is equal to 1/10 of the length of its parent bone.

The 'Long' style lets you easily select leaf bones, the 'Short' style make the armature looks more beautiful.

The default parameter is 'Long'.

Only Deform Bones

When enabled, imports only deform bones.

When disabled, imports all bones, include IK bones, deform bones, and control bones.

The default parameter is disabled.

Animation

When enabled, imports the armature, the animation action and shape key action.

When disabled, only imports the armature with bind pose and blend shapes.

The default parameter is enabled.

Vertex Animation

When enabled, imports vertex animation.

When disabled, does not import vertex animation.

The default parameter is enabled.

The parameters in the exporter:

File Type

You can choose FBX, DAE, OBJ or DXF to export.

The default parameter is 'FBX'.

Selected Objects

When enabled, exports selected objects on visible layers.

When disabled, exports all objects in the scene.

The default parameter is disabled.

Scale

If the exported 3d model looks too small or too large, you may change the value to let it have proper size.

The default parameter is 100.0.

FBX Format

You can choose your favorite FBX format.

The default parameter is 'Binary'.

FBX Version

You can choose your favorite FBX version.

The default parameter is 'FBX_2018_00'.

Only Deform Bones

When enabled, exports only deform bones.

When disabled, exports all bones, include IK bones, deform bones, and control bones.

The default parameter is disabled.

Only Selected Deform Bones

When enabled, exports only selected deform bones in 'EDIT' mode.

When disabled, exports all deform bones.

The default parameter is disabled.

Max Bone Influences

Maximum bone influences you can have per vertex.

2: Suitable for mobile game.

3: Suitable for mobile game.

4: Suitable for mobile game.

6: Suitable for desktop game.

8: Suitable for desktop game.

Unlimited: Suitable for generic animation.

The default parameter is Unlimited.

Fix Rigify

When enabled, exports retarget-able human armature for Rigify Auto-Rigging System.

When disabled, exports generic armature.

The default parameter is disabled.

Fix Hint

Describe how to setup user defined bones.

For example:

"attach ponytail.01 to spine.006; attach tail.01 to spine"

Or

"attach def-ponytail.01 to def-spine.006; attach def-tail.01 to def-spine"

You can omit the prefix of "def-", or use the exact deform bone name.

The description is case insensitive, use semicolon to separate multiple descriptions.

Animation

When enabled, exports the armature, the animation action and shape key action.

When disabled, only exports the armature with bind pose and blend shapes.

The default parameter is enabled.

Vertex Animation

When enabled, exports vertex animation.

When disabled, does not export vertex animation.

The default parameter is disabled.

Vertex Format

You can choose 'Maya(.mcx)' or '3ds Max(.pc2)' to export.

The default parameter is 'Maya(.mcx)'.

Vertex Space

You can choose 'Local Space' or 'World Space'.

The default parameter is 'World Space'.

Frame Start

The start frame of vertex animation.

The default parameter is 1.

Frame End

The end frame of vertex animation.

The default parameter is 10.

Optimize For Game Engine

When enabled, make game engine friendly rotation and scale.

When disabled, keep original rotation and scale.

The default parameter is disabled.

License

The license of this add-on is "GPL".

The add-on does not interact with FBX SDK, instead, it interacts with a universal text format I invented, which is elegant and plug-in friendly, supports all 3d softwares.

The product package also includes an external command-line utility, which interacts with the universal format, and convert it to FBX format, or vise versa.

The external command-line utility is written in c++, which links to FBX SDK to generate the binary file.

The add-on uses the external command-line utility via a simple system call.

The external command-line utility respects Autodesk FBX SDK license, which requires the developer to put the following statement in the online document.

"This software contains Autodesk® FBX® code developed by Autodesk, Inc. Copyright 2014 Autodesk, Inc. All rights, reserved. Such code is provided “as is” and Autodesk, Inc. disclaims any and all warranties, whether express or implied, including without limitation the implied warranties of merchantability, fitness for a particular purpose or non-infringement of third party rights. In no event shall Autodesk, Inc. be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of such code."

Change Log

[2020-03-18]

Fix instance material bug.

'Optimize For Game Engine' is disabled by default.


[2020-03-16]

3ds Max and Maya compatible light.

Fix matrix precision bug.


[2020-03-14]

3ds Max and Maya compatible camera.


[2020-03-12]

Add 'Optimize For Game Engine' option.

Fix fail to import pure shape key bug.


[2020-03-10]

Add 'Fix Camera Rotation' option for 3ds Max and Maya.


[2020-03-08]

Fix a potential bug when exporting with 'Only Deform Bones'.


[2020-03-06]

Release version 3.7

  • Supports Autodesk vertex animation.
  • Fix animation take length bug.


[2020-02-23]

Release version 3.6

  • Supports exporting FBX, DAE, OBJ and DXF files.
  • 'Calculate Roll' option.


[2020-02-18]

Release version 3.5

  • Supports importing FBX, DAE, OBJ, DXF and 3DS files.
  • Better retarget-able armature for Unity and Unreal Engine.


[2020-02-15]

Release version 3.3

  • 'Auto Bone Orientation' option.
  • Export Unity style armature.
  • Fix various bugs.


[2020-02-11]

Release version 3.2.1

  • Supports light energy.


[2020-02-10]

Release version 3.2

New features:

  • Supports camera
  • Supports lights


[2020-02-09]

'Only Selected Deform Bones' supports generic armatures.

Update the document in the product.


[2020-02-07]

Release version 3.0

New features:

  • Supports mesh instances.
  • Supports generic node transform animation.
  • Additional importing options.


[2020-02-01]

Fix a bug when exporting character with shape keys.


[2019-12-14]

Fix a bug introduced in the last version.


[2019-11-29]

Import all bones by default.


[2019-11-28]

Fix 'Armature hierarchy broken by unused bones' bug.

Remove version 1.0.


[2019-11-25]

Upgrade to FBX SDK 2020.0.

Add 'FBX Format' option.


[2019-11-21]

Fix potential 'Null Name' bug.


[2019-11-11]

Fix importing error when normals are per vertices.

Fix flipped normal issue when calculated by Blender.


[2019-11-06]

Mark sharp edges.


[2019-11-05]

Fix 'Imported Normals' bug.


[2019-10-10]

Fix 'Found the same (BMVert) used multiple times' bug.


[2019-10-07]

Fix a potential bug of node editor.

Add 'Auto Smooth', 'Angle' and 'Shading' option.

Import to active collection in Blender 2.8.


[2019-10-06]

Release version 2.0.

Supports dummy nodes.


[2019-09-30]

Add 'Max Bone Influences' option.


[2019-09-26]

Fix 'face already exists' bug.


[2019-09-17]

Supports NLA animation.


[2019-08-10]

Fix code-sign issue on macOS.


[2019-08-08]

Export bind pose for meshes.

Export relative path for textures.


[2019-08-05]

Fix face map singleton bug in Blender 2.8.

Fix base color bug for Cycles Renderer and Eevee Renderer.


[2019-07-31]

Fix a bug when 'Only Selected Deform Bones' is enabled and 'Animation' option is disabled at the same time.


[2019-07-30]

Add 'Only Selected Deform Bones' option.

Fix wrong user defined bones function name in Blender 2.8.


[2019-07-28]

Fix type annotation warning in Blender 2.8.


[2019-07-27]

Fix a bug when exporting only parts of deform bones.


[2019-07-26]

Change license to 'GPL'.


[2019-07-25]

Add 'Fix Hint' option.

Add missing eyes bones.


[2019-07-24]

Initial version.