Customizing FBX SDK
 
 
 

You can customize or extend the features of FBX SDK in various ways, including user data (custom data), custom properties, custom data types, and more.

Defining user data for FBX objects

KFbxObject and its subclasses allow you set and get a pointer to any data record (usually an object or a struct). You are responsible for creating, destroying, and otherwise managing this data. See KFbxObject::SetUserDataPtr and KFbxObject::GetUserDataPtr.

Defining custom properties (user properties)

You can define custom properties for any object. To learn how, look at sample program UserProperties (see UserProperties).

To learn how how to get data from custom properties, see function DisplayUserProperties() in ImportExport tutorial program.

Defining a custom object type

The FBX SDK object model can be extended with a custom object type. For an example, see how a new class MyKFbxMesh is created from class KFbxMesh in sample program ExportScene03 (see ExportScene03).

Defining a custom type (user data) for layer elements

To create a layer element with a custom type, use class KFbxLayerElementUserData. Like any other layer element, it can be mapped by polygon vertex, by vertex, by polygon, etc.

See function CreateCubeWithMaterialAndMyKFbxMesh() in sample program ExportScene03 (see ExportScene03). It creates a custom compound based on float and boolean data types, and adds data per vertex.

Supporting additional file formats

FBX imports and exports scene data using several file formats, including FBX, COLLADA, OBJ, etc.

Each of these file formats has its own writer class (derived from class KFbxWriter) reader and reader class (derived from class KFbxReader).

FBX SDK implements scene I/O using a plug-in architecture. This makes it relatively easy to extend FBX SDK so that it supports an additional file format (usually called a custom file format) of your own design.

NoteDo not confuse scene I/O plug-ins with the FBX plug-ins to 3ds Max/Maya. Scene I/O plug-ins are a component of FBX SDK. The FBX Plug-ins to 3ds Max/Maya are described in FBX plug-ins for Autodesk 3ds Max and Autodesk Maya.

Sample program MyOwnReaderWriter (see Sample programs) shows how to use FBX SDK to write and read “CustomWriter” files, which use file extension .abc. In general, to support your own custom file format, you must:

You must also use class KFbxIOPluginRegistry (see MyOwnWriterReaderPlugin.cpp and MyOwnWriterReaderPlugin.h) to:

The MyOwnWriterReader folder does not contain a stand-alone sample program. Instead, it contains sample functions that support CustomWriter files. The sample functions are in turn used by other sample programs (ExportScene05, ImportScene, and ViewScene) to write and read CustomWriter files.

See also Extending FBX or Collada file formats.

Extending FBX or Collada file formats

FBX Extensions SDK allows you to extend FBX file format (versions 5 and 6) and the Collada file format. You can:

FBX Extensions SDK contains:

You can download FBX Extensions SDK by going to http://www.autodesk.com/fbx.