deduplicate-hierarchies

Collapse duplicate USD prim hierarchies into internal instanceable references.

31|4|Updated May 21, 2026
One-click install
npx skills add https://github.com/NVIDIA-Omniverse/usd-optimize --skill deduplicate-hierarchies
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deduplicate-hierarchies
Source: https://github.com/NVIDIA-Omniverse/usd-optimize/tree/main/.agents/skills/deduplicate-hierarchies
Command: npx skills add https://github.com/NVIDIA-Omniverse/usd-optimize --skill deduplicate-hierarchies

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Deduplicating USD scenes manually is slow and error-prone, especially when repeated prim hierarchies bloat files and increase load time.

Core Features & Use Cases

  • Hierarchy-level deduplication: Detects duplicate prim hierarchies level-by-level under the stage default prim and replaces duplicates with internal instanceable references to the first prototype.
  • Safe matching by structure + property values: Uses subtree shape, prim types, authored property names, and property-value verification to merge only truly identical hierarchies (with tolerance for float-array and scalar float/double drifts where applicable).
  • Pipeline-ready for production: Supports a canonical two-op workflow by pairing hierarchy dedup with per-mesh dedup to catch remaining identical meshes not folded at the subtree level.

Quick Start

Run deduplicate-hierarchies on your USD file by providing the full path to the asset and optionally restricting the scan to one or more prim paths.

Frequently Asked Questions about deduplicate-hierarchies

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deduplicate USD prim hierarchies to reduce stage size?

USD hierarchy deduplication works by detecting repeated prim subtrees under the default prim and replacing them with internal instanceable references to the first prototype. It matches subtrees by structure, prim types, authored property names, and property values.

Can I safely collapse duplicate USD subtrees without losing authored prototype paths?

Yes, you can safely collapse duplicate USD subtrees without flattening or losing authored prototype paths. The tool validates the input USD path and exports from the root layer to preserve prototype names during hierarchy replacement.

How does subtree matching handle floating point property value drifts?

Subtree matching allows tolerance for float-array and scalar float or double drifts. It verifies subtree shape, prim types, authored property names, and property values to ensure only truly identical hierarchies are merged.

What is the best way to catch identical meshes not folded by USD subtree deduplication?

The best way to catch remaining identical meshes is to pair hierarchy dedup with per-mesh dedup in a canonical two-op workflow. This pipeline approach ensures identical meshes not folded at the subtree level are still caught.

Does USD hierarchy deduplication work on specific prim paths or only the entire stage?

USD hierarchy deduplication works on the entire stage or specific prim paths. You provide the full asset path and can optionally restrict the scan to one or more prim paths under the default prim.

Do I need additional dependencies to run the USD scene optimizer pipeline?

No additional dependencies are needed to run the USD scene optimizer pipeline. The tool invokes registered Scene Optimizer operations via a standalone runner pipeline without requiring external dependencies.