Reading and writing Filmbox (FBX) files

Overview

Filmbox (usually called FBX) is an interchange format for entire scenes. It stores a large scope of 3D animation software information, including multiple objects, bones, skinning, lights, and cameras.

Because an FBX file contains an entire scene, it usually maps to multiple objects and File nodes in the Houdini scene, unlike a pure-geometry format such as .geo, where one File node handles the geometry.

Because FBX encompasses many different types of scene data, it can be slightly difficult to import procedurally. However, you can use the File node to import individual object geometry from an FBX file procedurally, and you can use the fbximport command to incorporate FBX loading into a scripted workflow.

Importing FBX

  • Use File > Import > Filmbox (FBX) to import data from an FBX file into the current scene.

    This command will potentially create multiple light objects, camera objects, Geometry container objects containing File nodes, and so on, corresponding to objects in the FBX file.

    See the Import FBX window for the import options.

  • Inside an object, a File node can import a single object from an FBX file. Use filename#object_name to specify the object to import.

  • The fbximport HScript command lets you script the equivalent of the File > Import > Filmbox (FBX) menu item.

Note

For animated characters, the easiest way to export deforming skin to Houdini is a vertex cache. If you save skinned bones, Maya writes out separate weighting data, which Houdini translates into an Override surface node that sets the weights. However, because Houdini must fill in the Override node directly (rather than referencing the source file), it will not pick up changes to the source file.

Exporting FBX

  • Use File > Export > Filmbox (FBX) to export the current scene to an FBX file.

    The export dialog includes an option to only export a branch of the scene tree, for example /obj/subnet1.

    See the Export FBX window for the export options.

  • To export FBX procedurally, use the FBX render driver node.

Limitations

Import

  • FBX SDK has a bug in it where vertex caches created in Maya as float-type (and not double-type) will be read incorrectly by the SDK. Currently there is a workaround UI option for this issue in Houdini’s import dialog.

  • Maya doesn’t export vertex caches to FBX unless “Export Quick Selection Set as Geometry Cache File(s)” is checked.

  • Softimage XSI seems to put picture width and height as horizontal and vertical aspect ratios. This not only gives an incorrect result for window sizes, but also derails the focal length computation badly.

  • FBX has a cubic light attenuation fall-off, whereas Houdini does not.

  • FBX has a “visibility” flag, whereas Houdini has separate flags for visible in the viewer and visible in the render.

The following data is not imported from FBX yet.

CategoryNot imported
Attributes
  • Polygon groups

Lights
  • Global fog settings

Cameras
  • Global cameras

  • Render settings (such as anti-aliasing)

General
  • Node up targets

Hierarchy
  • Euler rotation order

  • Instancing

Animation
  • Camera FOV

  • Visibility

  • Partial curve resampling

Skinning and deformations
  • Cluster deformers with an associated shape

Export

  • To properly import anything that uses variable-vertex animated geometry (such as our particle fluids), you have to turn on the Use FBX framerate in Maya checkbox in Maya’s FBX importer.

  • On FBX import, FBX joints are represented as null nodes with fake bones between them; each bone has an expression for the length and look-at target, so that it always spans the two joints it is related to. On export, our code tries to detect these situations, and if found, converts them to proper joint hierarchies without fake bones.

  • Houdini bones are converted to joints on export, since most applications seem to export/import just joints, and not bones, from FBX (it can represent both).

The following data is not exported to FBX yet.

CategoryNot exported
Attributes
  • Spare object parameters

  • Polygon groups

General
  • Pivots

  • Node up targets

Animation
  • Visibility

Dynamics
  • Smoke and fire