Operations

The following is a list of optimization modules currently supported by the scene optimizer, with a brief description of the functionality provided.

  • Compute Extents
    • Compute and author the extent property for Meshes. If the meshPrimPaths option is empty, compute for all prims in the stage.

  • Compute Pivot
    • Center mesh at centroid in canonical orientation.

  • De-duplicate Geometry
    • Convert identical meshes into instances.

  • Find Coinciding Meshes
    • Identify meshes that share the same location based on a tolerance metric.

  • Generate Projection UVs
    • Generate texture coordinates for meshes using various projection methods.

  • Merge Static Meshes
    • Merge individual meshes. There are many options to control merge behavior, for example whether to merge all meshes or merge only meshes with the same material.

  • Optimize Materials
    • Run operations to optimize materials in a stage.

  • Optimize Skeleton Roots
    • Merge all meshes for meshes attached to a skeleton. This can greatly improve character playback speed by optimizing scenes for GPU skinning computation.

  • Optimize Time Samples
    • Remove redundant time-samples from attributes in a stage.

  • Prune Leaf Xforms
    • Prune unnecessary leaf grouping prims (Scope, Xform) from a stage.

  • Python Script
    • Execute a user defined python script with access to the current USD stage.

  • Split Meshes
    • Split disjoint meshes into multiple mesh prims.

  • Utility Functions
    • Help functions to pre-process components for scene optimizer operations.

Compute Extents

This will compute/recompute and author the extents property for meshes. If the meshPrimPaths option is empty, all prims in the stage will be computed.

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 operation on an imported stage can potentially help improve overall render and stage traversal performance.

../_images/ext_scene_optimizer_computeExtents_arguments.png

Argument

Description

Static Meshes To Compute

Defines the meshes to operate on.

Note

If left blank, all meshes in the scene will be considered (default setting).

Compute Pivot

Compute Pivot will place the parent transform at the center of the bounding box of the target mesh, think of this as creating a center pivot in other DCC tools. 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.

../_images/ext_scene_optimizer_pivot_arguments.png

Argument

Description

Meshes To Process

Defines the meshes to operate on.

Meshes can be selected in USD Composer and added here using the Add button, or names can be typed in directly. Wildcards can be used.

Note

If left blank, all meshes in the scene will have their pivot computed.

De-duplicate Geometry

This will replace multiple duplicate meshes in a scene to a single mesh and create references/instances to the single mesh prim. Since a referenced mesh uses less memory than the full duplicated mesh, this option can reduce system memory and vram consumption.

This process is only effective if there are meshes that are identical but are not already instanced, so you may find this optimization may not have any effect on your scene. To see what optimizations will take place, we will want to utilize Window -> Utilities -> Statistics window to see before and after the optimization metrics.

../_images/ext_scene_optimizer_deduplicateGeometry_arguments.png

Argument

Description

Geometry to De-duplicate

Defines the meshes to operate on.

Meshes can be selected in USD Composer and added here using the Add button, or names can be typed in directly. Wildcards can be used.

Note

If left blank, all meshes in the scene will have their pivot computed (default setting).

Consider Deep transforms

When enabled (default) this will look for duplicate meshes where point values have been uniformly transformed.

Tolerance

Acceptable point position change during deduplication. The value is a stage unit and before and after point positions are compared in world space.

Caution

The meaning of this argument changed in version 105.0.6, values of 0.001 prior to the change should be updated to 0.05 to achieve similar results.

Method

Determines which operation to use when processing inputs.

Options:

  • Copy Values
    • From the RTX renderer perspective within Omniverse, the copy values option will create a new transform matrix to the meshes and copy the points and normals values from the original mesh to the renderer. This won’t reduce the number of prims in the USD stage, but will help ensure the render can identify more available duplicate meshes.

  • Reference
    • Reference will find meshes that are identical, when considering deep transforms, then removes all but one of the Meshes and will create referenced instances to the single mesh prim. Like with the copy values option a new transform is added to ensure matching world space positions. This ensures that the targeted meshes are de-duplicated by the renderer, but also reduces the number of times duplicate data exists in the USD files on disk.

  • Instanceable Reference (Default)
    • Instanceable Reference has the same behavior as the reference option, but will mark the targeted prims as instanceable. This means that the resulting meshes cannot be edited and will reduce the number of unique prims defined in the USD stage. This is the default setting for the Deduplicate geometry process.

Caution

Multiple De-duplicate Geometry processes run in succession can lead to unreliable results and possible kit instability. It is recommended to run this process with the default settings to achieve the best results.

Find Coinciding Meshes

Find meshes that occupy the same positional space in a scene.

../_images/ext_scene_optimizer_find_coinciding_meshes.png

Argument

Description

Meshes to Consider

Defines the mesh prims to consider when looking for coinciding geometry.

Tolerance

Tolerance value when comparing points in world space. Tolerance is the max distance between points in world space using stage units.

generated report

Results will be displayed in the generated report tab

Generate Projection UVs

This operation generates texture(UV) coordinates for mesh prims, using the chosen projection type, and adds them as the st primvar.

../_images/ext_scene_optimizer_generateProjectionUV_arguments.png

Argument

Description

Meshes

Determines which meshes to generate UVs for.

Meshes can be selected in USD Composer and added here using the Add button, or names can be typed in directly. Wildcards can be used.

Note

If left blank, all meshes in the scene will be considered (default setting).

Projection Type

Determines what type of projection is to be used.

Options:

  • Planar
    • UV coordinates are obtained by projection along the Y axis.

  • Spherical
    • Spherical projection, using a sphere of unit radius centered at the origin, with the poles placed along the Y axis.

  • Cylindrical
    • Cylindrical projection, using a cylinder of unit radius, with axis of symmetry along the Y axis.

  • Triplanar
    • Projection of each face into one of XY, YZ, or ZX planes. The choice minimizes the angle between directions respectively orthogonal to the plane and to the face. Note that flipping the winding of a face does not alter its associated UVs in this projection type.

  • Cube (Default)
    • Similar to triplanar, but with the winding of the texture coordinates corrected (by mirroring across the U or V axis) if the angle between the normals of the face and the corresponding coordinate plane is obtuse.

Use World Space Scales

Determines whether to scale the source geometry to its world space dimensions before projection.

Scale Factor

Apply a different scale factor to the generated UVs, higher numbers will increase texel density(more repeating tiling) and lower numbers have less density(less repeating tiling).

Note

1.0 is set to cm scale, set 0.01 for meter scale. Scale as needed for stage requirements.

Merge Static Meshes

The merge static meshes process replaces multiple meshes that share common properties with a single merged mesh. This reduces scene prim count and can improve overall stage performance.

Caution

Once merged, you can no longer edit individual original meshes, but only the new merged mesh prims.

../_images/ext_scene_optimizer_merge_arguments.png

Argument

Description

Static Meshes To Merge

Defines the meshes to operate on.

Meshes can be selected in USD Composer and added here using the Add button, or names can be typed in directly. Wildcards can be used.

By default, Merge Static Meshes will skip any invisible prims. However if you specify an explicit path to an invisible prim here then that prim and any of its children will also be considered for merging. This is to allow supporting “Geometry Libraries”, where a scene may be structured with a number of invisible meshes that are referenced elsewhere in the scene.

Note

If left blank, all meshes in the scene will be considered (default setting).

Consider Materials

Defines how meshes with different materials are handled.

If this option is selected, meshes with the same material will be merged. If not selected, all meshes will be merged regardless of original material.

Materials will be preserved on the output mesh and assigned to individual faces using geomSubsets.

Compute Display Colors

Set display color and opacity to values computed from the bound material.

The assign display color option will look at the following USD prim attributes on either the material or the surface shader currently assigned to the source mesh prim or prims:

  • inputs:displayColor

  • inputs:diffuseColor

  • inputs:diffuse_color_constant

Opacity will be derived from inputs:opacity attribute from the bound material or surface shader.

This option is disabled by default.

Note

We currently don’t support deriving any of this information from texture inputs that are connected to bound materials. And if no value is present we will set the value of the color to 0.2, 0.2, 0.2 or neutral gray and the opacity to 1.

Original Mesh Handling

What to do with any meshes in the original scene that were merged.

They can be ignored, deleted, deactivated or hidden.

Merge Boundary

Defines where the merged geometry should be parented.

Options:

  • Stage (Default)
    • Parent at the root of the stage - /merged

  • Root Prim
    • Parent under the root prim defined in the USD stage - /Root/merged

  • Parent Prim
    • Use the first prim parent

  • Parent Xform
    • Use the first xformable parent

  • Kind: Assembly
    • Use the first parent of kind assembly

  • Kind: Group
    • Use the first parent of kind group

  • Kind: Component
    • Use the first parent of kind component

  • Kind: Model
    • Use the first parent of kind model

  • Kind: Subcomponent
    • Use the first parent of kind subcomponent

For more information on USD Kinds:

https://openusd.org/release/api/kind_page_front.html

https://openusd.org/release/glossary.html#usdglossary-kind

Output Name

The name prefix to use for newly created merged meshes.

Can also be a partial path, eg MyMeshes/Merged.

Strict Attribute Mode

Makes the merge process more conservative, requiring every attribute on a prim to match, rather than a smaller list of attributes that are known to prevent merging. This is intended to be useful in the case that meshes should not be merged together due to attributes that aren’t understood by Merge.

Allow Single Meshes

When enabled, means that a single mesh will still be “merged”. While there is nothing for it to merge with it means it will be processed and potentially moved to the same location as other merged meshes.

Spatial Clustering Mode

Whether or not to spatially cluster meshes.

There are currently two modes available:

  • Bounding Box

    If enabled, meshes will only be merged if they are close together. The Spatial Threshold and Spatial Max Size arguments allow you to fine-tune the behavior.

    The general approach is to cluster meshes together as long as they are within a certain distance from each other, but limit the merged output meshes to a maximum size. This provides a way to merge parts of the scene in to smaller chunks where there is no other method by which to do so (for example, using a Kind).

    The current spatial merging algorithm is fairly naive. For each input mesh a new cluster is started, consisting of only that mesh. A search is done to find any neighboring meshes - that is, any meshes that are within the Spatial Threshold of the input mesh. Those neighbors form a queue, and each is checked in turn to see whether the combined bounding box of the current cluster and the neighbor would exceed the Spatial Max Size argument.

    If not, the neighbor is included in the cluster, and in turn its neighbors are then added to the queue. This continues until either there are no more neighbors or each neighbor that is checked would cause the cluster to exceed the maximum size, exhausting the queue. The process is then repeated for the next input mesh, skipping any that have already been clustered.

    This is a straightforward method that can produce reasonable results depending on the scene. A limitation of the approach however is that the results are largely based on how the scene is authored. As the meshes are simply iterated in the order they are found you would get potentially different results if the order of traversal changed. In particular, the first mesh that is encountered will always be the starting point of the first cluster, and currently that is purely down to scene ordering.

  • Vertex Count

    This is a simpler clustering mode. We generate an overall BVH (tree) of the meshes in the stage, based on their bounding boxes, and then walk this until we find a branch of the tree with fewer vertices than the specified Spatial Vertex Count argument. Those meshes are then merged together.

Note

Spatial Clustering only happens within Merge Boundaries.

Spatial Threshold

The distance between which two meshes can be considered close enough.

Spatial Max Size

The maximum size of an output mesh when clustering meshes spatially.

Spatial Vertex Count

The maximum number of vertices that we can cluster together.

Merge Results (Report)

Note

A report will be generated by default when any Scene Optimizer operation is executed from core version 105.1.8 and newer. The report can be turned off in the Configure Menu by disabling Generate Report option.

merge report stats

In the merge stats results there is the option to view the Merge Results which will give a detailed view of how prims were merged.

merge report detail view

Merge Results with attribute information about prims to be merged and resulting merged output details.

Optimize Materials

Run operations to optimize materials in a stage. Run this optimization to replace duplicates with references to unique materials. This can reduce memory usage and also improve performance.

../_images/ext_scene_optimizer_optimizeMaterials_arguments.png

Argument

Description

Materials to Optimize

Determines which materials to modify, are able to target subsets.

Materials can be selected in USD Composer and added here using the + option, or names can be typed in directly. Wildcards can be used.

Note

If left blank, all materials in the scene will be considered (default setting).

Method

Determines which operation to use when processing inputs.

Options:

  • Deduplicate (Default)
    • Attempt to remove duplicate materials, rebinding any affected prims to a single common material.

  • Convert To Color
    • Find materials that can be replaced with a simple displayColor primvar, author it on the meshes and delete the materials.

  • Remove Unbound
    • Find any materials that are not bound to anything (i.e, unused) and remove them.

Optimize Skeleton Roots

This operation will merge all meshes for meshes attached to a skeleton. This can greatly improve character playback speed by optimizing scenes for GPU skinning computation.

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

../_images/ext_scene_optimizer_optimizeSkelRoots_arguments.png

Optimize Time Samples

This operation checks for redundant time-samples on attributes and removes them.

../_images/ext_scene_optimizer_optimizeTimeSamples_arguments.png

Argument

Description

Prim Paths

Defines the prims to check.

Prims can be selected in USD Composer and added here using the Add button, or names can be typed in directly. Wildcards can be used.

Note

If left blank, all prims in the scene will be considered (default setting).

Remove Interpolated

If enabled this means any time-samples that are different but can be linearly interpolated will also be removed.

After using this option, playing back a stage set to UsdInterpolationTypeLinear will look the same but if the stage is set to UsdInterpolationTypeHeld then it may play back differently. This is due to having removed the interim samples that can be interpolated, thus having no explicit samples to “hold”.

This option only applies to floating-point types for which USD supports interpolating timesamples:

https://openusd.org/dev/api/interpolation_8h.html#ae1d252a3278800a696ca4707e6b6a3e7

Epsilon (Double)

The epsilon to use when considering whether two double values should be treated as equal even though they are different by some small amount, to account for floating-point precision differences.

Epsilon (Float)

The same as Epsilon (Double) but for float types. Typically this is smaller due to floating-point precision issues with floats vs doubles.

Prune Leaf Xforms

This operation finds and prunes any leaf grouping primitives found in a stage (for example Xform, Scope).

../_images/ext_scene_optimizer_pruneLeaves_arguments.png

Argument

Description

Prim Paths to Search

Search for empty grouping primitives on these paths (inclusive). Wildcards can be used.

Note

No grouping primitives above the specified paths will be considered for pruning, even if they end up being empty as a result of this operation.

Note

If left blank, all paths in the stage will be considered (default setting).

Method

Delete or deactivate any leaf prims that are found.

Python Script

This operation executes user defined python code with access to the current stage. It can be used to manipulate the stage in ways not currently supported by the Scene Optimizer. The python script can be stored in the Preset configuration file, making it reusable and portable.

../_images/ext_scene_optimizer_pythonScript_arguments.png

Argument

Description

Python Script

The python code to run when executing this operation.

The following variables will automatically be available during execution:

  • stage: The pxr.Usd.Stage object the holds the Stage to be operated on.

Note

This is a python only feature and cannot be used from the Standalone application.

Caution

This operation is not available for custom code execution in USD Explorer.

Split Meshes

This operation determines whether meshes in a stage contain multiple disjoint mesh descriptions, specifically parts of a mesh that don’t share any vertices. These can then be replaced with multiple mesh prims that contain just their part of the geometry.

../_images/ext_scene_optimizer_splitMeshes_arguments.png

Argument

Description

Meshes to split

Determines which meshes to operate on.

Meshes can be selected in USD Composer and added here using the Add button, or names can be typed in directly. Wildcards can be used.

Note

If left blank, all meshes in the scene will be considered (default setting).

Split On

Determines how to attempt splitting meshes.

Options:

  • Vertices (Default)
    • Analyze the geometric data of meshes to determine whether they are disjoint.

  • Geom Subsets
    • Split meshes based on any UsdGeomSubset children they contain.

Method

Determines what to do with any disjoint meshes that are found.

Options:

  • Meshes (Default)
    • When disjoint Meshes are found, new Meshes containing only their geometry will be created.

  • Geom Subsets
    • A debug option. This method will create GeomSubsets with Materials using random colors in order to visualize the disjoint parts of a mesh.

Weld Points

If enabled, duplicate vertices described in the mesh will be compressed and re-used in faceVertexIndices.

Utility Functions

This operation contains a number of smaller functions that don’t necessarily need a full operation of their own. Generally this would mean they are a simple process that does not require any real configuration.

../_images/ext_scene_optimizer_utilityFunction_arguments.png

Argument

Description

Prim Paths

Defines the prims to operate on.

Prims can be selected in USD Composer and added here using the Add button, or names can be typed in directly. Wildcards can be used.

Note

If left blank, all prims in the scene will be considered (default setting).

Function

The utility function to run. The current available functions are:

  • Deinstance
    • Sets instanceable to False for any prims that have it enabled

  • Flatten Primvars
    • Convert indexed primvars to non-indexed primvars

  • Unbind Materials
    • Unbind any bound materials

  • Set Instanceable
    • Looks for prims that reference others, with no modifications, and enables the instanceable flag