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 KFbxAxisSystem class documentation for more information.

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

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:

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() == KFbxSystemUnit::cm)
{
  const KFbxSystemUnit::KFbxUnitConversionOptions lConversionOptions = {
    false, /* mConvertRrsNodes */
    true, /* mConvertAllLimits */
    true, /* mConvertClusters */
    true, /* mConvertLightIntensity */
    true, /* mConvertPhotometricLProperties */
    true  /* mConvertCameraClipPlanes */
  };
  
  // Convert the scene to meters using the defined options.
  KFbxSystemUnit::m.ConvertScene(lScene, lConversionOptions);
}