Operations#

The following is the catalog of optimization operations provided by Usd Optimize. Each operation is identified by a string key (shown with each entry) and declares a set of typed arguments that are supplied as a JSON object / Python dictionary.

For almost every operation, a paths (or meshPrimPaths / primPaths) argument selects which prims to process. If left empty, the whole stage is processed. Path expressions are supported.

Caution

Operations work against the current set of selected variants. To optimize multiple variants, apply optimizations to each variant individually — for example by externalizing the contents of each variant to separate USD assets, optimizing each, and referencing the results back into the desired variant compositions.

Note

Native CLI vs. Python host. Most operations are built-in (C++) plugins available everywhere Usd Optimize runs. Four operations — pythonScript, deleteHiddenPrims, removeUntypedPrims, and moveMaterials — are implemented as Python plugins. These require a Python-hosted runtime and are available through the usd-optimize Python wheel / bindings, but not from the standalone bin/usdOptimize CLI, which does not initialize a Python interpreter. Invoking one of them from the native CLI reports invalid operation specified. See Command Line Interface Tool and Usd Optimize Python API.

Operation

Description

Auto UV Unwrap

Generate texture coordinates for meshes using unwrap methods with low distortion.

Box Clip

Clips mesh prims to the provided world-space axis-aligned bounding-box.

Compute Extents

Compute and author the extent property for meshes.

Compute Pivot

Center mesh at centroid in canonical orientation.

Count Vertices

Create a report of prims with excessive vertex counts.

Decimate Meshes

Reduce tessellation density for mesh prims.

Deduplicate Geometry

Convert identical meshes into instances.

Deduplicate Hierarchies

Find duplicate prim hierarchies and replace duplicates with instances.

Delete Hidden Prims [Python only]

Deletes all prims that are constantly hidden.

Delete Prims

Deletes prims from a stage.

Dice Meshes

Dice meshes to a given regular grid or an irregular one.

Edit Stage Metrics

Set the metersPerUnit and/or upAxis of a stage.

Find Coincident Geometry

Identify geometry that share the same location based on a tolerance metric.

Find Flat Hierarchies

Finds prims that have more than a specified number of children.

Find Occluded Meshes

Finds meshes that are globally occluded meaning they are occluded from any camera that does not cross meshes in the scene.

Find Overlapping Meshes

Finds meshes that overlap with each other and displays the overlapping regions for selected meshes.

Fit Primitives

Replace meshes in a stage with transformed primitive geometries (sphere, cylinder, cone, or cube) if they can be fit within tolerance.

Flatten Hierarchy

Finds and removes redundant Xforms to reduce prim count.

Generate Normals

Generate normals for meshes.

Generate Projection UVs

Generate texture coordinates for meshes using various projection methods.

Generate Scene

Generates a USD stage to use for benchmarking and testing using reference prims from the incoming stage.

Manifold Meshes

Makes mesh Manifold.

Merge Static Meshes

Merge individual meshes.

Merge Vertices

This operation merges vertices that are closer to one another than a given tolerance, followed by removing any degenerate faces and optionally making the resulting mesh be manifold and/or removing any isolated vertices.

Mesh Cleanup

Applies various cleanups to meshes.

Move Materials [Python only]

Moves all materials under a prim location such as “/World/Looks” and can also set the root prim of the path (e.g. “/World”) as the default prim

Optimize Materials

Run operations to optimize materials in a stage.

Optimize Primvars

Flatten or index primvars, or check whether they can be simplified, for example reducing from faceVarying to uniform..

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.

Organize Prototypes

Reparent internal scene-graph instance prototypes under a user-specified namespace.

Primitives to Meshes

Replace gprim types sphere, cylinder, cone, or cube in a stage with a mesh approximation.

Prune Leaves

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

Python Script [Python only]

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

RTX Mesh Count

Analysis operation for counting the number of RTX Meshes in the stage and how many are unique.

Remesh Meshes

Remesh existing mesh prims to user defined tolerance.

Remove Attributes

Remove attributes from prims

Remove Prims

Finds various prims that can be removed from that stage.

Remove Small Geometry

Identifies and removes small and/or degenerate geometry from a USD stage.

Remove Untyped Prims [Python only]

Removes untyped prims that are not under /Render.

Remove Unused UVs

Remove unused UV primvars.

Shrinkwrap

Convert meshes to a level set volume and extract a watertight mesh. Useful for closing holes, simplifying topology, and creating LODs.

Sparse Meshes

Hidden operation used for analyzing the sparse meshes of a scene and suggesting optimizations

Split Meshes

Split disjoint meshes into multiple mesh prims.

Stats

Collect and display statistics about the contents of a USD stage

Subdivide Meshes

Apply Catmull-Clark or Loop subdivision iterations to meshes.

Triangulate Meshes

Converts polygonal meshes to triangle-only meshes.

Utility Function

Helper functions to pre-process components for Usd Optimize operations.