Using The Scene Optimizer#
Finding The Extension#
Note
This extension is enabled by default in USD Composer/Explorer applications 2022.3.0 and above.
Caution
As of kit 106.0.1 release this extension is apart of the sample app templates. If you are using the kit_base_editor, the scene optimizer extension dependencies will need to be added in the kit_base_editor.kit
file. More information can be found here: Kit App Template.
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 if applicable, otherwise they need to be added/removed from your Kit application <my_app_name>.kit
file.
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:
- 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.
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.
Editing Prim Paths#
Some processes can have a list of prim paths or regular expressions specified in order to restrict what they operate on:
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.
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:
- 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:
Enables Instancing on internal references.
Prune Xforms - Removes Xforms which do not have any child.
Compute Extents - Ensures that mesh prims have valid extent attribute values.
Generate projection UVs - If UVs are not found on a mesh, they will be created via Box projection.
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.
- 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:
De-duplicating all materials in the Prototype hierarchies.
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.
De-instance
De-duplicate Materials
Move materials to
/World/Looks
De-instance
Merge under
/World/Geometry/merged
Delete hidden prims
Prune leaves
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.