Using The Scene Optimizer

Finding The Extension

Note

This extension is enabled by default in USD Composer 2022.3.0 and above.

The Scene Optimizer panel can be opened via the Window -> Utilities -> Scene Optimizer menu item.

The extension can be enabled/disabled via the Window -> Extensions window.

Search for Scene Optimizer.

There are three extensions available. You will see:
  • omni.scene.optimizer.core

  • omni.scene.optimizer.ui

  • omni.scene.optimizer.bundle

In most cases enabling the bundle extension is all that is needed. This will load both core and ui extensions automatically.

Scene Optimizer UI

When the Scene Optimizer is enabled, the following UI is displayed:

../_images/ext_scene_optimizer_main_interface.png
  • Load Preset
    • Load a previously saved JSON configuration file describing a series of processes or choose an included preset:
      • Modify Instances - Clean Prototypes

      • Modify Instances - Merge Meshes

      • Modify Stage - Deduplicate Materials and Meshes

      • Modify Stage - Move Materials to /Looks

      • Modify Stage - Merge Meshes

      • Modify Stage - Spatial Merge Meshes

  • Save Preset
    • Save the current process stack to a JSON file for later use.

  • Execute All
    • Executes all of the processes that are configured from top to bottom.

  • Clear All Processes
    • Removes all processes from the UI.

  • Add Scene Optimizer Process
    • Add processes that will be performed on the stage.

Configuration Menu

The configuration menu will show contextual information about the current stage contents such as stats and process logs. This can be helpful for understanding how stage components will be processed by specified Scene Optimizer operations. The results are displayed in a new Report tab.

../_images/ext_scene_optimizer_configure_menu.png
  • Verbose
    • Logs extended information for a generated report.

  • Generate Report
    • Creates a report for each time a user runs a process stack. This includes timing and information about what the various operations processed.

  • Capture Before/After Stats
    • Captures the before and after stats of the contents of the stage to show any changes of the stage when scene optimizer operations have been run.

../_images/ext_scene_optimizer_configure_report.png

This shows an example report of a simple merge mesh on two objects with corresponding stats.

Note

A report will be generated by default from core version 105.1.8 and newer. This can be turned off in the Configure Menu by disabling Generate Report option.

Reordering Processes

As processes are added they will be appended to the list. Processes can be reordered (click and drag the drag handle in the top-left corner of a process) or removed (click the delete button in the top-right corner of a process). You can also expand/collapse a process by clicking on the top header section of it.

../_images/ext_scene_optimizer_processes.png

The image above shows the main interface with a couple of processes, in the middle of a drag operation. The blue drop target highlights to show where it is valid to move a process. Also shown are where to click to initiate a drag or delete a process.

Editing Prim Paths

Some processes can have a list of prim paths or regular expressions specified in order to restrict what they operate on:

../_images/ext_scene_optimizer_edit_prim_paths.png

Those processes will have an argument that looks like the screenshot above. You can freely type a prim path or regular expression in the text field. Clicking Add will add any selected prims in the stage to the list. Clicking the pencil icon will open a new window, shown below, that lets you more easily manipulate what is included.

../_images/ext_scene_optimizer_edit_prim_paths_panel.png

This panel lets you add the stage selection, delete items, or select items in the stage.

Presets

A few presets are included in Load Preset button to help load common operation stacks and their configurations to help organize common output USD data structures to be more performant for user workflows.

There are two primary categories of presets within Scene Optimizer:

  1. Instance Optimization

    These presets aim to find the prototypes of the instances in the stage and optimize each one. The presets can be executed in succession to achieve higher levels of optimization, mainly by reducing prim count, this is equally beneficial for performance and useability (i.e., less clutter in the Stage Window).

    Name

    Description

    Workflow / Applications

    Modify Instances - Clean Prototypes

    This preset does not change the prim hierarchy. It performs the following operations:

    1. Enables Instancing on internal references.

    2. Prune Xforms - Removes Xforms which do not have any child.

    3. Compute Extents - Ensures that mesh prims have valid extent attribute values.

    4. Generate projection UVs - If UVs are not found on a mesh, they will be created via Box projection.

    5. Optimize Time Samples - Removed redundant animation time samples.

    Note: This preset finds the “prototypes” hierarchies by matching the path name . This should apply correctly to most content which was converted from other formats but may need to be adjusted for specific cases.

    • Components in Process and Equipment data.

    • Instances (families) in architecture data.

    • Products with important hierarchies that need to be preserved up to the instance level.

    • Simulation / Process Data with many timesamples.

    • CAD data with low quality materials.

    Modify Instances - Merge Meshes

    This preset merges the meshes within each component (in the prototype library) and removes leaf level xforms.

    • Stages with many meshes in each prototype.

    • Stages with important hierarchies that need to be preserved up to the instance level.

  2. Stage Optimization

    These presets remove instancing and prototype hierarchy structures and will aim to optimize the entire stage.

    Name

    Description

    Workflow / Applications

    Modify Stage - Deduplicate Materials and Meshes

    Detects duplicate meshes and turns them into instances. This should result in faster stage load times, faster translation to the renderer and lower memory requirements.

    Note: This preset introduces reference arcs across meshes in different prototypes to de-duplicate them. This may make the scene more complex and a bit harder to work with.

    Stages with many duplicate meshes across the hierarchy, which are not already instanced.

    Modify Stage - Move Materials to /Looks

    Prototypes may often contain duplicate materials in each prototype. This can make it difficult to modify materials easily as they exist multiple times in the hierarchy.

    The Scene Optimizer extension can be used to address this issue by:

    1. De-duplicating all materials in the Prototype hierarchies.

    2. Moving the de-duplicated materials under a single scope /World/Looks.

    Stages with many instances and prototypes containing duplicated materials.

    Modify Stage - Merge Meshes

    Simplify and flatten the hierarchical complexity of the stage drastically, at the cost of addressability and memory.

    It merges small meshes into bigger meshes and moves materials into /World/Looks.

    1. De-instance

    2. De-duplicate Materials

    3. Move materials to /World/Looks

    4. De-instance

    5. Merge under /World/Geometry/merged

    6. Delete hidden prims

    7. Prune leaves

    8. Set pivots

    Architecture and Process Data with complex scene Hierarchies that can be simplified.

    Modify Stage - Spatial Merge Meshes

    Similar to the Merge Meshes preset, but merges all meshes regardless of materials based on a defined bounding volume. Users may want to change the size of the controls to yield different results of the merge operator.

    This is a very effective preset which can drastically reduce the scene complexity.

    Architecture and process data with complex scene hierarchies that can be simplified.

Integrations

The scene optimizer is also available in the following integrations:

Standalone Application
  • A command line tool that offers faster load times and is convenient for scripting to process multiple files.

Revit Connector
  • A direct Revit integration that utilizes the core optimization libraries found across scene optimizer operations.

Creo Connector
  • A direct Creo integration that utilizes the core optimization libraries found across scene optimizer operations.

Archicad Connector
  • A direct Archicad integration that utilizes the core optimization libraries found across scene optimizer operations.