# Scene Importer & Exporter

The Simplygon API provides classes for loading and saving various scene file formats. Currently the supported format are

  • Alembic (.abc)
  • FBX (.fbx)
  • glTF (.gltf, .glb)
  • Houdini geometry (.bgeo)
  • OBJ (.obj)
  • Simplygon (.sg)
  • Stereolithography (.stl)
  • USD (.usd, .usdc, .usda)

# Importing

Importing scene data is done by the ISceneImporter class. The file information is then stored in an IScene, where both the geometries, materials and textures of the imported file can be found.

    # Exporting

    Exporting scene data is done by the ISceneExporter class. The file format is determined by the file name extension.

    If the file name does not contain a known supported file extension (see list above) it will output the internal Simplygon binary scene dump format (same as if you export a file with .sg extension), which can then be read by the scene importer. This is useful for integrating the batch tool into your data pipeline or when requesting support, as it contains an exact representation of the Simplygon scene data.

      # Cascaded scenes

      You can output all cascaded scenes when exporting by setting the export cascaded scene flag with a call to SetExportCascadedScenes function. Note that all file format does not fully support cascaded scenes.

      # Format specific options

      # FBX

      You can control the exported FBX file format version by setting a global string setting "FBXFileExportVersion". The values for the version strings are listed in the FBX SDK "File version compatibility strings", for example "FBX201600" for file version 7.5 which guarantees compatibility with Autodesk 2016/2017/2018 products.

        # Limitations

        Currently there are a number of limitations to features supported in the various file formats

        # FBX

        • Bone data and skinned meshes are not supported
        • Selection sets are not supported
        • There is limited support for blend modes and custom materials/shaders
        • Due to limitations in the FBX SDK, all importer & exporter calls will be limited to one concurrent thread
        • The FBX format can only contain one scene per file. Cascaded scene output will be converted into top-level nodes in the FBX scenes, one per cascaded scene in a depth-first pattern.
        • Transforms on the root FBX node will be emulated with an inserted node at the top of the Simplygon scene hierarchy

        # glTF

        • Different sampler wrap modes in S/T directions are not supported, S direction is used for both directions
        • Cascaded scenes are output as separate glTF scenes in a depth-first pattern, with the top level scene set as the default glTF scene.

        # Extensions

        • KHR_texture_transform is supported
        • KHR_materials_clearcoat is supported
        • KHR_materials_transmission is supported
        • Any other required extensions will result in an error
        • All other optional extensions are ignored

        # OBJ

        • Cascaded scenes are not supported
        • Bone data and skinned meshes are not supported

        # USD

        • Only the UsdPreviewSurface material model is supported
        • Blend shapes not supported