FBX Export
Exporting an FBX file can be done from the File->Export menu or from the fbx command. A single animation is exported into an FBX file that stores morph and bones animation data. This can then be applied to your character in other animation packages using standard FBX plugins*.
*morph restrictions apply. See below for details.
| Flag | Long Flag | Arg | Description |
|---|---|---|---|
| -f | -file | Yes | The filename of the FBX file to save. |
| -an | -anim | Yes | The animation to export. |
| -gr | -group | Yes | The group of the animation to export. |
| -fm | -format | No | The format index to pass into FBX. The default is the text format (-1). Warning, some values > 0 can cause the FBX SDK to crash. |
| -rk | -reducekeys | Yes | Determines if MotionBuilder's key reduction is used. Set to "true" or "false". |
| -mn | -meshnames | Yes | A string that sets the mesh names in the FBX file. Used for exporting morph target data (see below). |
| -fps | -framerate | Yes | The frame rate to bake the animation out to. Default is 30. |
>>> %fbx -reducekeys "true" -file "C:\myanim.fbx" -group "Default" -anim "myanim" -mn "mesh1|morph1|mesh1|morph2" -fps "24"
Exporting Morph Curves
The goal of the FBX command is to export FBX files containing animation data that can be imported onto your character using existing FBX plugins in Max, Maya, Softimage, etc. This is possible using Version 2009.3 FBX plugins for morph data, but several limitations to FaceFX Studio and the FBX plugins make this very difficult. For things to work, the "-meshnames" variable in the command needs to be set according to the guidelines below:
- For each morph target in FaceFX you want to export a curve for, create a morph name / mesh name pair separated by the pipe character "|" e.g (-meshnames "mesh1|morph1|mesh1|morph2" would be for two morph targets each with the same mesh1 target mesh.)
- The mesh name needs to have the exact same name as the mesh name in the source package. To find the mesh name in the source package, export a text-based FBX file and look for a line like: Model: "Model::Silent", "Mesh" { In this case the mesh name would be Silent.
- The morph target node names need to have the exact same name as the morph targets in the source package FBX file. OC3 entertainment Ogre Exporters follow this standard and will work provided you have not changed the morph target node names. To find the morph name in the source package export a text-based FBX file and look for a line like: Shape: "blendShape1.Fave" { In this case the morph name would be blendShape1.Fave.
- The morph-mesh pairs need to be listed in the command in the same order that they are contained in the source package. To find out the order they are in in the source package, export a text-based FBX file and observe the order the morph targets are printed there. We are working with Autodesk to remove this requirement but as of the 2009.3 FBX importer/exporters, the morph curves are imported based on their ordering, not their names.
An alternative to the above steps is to just leave -meshnames variable blank and the generated FBX file will create default names to store the animation data. The animation data could then be transferred to the correct place via script in the source package. This is left as an exercise for the reader, though improving the FBX pipeline is a high priority, so if you have any pointers or ideas to share, let us know.
Exporting Bones Animation
Exporting bones animation is easier than exporting morph animation, thankfully. Just export the FBX file from Studio and import it on your character using the Autodesk FBX plugins.
- If you don't get the results you expect, try importing the FBX file into a blank scene. If that animation looks good, then the issue is with content, not the exported FBX file. Perhaps attributes are locked or an IK setup is getting in the way of keying the bones in the scene.
