Advanced sample programs
 
 
 

The FBX SDK ships with the following advanced sample programs:

Advanced sample programDescription
CommonFunctions used by other sample programs to initializing objects, destroying objects, loading scenes, and saving scenes.
ExportScene01Creates and exports an animated scene containing a cylinder deforned by a skeleton made of two segments.
ExportScene02Creates and exports an animated scene containing a sphere morphed by two shapes.
ExportScene03Creates and exports an animated scene containing a textured cube, and a pyramid with materials mapped on its faces.
ExportScene04Creates and exports a scene containing a group of lights, a marker, and a camera. The animation rotates the lights and moves the camera.
ExportScene05In FBX, the position of a node is expressed in coordinates relative to the node’s parent. This example shows how to convert between FBX coordinates and a global coordinate system.
ImportSceneDisplays the content of any FBX file.
LayersCreates a scene containing a cube with layered textures and materials mapped on each of the cube’s faces. Illustrates how to use layers.
UserPropertiesIllustrates how to create user properties, attach the properties to a cube, and then animate the properties; and how to create a constraint between a pyramid and a cube.
ViewSceneShows how to evaluate the animation data and compute deformations. This is necessary for displaying the content of any FBX SDK-supported file in a graphical window.Uses the OpenGL Utility Toolkit (GLUT). A menu lets you select the view, the current camera, the current take, etc.

Folders for each of these programs are located in\examples. Each folder contains Visual Studio project files (Windows only) or makefiles (Mac OS or Linux) to help you build and run the program.

Common

The Common folder does not contain a stand-alone example. All examples use thecommon.cxxfile found within theCommonfolder to take care of common creation, initialization, loading and saving methods.

Thecommon.cxxfile illustrates common methods for using the FBX SDK including initializing objects, destroying objects, loading scenes, and saving scenes.

ExportScene01

The scene created in this example is a cylinder linked to a skeleton made of two segments. Two takes of animation show the influence of the skeleton segments over the cylinder. ExportScene01 illustrates how to:

ExportScene02

The scene created in this example is a sphere morphed by two shapes. A take of animation shows the influence of the shapes over the sphere. ExportScene02 illustrates how to:

ExportScene03

The scene created in this example is a textured cube and a pyramid with materials mapped on its faces. A take of animation displays six different angles of both models. ExportScene03 illustrates how to:

ExportScene04

The scene created in this example contains a group of lights, a marker, and a camera. A take of animation rotates the lights and moves the camera. ExportScene04 illustrates how to:

ExportScene05

The scene created in this example contains a skeleton made of three segments. The position of a node in an .fbxfile is expressed in coordinates relative to its parent. This example shows how to convert to and from a global position. ExportScene05 illustrates how to:

ImportScene

This example illustrates how to detect if a scene is password protected and how to import and browse the scene to access node and animation information. This example displays the content of an .fbxfile that is passed as program argument. It shows how to traverse an FBX scene graph and retrieve its content. You can try this example using any of the FBX SDK-supported files output by the export examples.

Layers

In this example, a scene is created containing a cube with layered textures and materials mapped on each of the cube’s faces. This example illustrates how to use layers.

UserProperties

In this example, a scene is created containing a cube, a pyramid, and user properties. This example illustrates how to:

ViewScene

This example illustrates how to display the content of an .fbxor.objfile in a graphical window. This program is based on the OpenGL®Utility Toolkit (GLUT). Start the program on the command line by providing the name of any FBX SDK-supported file. A menu opens letting you select the current camera and the current take. The ViewScene example illustrates how to: