Scene Optimizer Service

The Scene Optimizer Service uses the Scene Optimizer Extension (omni.kit.services.scene.optimizer) to optimize USD files to improve performance.

Example use cases for the service:

  • Automated UV generation for CAD models

  • Optimizing scenes for runtime interactivity

  • Optimizing scenes for memory efficiency

  • Point Cloud Partitioning

The service will take a USD file from a Nucleus location, use a predefined configuration file with desired optimization operations and create a new optimized USD file in the same Nucleus directory.

_images/service_scene_optimizer.png

Configuration

The service is primarily configured via a json file which describes the operation stack which should be executed on the scene.

Generating Config Files

The file can be written by hand, but the easier way is to use the Scene Optimizer Kit extension to generate the file. The optimization steps can be defined in the Scene Optimizer UI, then saved to a JSON file.

See details on how to generate the JSON file from the Scene Optimizer Kit extension

Example JSON Configuration

This sample json will run the following operations:

  • optimize materials - deduplicate

  • deduplicate geometry - instanceable reference

  • prune leaf xforms

[
    {
        "operation": "optimizeMaterials",
        "materialPrimPaths": [],
        "optimizeMaterialsMode": 0
    },
    {
        "operation": "deduplicateGeometry",
        "meshPrimPaths": [],
        "considerDeepTransforms": true,
        "tolerance": 0.001,
        "duplicateMethod": 2
    },
    {
    "operation": "pruneLeaves",
    "pruneMode": 0
    }
]

Note

A configuration json file needs to be in the same top level directory when calling this as a service from Nucleus.