FBX SDK Programmer's Guide > Nodes and the Scene Graph > FBX Scenes >

# Scene Axis and Unit Conversion

Scene Axis and Unit Conversion

Objects in the FBX SDK are always created in the right handed, Y-Up axis system. The scene's axis system may need to be converted to suit your application's needs. Consult the FbxAxisSystem class documentation for more information.

A scene's axis and unit system can be respectively changed using the following functions:

- FbxAxisSystem::ConvertScene(), which acts on the node transforms (pre-rotation) and animations.
- FbxSystemUnit::ConvertScene(), which acts on the node transforms (scale) and animations.

Note that calls to ConvertScene() do not change the vertex values of meshes, and only affect node transforms and animations. If the scene is already in the required axis system or required unit system, a call to ConvertScene() will have no effect on the scene. For example:

- If the scene is already in the MayaZUp axis system, the code FbxAxisSystem::MayaZUp.ConvertScene(scene); will not change anything.
- If the scene is already in centimeters, the code FbxSystemUnit::cm.ConvertScene(scene); will not change anything.

NoteIf your scene is improperly scaled after unit conversion, this might be caused by different nodes inherit types (ETransformInheritType), specifically the nodes with inherit type eINHERIT_Rrs. To avoid this problem, make sure to avoid unit conversion on these nodes by using the conversion options in the following code snippet. This code snippet additionally illustrates how to convert a scene's units from centimeters (cm) into meters (m):

    if(lScene->GetGlobalSettings().GetSystemUnit() == FbxSystemUnit::cm)
    {
      const FbxSystemUnit::FbxUnitConversionOptions lConversionOptions = {
        false, /* mConvertRrsNodes */
        true, /* mConvertAllLimits */
        true, /* mConvertClusters */
        true, /* mConvertLightIntensity */
        true, /* mConvertPhotometricLProperties */
        true  /* mConvertCameraClipPlanes */
      };

      // Convert the scene to meters using the defined options.
      FbxSystemUnit::m.ConvertScene(lScene, lConversionOptions);
    }