Omniverse Usd Performance Tuning
NVIDIAOfficialCreated by NVIDIA Omniverse
- Skill
- Workflow
- Software development
- Apache-2.0
- Medium risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured workflow for diagnosing and optimizing USD stages. It focuses on improving performance metrics like load times, memory footprint, and frame rates by identifying and optimizing unique asset definitions, reusing shared definitions, and pruning unnecessary data. The process emphasizes preserving original asset boundaries, animation, and interface requirements, ensuring that downstream applications remain functional after optimization.
What it does
- Inspects USD stages to identify performance bottlenecks and structural inefficiencies.
- Classifies assets into atomic, package, or aggregate structures to guide optimization.
- Performs native USD optimization operations on disjoint scopes.
- Publishes semantic libraries to enable efficient asset reuse.
- Validates composition, ownership, and interface accessibility of the optimized output.
- Profiles the final output against the original baseline to report measured improvements.
When to use it
- When a USD stage suffers from slow loading times or high memory consumption.
- When rendering performance (FPS) needs improvement in a production environment.
- Before finalizing a USD assembly for downstream consumption.
- When you need to standardize asset structures according to factory-level guidelines.
Advantages
- Maintains asset boundaries and critical metadata during optimization.
- Reduces scene complexity through intelligent reuse of shared definitions.
- Provides verifiable reports on performance gains and composition integrity.
- Supports large-scale scene optimization by processing independent definition scopes.
Usage examples
- “Inspect the USD stage at /data/factory.usdc for performance issues and prepare a review workspace.”
- The agent initializes the workspace, runs the inspection script, and provides a summary of candidates for optimization.
- “Submit the optimization decisions for the factory stage based on the generated JSON.”
- The agent processes the boundary decisions, executes the optimization operations, and generates the final optimized USD assembly.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/nvidia/omniverse-usd-performance-tuning/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip omniverse-usd-performance-tuning.zip -d .agents/skills
Documentation by NVIDIA Omniverse
Omniverse USD Performance Tuning
Purpose
Improve loading, memory use or rendering for the requested workload. Preserve the prim paths, appearance, placement and behavior required by downstream applications. Follow the component/subcomponent model in NVIDIA's Factory-Level USD Structuring guide. Apply the relevant parts of that model; a static asset does not need new animation or physics.
Inputs
Required: the source USD stage. When no workload is specified, use factory layout planning and visualization and record that assumption in the request/report. Explicit workload and preservation requirements take precedence. Optional: an output workspace, preservation requirements, physical error budget, existing library indexes and recorded runtime evidence. Use values from the current user request; reuse recorded values only while they remain applicable. Follow setup when no output path is supplied.
Prerequisites
Verify the selected runtime and required capabilities using setup. Keep its preflight record with the run; installation and remote access are conditional steps described there.
Instructions
Inspect. Establish the workload, preservation requirements and output workspace. Set up progress and dashboard access before assessment. Verify setup and inspect the selected source configuration.
Judge boundaries. Review equipment, service-system sections and architectural elements in the selected configuration, including animation and interiors. Record owners, editable interfaces, equipment categories and optional families using boundary guidance.
Classify and author. Classify accepted assets children before parents. Capture or reuse the original profile before authoring. Prepare reusable definitions, materials and occurrence opinions using asset authoring.
Optimize unique definitions. Run supported native operations concurrently on disjoint scopes with the recorded physical budget.
Publish semantic libraries. Use one writer per category layer and remap consumer references.
Check composition. Check authored ownership, references, bindings, placement, animation and interface accessibility through the written-output checks.
Profile and report. Compare the final consumer with the original baseline under comparable conditions and report measured benefits, completion and operations by asset definition.
sequenceDiagram
participant A as Agent
participant T as USD tools
participant W as Definition workers
participant L as Library publisher
participant D as Read-only progress dashboard
Note over A,L: One compact progress state also renders text progress
T-->>D: Recorded phase, assessment rounds, counters and decision reasons
A->>T: Inspect original selected configuration
T->>T: Collect cached child-to-parent summaries and repetition nominations
T->>T: Load supplied indexes once and batch authored product clues
T-->>A: Product review groups, member context, animation and reuse evidence
loop Until boundaries and interiors are reviewed
A->>A: Select asset boundaries, then identify required internal prims and properties
A->>T: Submit boundary decisions with reviewed scope, required edits, category and optional family
T->>T: Reuse unchanged source evidence, recompute boundary-dependent results
opt Geometry ownership requires reconstruction
T->>T: Regroup or native split, remap paths and reassess affected regions
end
T-->>A: Remaining candidates and member exceptions
end
T->>T: Classify selected child assets before parent assets, confirm reuse
T->>T: Capture or reuse original baseline profile
T->>T: Confirm accepted product identities from source and supplied indexes; reconcile complete parent-child groups
T->>T: Skip worker inputs for confirmed groups; author remaining materials, editable prims and occurrence overrides
T->>T: Determine merge groups on prepared interiors; preserve selected child assets and required prims
T->>W: Read-only input USD layers for existing-library matching
par Independent preparation jobs
W->>W: Confirm remaining product, exact source or authorized normalized reuse; preserve occurrence placement
W->>W: Consolidate accepted product or compatible exact/normalized leaf inputs; retain every occurrence
end
W-->>T: Confirmed library hits and definitions requiring optimization
T->>W: Owned geometry prim paths in read-only input layers
par Independent definition scopes
W->>W: Remove small meshes when authorized; apply asset representation: reserve merge inputs or fit analytic prims; reduce, merge (native clustering if required), prune, flatten, prune
end
W->>L: Geometry outputs and assembly authoring outcomes
L->>L: Share eligible static whole definitions within current category publication
L->>L: Share remaining whole meshes; write USD reuse metadata and compact index
L->>T: Output USD stage with rewritten references and dependencies
T->>T: Check authored composition, ownership, animation and interfaces
T->>T: Profile final output USD stage and report results by asset definition
T-->>A: Measured changes, coverage and unresolved work
T-->>D: Final verdict and report/library pathsUse the provided tools for traversal, native operations, authoring and checks; the agent supplies engineering judgments. Preserve current variant selections, authored animation, required materials and interfaces. Trust supported USD Optimize operations with valid settings and scopes. Deep geometric comparisons and whole-scene edit trials belong in development tests, not ordinary execution.
Complete when every unique definition has an executed or evidenced unchanged outcome, every asset has justified ownership and structure, and the written consumer passes composition checks. Retain native failures, unresolved judgments and missing required capabilities as incomplete work. Repeat only affected work when evidence changes.
Scope and authorization
Diagnosis and validation requests remain read-only. An optimization request authorizes work in a separate output workspace within its stated preservation limits.
Never overwrite source layers or inherited libraries without explicit authorization.
Reuse authorization already given. Ask only for a missing decision that changes identity, required appearance or a loss budget; explain the affected component and consequence.
Report only observed changes. Measure rendering before claiming higher FPS or lower GPU use.
Load only the relevant guidance
| Request | Read |
|---|---|
| Validation only | Setup, then the validation section of operations |
| Approved operation chain | Setup, operations, verification |
| Existing or persistent asset library | Add the library index requirements to the assessment |
| Missing standalone runtime | Installation |
| Remote stage | Remote access before the first open |
| Report from completed evidence | Verification |
Use upstream package guidance for selected operation mechanics and proxy workflows. Keep large logs on disk as specified in setup.
Limitations
Convert CAD input with the source converter's workflow and NVIDIA's CAD conversion guidance. Render profiling requires NVIDIA/omniperf or the user's available profiler; USD open and traversal timings alone do not establish rendering improvements.
Troubleshooting
For unavailable imports, operations or remote assets, follow setup. For incomplete execution or failed composition checks, follow verification; retain the failed artifacts and report the missing capability or failed check.
Examples
After runtime preflight, use the verified Python interpreter from setup to inspect a stage:
python scripts/successor_assessment.py inspect --source /data/factory.usdc --workspace /data/factory-reviewReview the generated candidates using boundary guidance, fill the generated decision template, then submit it:
python scripts/successor_assessment.py decide --workspace /data/factory-review --decisions /data/factory-review/decisions.jsonThese commands perform assessment; continue through the instructions above only when review is complete. Run from the skill directory; generated data stays in the workspace.
Output Format
Maintain live progress and editable steering throughout execution.
For end-to-end optimization, provide the written USD assembly, validated report JSON, and generated Markdown and HTML reports. State the runtime, operations actually executed, preservation and coverage results, measured changes, source-write status, and artifact paths. Diagnosis-only work may return a findings summary stating that no optimized stage was written.
Files
- ATTRIBUTION.mdAdded by AutoGineer964 B
- BENCHMARK.md12.0 KiB
- CHANGELOG.md2.4 KiB
- LICENSELicence file added by AutoGineer11.2 KiB
- SKILL.md10.2 KiB
- agents/openai.yaml375 B
- assets/progress-dashboard/app.jsScript9.8 KiB
- assets/progress-dashboard/index.html2.4 KiB
- assets/progress-dashboard/styles.css3.8 KiB
- config/skillspector-baseline.yaml7.3 KiB
- evals/README.md1.8 KiB
- evals/evals.json12.4 KiB
- evals/files/completed-run/after.usda399 B
- evals/files/completed-run/before.usda399 B
- evals/files/completed-run/evidence.json745 B
- evals/files/factory/cases/factory.usda13.6 KiB
- evals/files/factory/materials.usda1.8 KiB
- references/asset-authoring.md10.1 KiB
- references/component_scope.pyScript18.0 KiB
- references/geometry_tolerance.pyScript2.1 KiB
- references/install-standalone.md2.4 KiB
- references/library-reuse.md7.6 KiB
- references/operations.md22.4 KiB
- references/operations/README.md7.9 KiB
- references/operations/operations.json52.4 KiB
- references/operations/registry-args.json2.1 KiB
- references/operations/scripts/operations.schema.json6.2 KiB
- references/optimization-report/scripts/apply_palette.pyScript13.3 KiB
- references/optimization-report/scripts/asset_results.pyScript5.9 KiB
- references/optimization-report/scripts/definition_verification.pyScript7.1 KiB
- references/optimization-report/scripts/descent_convergence_common.pyScript9.0 KiB
- references/optimization-report/scripts/optimization-report.schema.json39.4 KiB
- references/optimization-report/scripts/structure_conformance.pyScript15.2 KiB
- references/optimization-report/scripts/validate_report.pyScript55.2 KiB
- references/remote-assets.md1.6 KiB
- references/report-templates/optimization-report.html.template14.9 KiB
- references/report-templates/optimization-report.md.template6.2 KiB
- references/report-templates/render_preview.pyScript17.9 KiB
- references/report-templates/theme.css711 B
- references/setup-usd-performance-tuning/scripts/probe-snapshot.schema.json1.7 KiB
- references/setup-usd-performance-tuning/scripts/setup-preflight.schema.json6.4 KiB
- references/setup.md3.3 KiB
- references/structure.md20.8 KiB
- references/upstreams/usd-optimize.md6.3 KiB
- references/usd-optimize-run-operations/scripts/asset_authoring.pyScript54.9 KiB
- references/usd-optimize-run-operations/scripts/batch-plan.schema.json7.5 KiB
- references/usd-optimize-run-operations/scripts/category_publication.pyScript6.3 KiB
- references/usd-optimize-run-operations/scripts/current_run_reuse.pyScript11.6 KiB
- references/usd-optimize-run-operations/scripts/material_optimization.pyScript4.9 KiB
- references/usd-optimize-run-operations/scripts/material_publication.pyScript9.5 KiB
- references/usd-optimize-run-operations/scripts/native_reconstruction.pyScript7.9 KiB
- references/usd-optimize-run-operations/scripts/native_worker.pyScript68.4 KiB
- references/usd-optimize-run-operations/scripts/pack_definitions.pyScript1.6 KiB
- references/usd-optimize-run-operations/scripts/persistent_library.pyScript20.3 KiB
- references/usd-optimize-run-operations/scripts/persistent_reuse.pyScript31.1 KiB
- references/usd-optimize-run-operations/scripts/prim_regroup.pyScript14.9 KiB
- references/usd-optimize-run-operations/scripts/run_batch.pyScript32.5 KiB
- references/usd-optimize-run-operations/scripts/semantic_library.pyScript48.2 KiB
- references/usd-optimize-run-operations/scripts/shared_geometry.pyScript25.5 KiB
- references/usd-optimize-run-operations/scripts/status.schema.json7.9 KiB
- references/usd-structure-assessment/references/apply-restructure/scripts/apply-restructure-manifest.schema.json35.3 KiB
- references/usd-structure-assessment/references/usd-hierarchy-dedupe-candidates/scripts/instance_candidate_finder.pyScript12.7 KiB
- references/usd-structure-assessment/references/usd-mesh-fragmentation-candidates/scripts/mesh_fragmentation_finder.pyScript13.8 KiB
- references/usd-structure-assessment/scripts/atomic_placement.pyScript4.9 KiB
- references/usd-structure-assessment/scripts/audit-report.schema.json2.3 KiB
- references/usd-structure-assessment/scripts/boundary_reasoning.pyScript36.0 KiB
- references/usd-structure-assessment/scripts/discovery_preview.pyScript8.6 KiB
- references/usd-structure-assessment/scripts/optimization-plan.schema.json1.5 KiB
- references/usd-structure-assessment/scripts/structure_assessment.pyScript112.2 KiB
- references/usd-structure-assessment/scripts/usd-structure-assessment-report.schema.json14.0 KiB
- references/usd-validation-runner/references/validator-concepts.json35.8 KiB
- references/usd-validation-runner/scripts/usd_validation_executor.pyScript37.4 KiB
- references/usd-validation-runner/scripts/validation-report.schema.json3.5 KiB
- references/usd-validation-runner/scripts/validation-scope-note.schema.json2.6 KiB
- references/usd-validation-runner/scripts/validator-concepts.schema.json3.8 KiB
- references/verification.md11.9 KiB
- scripts/animation_context.pyScript6.8 KiB
- scripts/composition_verification.pyScript16.9 KiB
- scripts/failure_reporting.pyScript2.7 KiB
- scripts/product_clues.pyScript6.2 KiB
- scripts/progress_dashboard.pyScript12.6 KiB
- scripts/stage_profile.pyScript15.7 KiB
- scripts/successor_assessment.pyScript34.1 KiB
- scripts/successor_execution.pyScript15.7 KiB
- scripts/successor_progress.pyScript22.3 KiB
- scripts/successor_reconstruction.pyScript19.6 KiB
- scripts/successor_workflow.pyScript55.0 KiB
- scripts/usd_tuning.pyScript24.7 KiB
- skill-card.md5.5 KiB
- skill.oms.sig26.5 KiB
references/usd-optimize-run-operations/scripts/persistent_library.py
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
"""Look up persistent library nominations and write library metadata and indexes.
Lookup leaves published assets unchanged. write_index() authors metadata and
saves layers allowed by writable_layers, then writes index.json. rebuild_index()
reconstructs the index from published USD metadata.
Matching metadata describes the source before optimization. A nomination is not
geometry-preservation evidence; the caller verifies it against the new source.
"""
import copy
import hashlib
import json
import math
import os
import tempfile
from pathlib import Path
METADATA_KEY = 'usdPerformance:reuse'
def exact_key(matching):
fields = ('source_signature', 'root_transform_signature')
return hashlib.sha256(json.dumps([2] + [matching.get(k, '') for k in fields]).encode()).hexdigest()
def compact_matching(matching):
"""Compatibility metadata; operation reports never enter persistent delivery."""
assessment = matching.get('operation_assessment', {})
complete = matching.get('completed', False)
if assessment:
rows = assessment.get('categories', [])
complete = (assessment.get('complete') is True and
{r.get('category') for r in rows} == {'cleanup', 'primitive_fit', 'reduction', 'merge', 'reuse'} and
all(r.get('status') in ('executed', 'no_benefit', 'not_applicable', 'excluded') for r in rows))
return dict(record_version=4, exact_key=exact_key(matching) if matching.get('source_signature') else '',
source_signature=matching.get('source_signature', ''),
root_transform_signature=matching.get('root_transform_signature', ''),
tolerance_mm=matching.get('tolerance_mm', .1), completed=bool(complete),
resource_closure_complete=matching.get('resource_closure_complete', False),
identifiers=list(matching.get('identifiers', [])),
**{k: matching[k] for k in ('normalized_source_key', 'normalized_source_info', 'product_key', 'product_identity_json', 'structural_type', 'upAxis') if matching.get(k)})
def output_geometry(stage, root, child_paths=()):
"""Inventory the delivered definition, excluding retained child assets."""
from pxr import Usd, UsdGeom
children = tuple(child_paths)
return [str(p.GetPath()) for p in Usd.PrimRange(stage.GetPrimAtPath(root), Usd.TraverseInstanceProxies())
if p.IsA(UsdGeom.Gprim) and not any(str(p.GetPath()) == c or str(p.GetPath()).startswith(c + '/') for c in children)]
def expand_index(index):
"""Adapt compact addresses to the existing in-memory publication contract."""
if index.get('schema_version') != 2:
return index
result = dict(index, schema_version=1)
result['dependencies'] = {v['location']: v['fingerprint'] for v in index.get('dependencies', {}).values()}
result['entries'] = {}
for identifier, row in index['entries'].items():
lib = index['libraries'][row['library']]
result['entries'][identifier] = dict(row, layer=lib['layer'], fingerprint=lib['fingerprint'],
matching={'exact_key': row.get('exact_key'), 'identifiers': row.get('identifiers', []),
'normalized_source_key': row.get('normalized_source_key'), 'product_key': row.get('product_key')},
library_units=lib.get('metersPerUnit'), library_axis=lib.get('upAxis'),
library_time=lib.get('timeCodesPerSecond'), library_fps=lib.get('framesPerSecond'), compact=True)
return result
def write_index(directory, index, writable_layers=None, stages=None, finalize_layers=()):
"""Author metadata on owned definitions, then project a rebuildable index."""
from pxr import Usd, UsdGeom
directory = Path(directory)
writable = set(writable_layers) if writable_layers is not None else None
stages, metadata = ({} if stages is None else stages), {}
for identifier, entry in index['entries'].items():
path = str((directory / entry['layer']).resolve())
if path not in stages:
stages[path] = Usd.Stage.Open(path)
stage = stages[path]
prim = stage.GetPrimAtPath(entry['prim_path'])
if not prim: raise ValueError('index entry is missing: ' + identifier)
value = prim.GetCustomDataByKey(METADATA_KEY)
if writable is None or path in writable:
value = compact_matching(value if entry.get('compact') and value else entry.get('matching', {}))
value.update(entry_id=identifier, semantic_category=entry.get('semantic_category', (prim.GetCustomDataByKey(METADATA_KEY) or {}).get('semantic_category', '')))
# Empty lists need an explicit USD array type in a dictionary.
from pxr import Vt
value['identifiers'] = Vt.StringArray(value['identifiers'])
prim.SetCustomDataByKey(METADATA_KEY, value)
if not value:
raise ValueError('prior definition has no compact metadata; republish it before compact delivery')
metadata[identifier] = dict(value)
finalize = {str(Path(path).resolve()) for path in finalize_layers}
for path, stage in stages.items():
if writable is not None and path not in writable:
continue
layer = stage.GetRootLayer()
if path not in finalize:
layer.Save()
continue
fd, temporary = tempfile.mkstemp(prefix='.final-', suffix='.usdc', dir=Path(path).parent)
os.close(fd)
try:
if not layer.Export(temporary):
raise ValueError('final category export failed: ' + path)
os.replace(temporary, path)
layer.Reload(force=True)
finally:
Path(temporary).unlink(missing_ok=True)
libraries, entries, hashes = {}, {}, {}
def fingerprint(path):
if path not in hashes:
with Path(path).open("rb") as stream:
hashes[path] = hashlib.file_digest(stream, "sha256").hexdigest()
return hashes[path]
for identifier, entry in index['entries'].items():
path = str((directory / entry['layer']).resolve()); stage = stages[path]
lid = hashlib.sha256(entry['layer'].encode()).hexdigest()[:20]
digest = fingerprint(path)
libraries[lid] = dict(layer=entry['layer'], fingerprint=digest,
metersPerUnit=UsdGeom.GetStageMetersPerUnit(stage), upAxis=str(UsdGeom.GetStageUpAxis(stage)),
timeCodesPerSecond=stage.GetTimeCodesPerSecond(), framesPerSecond=stage.GetFramesPerSecond())
m = metadata[identifier]
entries[identifier] = dict(library=lid, prim_path=entry['prim_path'], exact_key=m['exact_key'],
identifiers=list(m.get('identifiers', [])))
if m.get('product_key'): entries[identifier]['product_key'] = m['product_key']
if m.get('normalized_source_key'): entries[identifier]['normalized_source_key'] = m['normalized_source_key']
entry['fingerprint'] = digest
entry.setdefault('matching', {}).update(dict(m, identifiers=list(m.get('identifiers', []))))
# Existing publication computes a closure once; refresh owned files after metadata writes.
deps = {}
for location in index.get('dependencies', {}):
path = directory / location
digest = fingerprint(str(path.resolve()))
index['dependencies'][location] = digest
deps[hashlib.sha256(location.encode()).hexdigest()[:20]] = dict(location=location, fingerprint=digest)
for row in libraries.values():
row['dependencies'] = list(deps)
result = dict(schema_version=2, status='published', entries=entries, libraries=libraries, dependencies=deps)
for key in ('consumer_layer', 'material_library', 'portable', 'resource_dependency_closure'):
if key in index: result[key] = index[key]
(directory/'index.json').write_text(json.dumps(result, separators=(',', ':')) + '\n')
return result
def rebuild_index(library_paths, directory):
"""Rebuild lookup from published USD metadata without run artifacts."""
from pxr import Usd, UsdUtils
directory = Path(directory).resolve()
index = {'entries': {}, 'dependencies': {}, 'status': 'published'}
for file in sorted(set(str(Path(p).resolve()) for p in library_paths)):
stage = Usd.Stage.Open(file)
if not stage or stage.GetCompositionErrors(): raise ValueError('library cannot compose: ' + file)
layers, assets, unresolved = UsdUtils.ComputeAllDependencies(file)
if unresolved: raise ValueError('unresolved library dependencies: ' + str(unresolved))
for location in [str(p.realPath) for p in layers] + list(assets):
path = Path(location).resolve()
try: relative = str(path.relative_to(directory))
except ValueError: relative = os.path.relpath(path, directory).replace(os.sep, '/')
index['dependencies'][relative] = hashlib.sha256(path.read_bytes()).hexdigest()
for prim in stage.TraverseAll():
value = prim.GetCustomDataByKey(METADATA_KEY)
if not value: continue
# Only definitions whose metadata is locally authored are entries;
# inherited metadata below a reference does not create new assets.
if not stage.GetRootLayer().GetPrimAtPath(prim.GetPath()): continue
local = stage.GetRootLayer().GetPrimAtPath(prim.GetPath()).customData
if 'reuse' not in local.get('usdPerformance', {}): continue
try: relative = str(Path(file).relative_to(directory))
except ValueError: relative = os.path.relpath(file, directory).replace(os.sep, '/')
index['entries'][value['entry_id']] = dict(layer=relative, prim_path=str(prim.GetPath()),
semantic_category=value.get('semantic_category', ''), matching=dict(value))
return write_index(directory, index, set())
def validate_matching(value):
required = {'source_signature', 'root_transform_signature', 'metersPerUnit', 'tolerance_mm'}
if not isinstance(value, dict) or not required.issubset(value):
raise ValueError('matching metadata is incomplete')
for key in ('source_signature', 'root_transform_signature'):
if not isinstance(value[key], str) or (not value[key] and not (key=='source_signature' and value.get('product_key'))):
raise ValueError('matching requires ' + key)
for key in ('metersPerUnit', 'tolerance_mm'):
item = value[key]
if isinstance(item, bool) or not isinstance(item, (float, int)) or not math.isfinite(item) or item <= 0:
raise ValueError(key + ' must be finite and positive')
return value
class LookupContext:
"""One immutable input snapshot per lookup batch; never persisted as truth.
Assessment uses identifiers without reading geometry or hashing libraries.
Confirmation lazily validates dependencies, once per context. Start a new
context after publication or index changes.
"""
def __init__(self, index_paths):
self.indexes, self.findings, self.hashes = [], [], {}
self.by_identifier = {}
self.by_exact = {}
self.by_normalized = {}
self.by_product = {}
self.by_entrypoint, self.metadata, self.stages = {}, {}, {}
for value in sorted(set(str(Path(p).resolve()) for p in index_paths)):
path = Path(value)
try:
index = expand_index(json.loads(path.read_text()))
if index.get('schema_version') != 1 or index.get('status') != 'published' or not isinstance(index.get('entries'), dict):
raise ValueError('unsupported or unpublished index')
if not isinstance(index.get('dependencies', {}), dict):
raise ValueError('invalid dependency fingerprint record')
self.indexes.append((path, index))
for identifier, entry in sorted(index['entries'].items()):
if not isinstance(entry, dict) or not isinstance(entry.get('layer'), str) or not isinstance(entry.get('prim_path'), str) or not entry['prim_path'].startswith('/'):
continue
key = (str((path.parent / entry['layer']).resolve()), entry['prim_path'])
self.by_entrypoint.setdefault(key, []).append((path, identifier, entry))
if entry.get('compact'):
self.by_exact.setdefault((str(path), entry.get('exact_key')), []).append((identifier, entry))
matching = entry.get('matching', {})
if matching.get('product_key'):
self.by_product.setdefault((str(path), matching['product_key']), []).append((identifier, entry))
if matching.get('normalized_source_key'):
self.by_normalized.setdefault((str(path), matching['normalized_source_key']), []).append((identifier, entry))
values = matching.get('identifiers', []) if isinstance(matching, dict) else []
if not isinstance(values, list):
continue
for value in set(v for v in values if isinstance(v, str)):
self.by_identifier.setdefault(value, []).append((path, identifier, entry))
except (OSError, ValueError, TypeError) as error:
self.findings.append({'index': value, 'reason': str(error)})
def stage(self, path):
from pxr import Usd
path=str(path)
if path not in self.stages:self.stages[path]=Usd.Stage.Open(path)
return self.stages[path]
def digest(self, path):
if path not in self.hashes:
with path.open('rb') as stream:
self.hashes[path] = hashlib.file_digest(stream, 'sha256').hexdigest()
return self.hashes[path]
def identifiers(self, values):
"""Stored identification-clue nominations, never confirmed reuse."""
matches = {}
for value in sorted(set(values)):
for path, identifier, entry in self.by_identifier.get(value, []):
key = (str(path), identifier)
if key not in matches:
matches[key] = {'id': identifier, 'index': str(path),
'layer': str((path.parent / entry['layer']).resolve()),
'prim_path': entry['prim_path'], 'identifiers': [],
'status': 'confirmation_required', 'confirmed': False}
matches[key]['identifiers'].append(value)
for nomination in matches.values():
key=(nomination['layer'],nomination['prim_path'])
if key not in self.metadata and Path(key[0]).is_file():
stage=self.stage(key[0]);prim=stage.GetPrimAtPath(key[1]) if stage else None
if prim:self.metadata[key]=dict(prim.GetCustomDataByKey(METADATA_KEY) or {})
metadata=self.metadata.get(key,{})
for field in ('semantic_category','structural_type'):
if metadata.get(field):nomination[field]=metadata[field]
if metadata.get('product_identity_json'):
nomination['product_identity']=json.loads(metadata['product_identity_json'])
return list(matches.values())
# Shared nomination extraction also feeds boundary review; no USD reads here.
import importlib.util as _importlib_util
_product_spec = _importlib_util.spec_from_file_location(
'usd_product_clues', Path(__file__).resolve().parents[3] / 'scripts/product_clues.py')
product_clues = _importlib_util.module_from_spec(_product_spec)
_product_spec.loader.exec_module(product_clues)
identifying_values = product_clues.identifying_values
def source_identity_kind(matching, other):
"""Compare validated composed-source identity, frame and physical units."""
if other.get('metersPerUnit') != matching.get('metersPerUnit'):
return None
if matching.get('product_key') and other.get('product_key') == matching['product_key']:
return 'product' if matching.get('upAxis')==other.get('upAxis') else None
if other.get('root_transform_signature') != matching.get('root_transform_signature'):
return None
if matching.get('source_signature') and other.get('source_signature') == matching['source_signature']:
return 'exact'
if matching.get('normalized_source_key') and other.get('normalized_source_key') == matching['normalized_source_key']:
return 'normalized'
return None
def validate_entry(context, index_file, identifier, entry, matching):
"""Validate one indexed entry using the batch's immutable metadata/digest cache."""
validate_matching(matching)
index_file = Path(index_file).resolve()
index = next(index for path, index in context.indexes if path == index_file)
layer = (index_file.parent / entry['layer']).resolve()
stored = entry.get('matching', {})
if entry.get('compact'):
if stored.get('exact_key') != exact_key(matching) and not (matching.get('normalized_source_key') and stored.get('normalized_source_key') == matching['normalized_source_key']) and not (matching.get('product_key') and stored.get('product_key') == matching['product_key']):
raise ValueError('published source identity differs')
key = (str(layer), entry['prim_path'])
if key not in context.metadata:
stage = context.stage(layer)
prim = stage.GetPrimAtPath(entry['prim_path']) if stage else None
if not prim:
raise ValueError('published entry prim is missing')
context.metadata[key] = dict(prim.GetCustomDataByKey(METADATA_KEY) or {})
stored = dict(context.metadata[key], metersPerUnit=entry['library_units'],upAxis=entry.get('library_axis'))
stored['identifiers'] = list(stored.get('identifiers', []))
else:
stored = validate_matching(stored)
if not source_identity_kind(matching, stored):
raise ValueError('published source identity or units differ')
if context.digest(layer) != entry.get('fingerprint'):
raise ValueError('published layer fingerprint changed')
if not isinstance(entry.get('prim_path'), str) or not entry['prim_path'].startswith('/'):
raise ValueError('entry has no absolute prim path')
dependencies = index.get('dependencies', {})
for path, fingerprint in dependencies.items():
dependency = (index_file.parent / path).resolve()
if context.digest(dependency) != fingerprint:
raise ValueError('published dependency fingerprint changed: ' + path)
return {**entry, 'matching': stored, 'layer': str(layer), 'id': identifier,
'index': str(index_file), 'status': 'confirmation_required',
'read_only': True, 'confirmed': False,
'dependency_fingerprints': {str((index_file.parent / path).resolve()): fingerprint
for path, fingerprint in dependencies.items()},
'dependency_verification': 'published_closure' if dependencies else 'entry_layer_only'}
def nominate(index_paths, matching, context=None):
"""Nominate accepted product, exact or normalized source identity across categories."""
validate_matching(matching)
context = context if context is not None else LookupContext(index_paths)
candidates, findings = [], list(context.findings)
for index_file, index in context.indexes:
compact = any(entry.get('compact') for entry in index['entries'].values())
rows = context.by_exact.get((str(index_file), exact_key(matching)), []) if compact else sorted(index['entries'].items())
if matching.get('normalized_source_key'):
rows = list(rows) + [row for row in context.by_normalized.get((str(index_file), matching['normalized_source_key']), []) if row not in rows]
if matching.get('product_key'):
rows = list(rows) + [row for row in context.by_product.get((str(index_file), matching['product_key']), []) if row not in rows]
for identifier, entry in rows:
try:
candidates.append(validate_entry(context, index_file, identifier, entry, matching))
except (OSError, ValueError, KeyError, TypeError, AttributeError) as error:
findings.append({'index': str(index_file), 'entry': identifier, 'reason': str(error)})
return {'schema_version': 1, 'candidates': candidates, 'findings': findings,
'coverage': 'product_exact_and_normalized_source_identity', 'layers_hashed': len(context.hashes)}
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Python, Needs Node.js
The author says: Requires a verified standalone Usd Optimize/OpenUSD runtime for operations, usd-validation-nvidia for supported checks, and a writable output workspace. Remote assets require a working resolver. Render profiling is an external handoff.
Security
What our scanner noticed· Medium risk
- Large base64-encoded blobs
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- NVIDIA Omniverse
- Publisher
- NVIDIA (Official)
- Source
- NVIDIA/skills · skills/omniverse-usd-performance-tuning · commit fce3cca
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE-APACHE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by NVIDIA Omniverse or NVIDIA.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download omniverse-usd-performance-tuning.zip