What Options Should I Choose?#

Scene Optimizer has a range of operations and options that can be applied to a scene. These operations can be used as a single operation or combined together to make a processing stack. Determining which operations and options to pick is not always easy. This depends on the specific components of the scene and the type of optimizations that can improve the desired end user workflow. This guide offers some guidelines for how to approach optimizations and why these choices might be helpful to improving the overall user experience.

Consider What To Solve#

The first step is to consider what problem you are trying to solve. There can be a number of problems with large complex scenes, for example:

  • Scene uses too much memory, either system memory or video memory

  • Scene is too slow to interact with, either tumbling the camera or playing back animation

  • Load time

Improving Memory Usage#

If the scene uses too much memory, look for optimizations that reduce the resources needed by the scene. Specific operations that can help reduce memory are listed below.

Deduplicate Geometry#

This replaces multiple copies of meshes with a single instance prototype plus references to the original prototype prim. Since a reference to a copy needs less memory than the full mesh, this option can reduce memory usage. It can affect both system memory and GPU memory, since the meshes are stored in both places.

Note

This is only effective if there are meshes that are identical but are not already instances. This optimization may have no effect on your scene. To check, look at the report created in the Scene Optimizer UI window to see the output log of the optimization. There are utility operations that can help deinstance applicable prims if new instance prototypes are preferred.

Optimize Materials#

If a scene has a large number of materials, it is possible there could be duplicate materials. Run this optimization to replace duplicate materials with references to unique materials. This can reduce memory usage and also improve performance.

  • Convert to Color

    This is an option on Optimize Materials that replaces materials with color per vertex. If there are a lot of materials in the scene this will significantly reduce prim count, speeding up loading and interactivity. Resolving MDLs can be slow so using colors instead can greatly reduce load times, although of course there will be no material shading, only colors.

Improving Interactive Performance#

If the scene has poor interactive usage performance (low FPS), look for optimizations that reduce the number of prims or mesh complexity in the scene. A large number of prims in the scene can affect performance significantly. Specific examples include the following operations:

Merge Static Meshes#

This replaces multiple meshes that share common properties with single meshes. This reduces scene prim count, and can improve interactive performance. Note that because the total amount of geometry does not change, this option will not reduce memory consumption. This operation has additional options to define a specific merge boundary to output the resulting merged mesh.

Meshes can be clustered and merged spatially as an option in the process that can improve render performance by creating new bounding boxes set to the defined spatial boundary thresholds. This option is also available within the Split Meshes operation to reduce reprocessing with multiple Scene Optimizer operations.

Caution

Once meshes are merged, you can no longer edit individual original meshes, only the new merged mesh prims. Meshes can be split again using Split Meshes Operation.

Decimate Meshes#

Reducing mesh complexity and face count can be an easy way to improve interactive scene performance and reduce memory usage of the input stage. Meshes can be decimated by an overall reduction percentage or a defined tolerance based on the input mesh and guided by normals to retain original mesh features. Decimation can also help reduce overall memory usage.

Find Hidden Meshes#

If there are meshes that exist in the stage, but aren’t visible to the camera due to their world position in the stage, this operation can be helpful in identifying meshes to deactivate or make invisible to improve load times or FPS.

Optimize Skeleton Roots#

This is good option to try if you have rigged characters that use UsdGeomSkel. It will merge all meshes on the skeleton into a single mesh. As above, this will not significantly reduce memory usage.

Note

If a scene has high loading times, reducing the memory the stage consumes can speed up scene evaluation by Kit applications. This can improve the time it takes to load and render a scene in targeted Kit applications.

Other Tools#

These operations do not directly affect scene performance, but may affect usability and workflows:

Compute Pivot#

This will place the parent transform at the center of the bounding box of the mesh or xform. This makes it easier to interact with objects in the scene because the transform manipulator is centered on the object. Some tools generate scenes where the transform is at the origin, meaning it is far from the actual vertices, making it hard to move a mesh precisely.

Compute Extents#

Extents are the axis aligned bounding boxes of the meshes. These do not always exist in a USD file. The extents can be used to improve scene performance since they allow the application to know the exact bounds of an object. Running this option on an imported scene can therefore potentially help performance.

Advanced Functionality#

Python Script#

This operation will execute python code with access to the USD Stage. Users can add custom logic to the their data, create optimization stacks specific to their needs, and make them available for others via JSON config files. This allows users to work with scene optimizer processes without needing to run code on the stage via the script editor first.

Split Meshes#

Splitting meshes can be helpful in debugging and finding spatial outliers in the stage. Using the Spatial Clustering Mode, meshes will be split and merged spatially by user specified values. This also greatly improves processing performance when running in this mode to split and merge meshes in a single process verses running each operation separately. This approach can help with render performance by creating smaller bounding volumes than previously were present prior to optimization. The Spatial Clustering Mode is also available in Merge Static Meshes

Mesh Cleanup#

If there are poorly constructed geometries in the stage, it can affect how renderers interpret the mesh and overall render performance will be slower with these bad meshes. Mesh Cleanup can merge vertices and make meshes manifold which can potentially improve render performance.

Note

Asset Validator can help identify any potential incompatible meshes with the available rule checks.

Remesh Meshes#

If a problematic mesh exists in the stage, using the remesh meshes operation will generate a new topology for any specified input mesh prim. This can be helpful if a mesh is not rendering or performing as intended from the original source tools. This operation used with decimation can be an effective way to clean and optimize any geometry to improve overall performance.

Summary of Expected Performance Improvements#

Optimization

Performance Benefit

Process

Options

Load Time

CPU RAM

GPU RAM

FPS

Merge Meshes

By Selection

Slight

N

N

Y

Merge Meshes

By Material

Slight

N

N

Y

Merge Meshes

Rigid Body

Slight

N

N

Y

Merge Meshes

By Skeleton

Slight

N

N

Y

Merge Meshes

By Spatial Clustering

Y

N

N

Y

Decimate Meshes

Tolerance/ Reduction Percentage

Y

Y

Y

Y

Deduplicate Geometry

Instances

Y

Y

N

Slight

Optimize Materials

Deduplicate

Y

Y

Y

Y

Optimize Materials

Convert to Color

Y

Y

Y

Y

Inspecting The Results#

To see what changed in the scene after optimization, switch to the generated report tab in the scene optimizer UI and inspect the output log generated by each operation. Another way to see changes to the loaded stage within Kit is to open the Statistics window (Window>Utilities>Statistics) to see before and after scene metrics.

Measure the original scene’s baseline hardware usage and current runtime performance to gauge the desired components to be improved:

  • If reducing memory was the goal, inspect the viewport stats display that shows the current system and GPU memory usage of the loaded scene. If the resulting scene after the optimization processes shows lower memory usage, take note to compare to the original statistics.

  • If improving performance was the goal, note the original FPS and/or playback speed. Compare these two values for the original scene and after the scene optimizer processes.

Note

Enabling the FPS in the viewport can aid in determining runtime improvements, ensure it is set to No Pacing to remove any frame rate limiters.

If the specified optimization is not beneficial, try another optimization on the original scene to see if there are any data improvements.

Try Fixing in Source Data Application#

scene optimizer may also indicate problems that can be solved in the source data. For example, if the deduplicate option is able to replace a lot of geometry with instances, it may be that there was a problem when the asset was originally created. If possible, replacing geometry with instances in the source tool where the assets were generated can have the additional benefit of improving the performance of the original source data.

Use Caution#

Some optimizations can impact scene performance in positive and negative ways. For example, merging meshes that were originally instances will increase memory usage since each instance must be converted into a new geometry prim and can take up additional memory. This means it is important to decide upfront what tradeoffs are acceptable for the end user consuming the data. If increased memory usage is acceptable to achieve a higher frame rate, then an operation like this is still worthwhile.