Scene Optimizer Presets#

Scene Optimizer presets are JSON configurations that define pipelines of operations to transform raw CAD-converted USD files into optimized, SimReady-compliant assets.

Overview#

Presets can:

  • Improve USD hygiene - Fix material bindings, clean up hierarchies, remove redundant geometry

  • Optimize performance - Deduplicate meshes, merge geometry, reduce polygon counts

  • Enforce compliance - Normalize units (meters) and orientation (Z-up)

  • Structure assets for SimReady - Split into internal/external payloads, add metadata layers, set up proper prim hierarchies

Directory Structure#

so/
├── generic/                    # Reusable template preset and shared scripts
│   ├── generic_preset.json     # Multi-step optimization pipeline
│   └── lib/                    # Shared Python processor scripts
├── spt/gb300/                  # GB300 rack presets (monolithic and payload variants)
│   └── alternate_presets/      # Strategy variants for different workflows
├── trane/                      # Trane 220LL chiller preset
└── vertiv/                     # Vertiv equipment presets (8 models)
    └── <model>/                # Each model folder contains:
        ├── <model>.json        #   Main optimization preset
        ├── payloads.json       #   Payload assembly preset (internal/external split)
        ├── scripts/            #   Custom Python processors
        └── metadata/           #   Property JSON and generated USDA layers

Each vendor folder follows this pattern: a main preset for optimization, custom Python processors in scripts/, and pre-built metadata in metadata/. Some folders also include a payloads.json for multi-stage internal/external payload assembly.

Generic Preset#

so/generic/generic_preset.json illustrates how to address common geometry issues encountered after CAD conversion:

  • Stage metrics normalization (meters, Z-up)

  • Duplicate mesh removal

  • Mesh cleanup (topology fixing)

  • Mesh decimation (normalizes density based on maximum mean error tolerance)

  • Normal generation

  • Material optimization and deduplication

  • Geometry and hierarchy deduplication

  • Hierarchy pruning

  • Primvar optimization

  • Material consolidation

  • MaterialBindingAPI validation and fixing

  • Small geometry removal (degenerate geometry)

  • Extent computation

Shared Python Scripts#

The so/generic/lib/ folder contains reusable Python processor scripts that can be referenced by any preset, including those built with the Asset Processor:

Script

Purpose

add_layers.py

Add sublayers (metadata, connection points) to the main asset

deduplicate_hierarchies_by_display_name.py

Deduplicate repeated hierarchy branches

group.py

Reparent prims under a new hierarchy target

material_replacement.py

Replace materials with UsdPreviewSurface materials

remove_coinciding_meshes.py

Remove overlapping meshes at the same location

set_forward.py

Set the forward axis on the stage

split_non_composed_by_geom_subsets.py

Split meshes that use geometry subsets (required before deduplication, which does not yet support them)

transform_stage.py

Apply transforms to the stage root

validate_fix_material_binding_api.py

Validate and fix MaterialBindingAPI on prims

Vendor-Specific Presets#

Vendor folders contain real-world preset examples customized for specific equipment:

Folder

Equipment

Notes

spt/gb300/

NVIDIA DGX GB300 Rack

Multiple preset strategies (monolithic, payload-based) with hierarchy deduplication and instancing

trane/

Trane 220LL Chiller

Stage preparation, material replacement, statistics capture

vertiv/

Eight Vertiv models (APM2, CW084, CW375, CW181, EXLS1, XDU1350, XDU2300)

Payload assembly, occluder creation, internal/external extraction

Refer to the README.md in each vendor folder for details.

Python Processors#

Presets can include Python processors that run custom code during the optimization pipeline:

Embedded scripts

Python code defined directly in the preset JSON. Useful for simple operations.

External modules

Scripts stored in a library folder and loaded at runtime. Useful for complex logic or shared code across multiple presets.

Processors have full access to the USD stage.

External Script Development Pattern#

For rapid iteration during development, store scripts in a library folder (such as so/generic/lib/) and load them using this pattern in your Python Script processor:

import os

lib_path = os.path.join(os.environ["AIF_PIPELINE_SAMPLES_ROOT"], "so", "generic", "lib")
script_file = os.path.join(lib_path, "my_script.py")

# Load and execute fresh from disk (no caching issues)
exec(compile(open(script_file).read(), script_file, 'exec'))

# Call your function (defined in my_script.py)
process(stage)

This pattern:

  • Reads the file fresh from disk every time - no need to restart Kit or USD Composer

  • Provides proper error tracebacks with filename and line numbers

Warning

The if __name__ == "__main__": idiom does not protect against auto-execution when using exec(). In the exec context, __name__ defaults to "__main__", so any code in that block runs automatically. Either remove the block and call functions explicitly, or pass a custom name: exec(compile(...), {'__name__': 'my_module'}).

Usage#

  1. Open USD Composer > Window > Utilities > Scene Optimizer

  2. Click Load Preset and browse to a preset JSON file

  3. Click Execute All to run the full pipeline, or Execute on individual processors

aif-pipeline optimize ./input/ ./output/ --preset so/generic/generic_preset.json
python scripts/optimize.py ./input/ ./output/ --preset so/generic/generic_preset.json --kit_path "D:/kit/kit.exe"

See also


Omniverse documentation