From BlenderWiki
Autodesk FBX Exporter
| UI location | Export | ||
|---|---|---|---|
| Usage | Export animated models in Autodesk FBX format | ||
| Version | 2.59 | Author(s) | Campbell Barton (ideasman_42) with additions by others. |
| Blender | 2.59 | License | GNU General Public License (GPL) |
| File name | ? |
|---|
Introduction
Export selected objects to Autodesks .FBX file format.
This format is mainly use for interchanging character animations between applications and is supported applications such as Cinema4D, Maya, 3dstudio MAX, Wings3D and engines such as Unity3D and UnrealUDK.
The exporter can bake mesh modifiers and animation into the FBX so the final result looks the same as blender.
Usage
Instructions
- Launch the exporter from the File → Export menu
- Set the options in the user interface (Default options should be okay in most situations)
- Press the "Export" button
- Select the filename to export to.
Configuration
These options will be presented at export time. in most cases the defaults should be good to use.
Export Objects
| Selected Objects | TOGGLE | OFF |
| Selected Object - Only export the selected objects. Otherwise export all objects in the scene Note! this does not apply when batch exporting. | ||
| Scale | NUMBER | 1.0 |
| Scale the exported data by this value. 10 is the default because this fits best with the scale most applications import FBX to. | ||
| Forward / Up Axis | SWITCH | -Z Forward, Y Up |
| Since many applications use a different axis for 'Up', there are axis conversion there settings, Forward and Up axis - By mapping these to different axis you can convert rotations between applications default up & forward axis.
Blender uses Y Forward, Z Up (since the front view looks along the +Y direction). For example, its common for applications to use Y as the up axis, in that case -Z Forward, Y Up is needed. | ||
| Empty/Camera/Lamp/Armature/Mesh | TOGGLE | ON |
| Enable/Disable exporting of respective object types. | ||
| (Mesh) Modifiers | TOGGLE | OFF |
| When enabled, the mesh will be from the output of the modifiers applied to the mesh. | ||
| (Mesh) HQ Normals | TOGGLE | OFF |
| Calculate higher quality normals for exporting, use this where the resulting normals will be rendered. | ||
Export Animation
| Include Animation | TOGGLE | ON |
| Export armature bone and object animation. | ||
| Optimize Keyframes | TOGGLE | ON |
| remove duplicate keyframes when they are not needed. | ||
| All Actions | TOGGLE | ON |
| Export all actions compatible with selected armatures, start/end times are derived from the keyframe range of each action. When disabled only the currently assigned action is exported. | ||
| Include Default Take | TOGGLE | ON |
| Export the 'Default Take', this is an action which includes all object and armature animations as displayed in the 3D view and is mainly useful when animating multiple objects together. | ||
| Optimize Precision | NUMBER | 6 |
| Tolerance for comparing double keyframes (higher for greater accuracy), 6 allows 0.000001 difference or less for removal. | ||
Other Options
| Path Mode | SWITCH | Auto |
| When referencing paths in exported files you may want some control as to the method used since absolute paths may only be correct on you're own system whereas relative paths are more portable but mean you have to keep you're files grouped when moving about on you're local file system.
In some cases the path doesn't matter since the target application will search a set of pre-defined paths anyway so you have the option to strip the path too. Here are explanations of what the path options do.
| ||
| XNA Rotate Animation Hack | SWITCH | Group > File |
| Disables global rotation because it does not work with Microsoft XNA. | ||
| XNA Strict Options | TOGGLE | OFF |
| Sets various options found to only work with Microsoft XNA. | ||
Batch Export
| Enable Batch | TOGGLE | OFF |
| When enabled, export each group or scene to a file. | ||
| Group > File / Scene > File | SWITCH | Group > File |
| Choose whether to batch export groups or scenes to files. Note! when Group > Scene is enabled, you cannot use the animation option Current Action since that uses scene data and groups are not attached to any scenes. Note! when Group > Scene is enabled you must include the armature objects in the group for animated actions to work. | ||
| Own Dir | TOGGLE | OFF |
| When enabled, each file is exported into its own directory, this is useful when using the "Copy Images" option. so each directory contains 1 model with all the images it uses. Note This requires a full python installation, if you do not have a full python installation this button will not be shown. | ||
| Prefix | TEXT | (filename) |
| prefix the scene/group name with this text when exporting, its also used for the name of the directory when "Own Dir" option is enabled. | ||
Examples
Here is a blend that contains many examples each in a scene. Including motion capture, modifiers, uv/color layers, materials, armatures and more.
To export all examples at once, open the blend file, run the exporter, Enable Batch, Select "File->Scene" option, set the animation option to "Scene Frames", enable "Copy Images" and export.
A single animated character (used in screenshots below)
fbxExample.zip (includes blend file, images and exported fbx)
Compatibility
- Nurbs surfaces, text3d and metaballs are converted to meshes at export time.
Supported
- Objects
- Object Animation (Location/Scale/Rotation)
- Object Groups
- Object Parent/Child Hierarchy
Note, parents/children will only be exported if they are selected.
Do not used skinned meshes as children of other objects (except their own armature) This doesnt work reliably
- Object Types
- Meshes - See below
- Metaballs, Nurbs Surface, Text3D (written as FBX mesh objects)
- Particles (strands as mesh edges)
- Cameras - see below
- Armatures - see below
- Lamps - see below
- Empties - see below
- Meshes
- Verts/Edges/Faces/Normals
- Smooth/Flat Faces, Soft/Sharp Edges
- UV Coordinates (multiple named layers supported)
- Vertex Colors (multiple named layers supported)
- Armature Deformation
Only 1 armature modifier can be used on each mesh.
Armature envelopes will only work when the mesh "Modifier" option is enabled, otherwise they must be manually converted to weight groups before exporting. - Shape Keys
Currently shape keys will only be written if modifiers are disabled, or if the modifiers keep the same number of vertices, note that when exporting shapes with Apply Modifiers enabled no other shapes should be displayed since the shape will be applied on top of the mesh thats exported.
- Armatures
- Bones.
Bone use the same name space as objects, naming collisions are solved by the exporter. - Parent Bones.
Meshes with parent bones are exported as weighted meshes - Animation.
Animated armatures are exported with keyframes, The results of constraints and IK's etc will be exported however the constraints and other settings are not saved into the FBX file. - Actions (Multiple actions to FBX Takes).
When the "All Actions" option is enabled, actions will be exported for each armature when an action has at least 1 name that matches an armatures bone.
- Lamps
- Energy
- Color
- Distance
- Type (Point/Directional/Spot)
- Spot Size
- Materials
- Color: diffuse, specular, ambient.
- Shader settings: shininess, transparency, emit.
- Shader (phong or lambert)
- Shadeless
- Images Texface Material Textures are not supported
- Cameras
- Clip start/end
- Field of view
- ShiftX/ShiftY
- Aspect ratio
Missing
Some of the following features are missing because they are not supported by the FBX format, others may be added later later.
- Object Instancing
exported objects do not share data, instanced objects will each be written with their own data - Material textures.
only texface images are supported. - Vertex Shape Keys.
FBX Supports but this exporter does not write them yet - Animated Fluid Simulation
FBX does not support this kind of animation, You can however use use the OBJ exporter to write a sequence of files. - Constraints
The result of using constraints is exported as a keyframe animation however the constraints themselves are not saved in the FBX - Dupli Objects.
At the moment dupli objects are only written in static scenes (when animation is disabled)
Interoperability
This file was exported from blender, you can grab the FBX and Blend file here.
http://www.graphicall.org/ftp/ideasman42/fbx_examples/fbxExample.zip
Motion Builder
Tests Passed...
- Character animation
- Materials
- Textures
- Lamps
- Cameras
- Empty's
Notes...
- Imported models will often appear small, press the A key to resize the view.
- Mesh vertex color is not displayed
Cinema4D
Tests Passed...
- Character animation
- Materials
- Textures
- Lamps
- Cameras
- Empty's
Notes...
- Imported models will often be small, press Hkey to resize the view.
- Mesh vertex color is not displayed
3D Studio Max
See: Blender to 3DStudio Max Tutorial
Tests Passed...
- Character animation
- Materials (see below)
- TODO further testing...
Notes...
- Imported materials have low alpha/opacity, possibly a bug in the 3DS MAX importer.
Maya
Tests Passed...
- Character animation (Maya 8.0 or greater)
- Materials
- TODO further testing...
Notes...
- Dont scale the armature object since maya does not support non uniform scaled bones.
Deep Exploration (Right Hemisphere)
Tests Passed...
- Character animation (The example model imported with some problems)
- Materials
- Textures
- TODO further testing...
Notes...
- When exporting armature animation, disable "Optimize Keyframes" otherwise you may get bad bone interpolation.
- With animations, once imported you'll need to select the default action at the bottom of the screen. to play the animation.
- Some character animations to not deform properly, since other programs display this correctly I assume this is a problem with Deep Exploration --Ideasman42 00:34, 31 August 2007 (CEST)
Modo
Tests Passed...
- Meshes
- Textures
- TODO further testing...
Notes...
- Modo does not support animation
Endorphin (NaturalMotion)
Tests Passed...
- Armature animation
Notes...
- Endorphin only supports FBX's bones, all other objects are importes as bones.
Before exporting make sure you de-select armatures only, unless you want your camera as a bone. - Start and end frames are not imported, youll need to set them after importing.
Cheetah3D
Tests Passed...
- Character animation
- Materials
- Textures
Carrara
Tests Passed...
- Character animation
- Materials
- Textures
Unity3D
Tests Passed...
- Character animation
- Materials
- Textures
Notes...
- Cameras and lights are imported just as placeholders.
- When using armature deformed meshes, All vertices's must be influenced by at least one bone, or it will look like the vertex is in some far off place.
Microsoft XNA
As from release 2.59 the official Autodesk FBX exporter supports the format required by Microsoft XNA 4.
The format is compatible where possible but several options still have to be set in the exporter to get a suitable output file.
The main requirement is that the animations must not be rotated however it is not as simple as setting no rotation. There is a specific 'XNA Rotate Animation Hack' option that must be enabled.
There are also problematic options:
- Edges and 'Empty' objects are not supported and can cause importing errors.
- Smoothing is not normally used
- Cameras and Lamps are not used
- It is much easier if every action has its own name, so do not use 'Default Take'.
Optimized keyframes might remove deliberately duplicated frames so try it out before using that option.
In most cases it is also necessary to have the images in the same folder as the FBX file. This requires using the Path Mode setting it to 'Strip Path'.
To make this easier there is a convenient tick box to force the XNA compatible options.
It is not essential to use the XNA Strict Options but is convenient.
It is also advisable to remove the tick from 'All Actions' because XNA can only import the first take from any FBX file. (This is reported to be fixed in the next update to XNA currently in beta Aug.2011.)
See the above instructions for outputting individual takes.
More Information On Using Blender With XNA
|
C4 Game Engine
See the C4 Engine Wiki for notes on getting models into the C4 Engine with the fbx exporter.
Notes
Saving Just Animations
The FBX file format supports files that only contain takes. It is up to you to keep track of which animations go with which model.
The animation that will be output is whatever the currently selected action is within the action editor.
To reduce the file size, turn off the exporting of any parts you do not want and untick 'All Actions'.
For boned animations typically you just leave the armature enabled which is necessary for that type of animation.
Reducing what is output makes the export and future import much quicker.
Normally each action will have its own name but the current or only take can be forced to be called 'Default Take'. Typically ensure that option remains off.
Command Line Converting
Here is a script that will convert a blend to an FBX from the command line.
(note that it will only use the active scene)
import bpy import sys argv = sys.argv argv = argv[argv.index("--") + 1:] # get all args after "--" fbx_out = argv[0] bpy.ops.export_scene.fbx(filepath=fbx_out, axis_forward='-Z', axis_up='Y')
Save the script to convert_blend_to_fbx.py
Then convert a blend
blender foobar.blend --background --python convert_blend_to_fbx.py -- foobar.fbx
Known Issues
Dupli's
- Exporting DupliObjects (dupliVerts, dupliFaces, dupliFrames, dupliGroups) does not work in 2.45rc2 (It has since been fixed)
- Dupli Objects dont support animation export. (disable animation for dupli's to work)
- Armatures in dupli's do not export
Support
- Python & Plugins forum at Blender Artist.