openusd
openusd is a Rust implementation of Pixar's Universal Scene Description (USD) format with no C++ dependencies.
openusd covers the core USD workflow: read and write .usda, .usdc, and
.usdz files; compose layers with references, payloads, variants, instancing,
relocates, and variable expressions; then explore or edit the result through
the Stage API. It supports predicate-based traversal, typed value resolution,
layer- and stage-level authoring, and transferable diffs for live sync.
For higher-level domain APIs, the companion
openusd-schemas
crate provides typed Stage views for geometry, shading, lighting, animation,
physics, rendering, and more.
Features
- File formats — reads and writes
.usda(text),.usdc(binary), and.usdz(archive). - A fully featured composition engine — LIVRPS strength ordering over a per-prim node graph, with list editing, scene-graph instancing, non-destructive relocates, and variable expressions.
- A composed
Stage— lazy cached per-prim composition with typed value resolution, predicate-based traversal, and full prim/property query API over the composed scene. - An authoring API — build scenes through layer- and stage-tier APIs, with typed spec views, composed prim/attribute/relationship handles with chained fluent edits,
EditTargetrouting to a specific layer, in-memory anonymous-root stages, and applied API schema authoring. - Live sync friendly — listen to
Stageedit events and capture each edit as a transferable, replayableDifffor live mirroring across processes.
If you encounter a file that can't be read, please open an issue and attach the USD file for investigation.
Compliance
The AOUSD Core Specification 1.0 has been officially ratified. As part of the specification, sample implementations for compliance testing are provided as Python scripts with JSON baselines. Where JSON baselines are available, the crate parses them and verifies that its output matches.
| Area | Status | Notes |
|---|---|---|
| Text format parsing | :white_check_mark: Passes | 10 tests against JSON baselines |
| Binary format parsing | :white_check_mark: Passes | 42 tests manually backported from the reference suite's test_binary.py in tests/binary_format.rs |
| Composition | :white_check_mark: Passes | tests/composition.rs runs the full vendor suite (138 assets) through both the text and binary parsers, regenerating each pcp.txt dump to validate strength ordering, prim/property stacks, and time offsets |
| Value resolution | :ballot_box_with_check: Partial | 8 tests in tests/value_resolution.rs (defaults, time samples, value clips). Excludes attribute fallbacks and splines |
| Combine chains | :white_check_mark: Passes | ListOp::combined_with and ListOp::reduced against JSON baselines |
Getting started
Add the crate to your Cargo.toml (or run cargo add openusd):
[]
= "0.8"
If you need the latest unreleased changes, depend on the crate directly from the git repository:
[]
= { = "https://github.com/mxpv/openusd.git" }
To pin a specific revision, add a rev field:
[]
= { = "https://github.com/mxpv/openusd.git", = "4c02084" }
Feature flags
| Feature | Enables |
|---|---|
mmap |
Memory-mapped reads of layer files, enabled per resolver with ar::DefaultResolver::map_files |
serde |
serde support for serializing core types |
Example
use ;
// Open a stage with default settings (DefaultResolver, strict errors, all payloads loaded).
let stage = open?;
// Or configure via the builder:
let stage = builder
// Use a custom asset resolver (default: DefaultResolver).
.resolver
// Leave payload arcs unloaded (default: LoadAll).
.load
// Restrict the stage to a subtree of interest.
.mask
.open?;
// Recoverable composition errors discovered so far: the root layer stack at
// open, plus reference/payload diagnostics that accrue as prims are traversed.
for err in stage.composition_errors
// Traverse prims filtered by a predicate. DEFAULT skips inactive/unloaded/abstract
// subtrees and stops at instances; ALL visits every composed prim.
stage.traverse?;
stage.traverse?;
// Composed prim queries go through a `Prim` handle (mirroring C++ `UsdPrim`).
let hero = stage.prim_at;
let active = hero.is_active?;
let is_model = hero.is_model?;
let type_name = hero.type_name?;
// Access children and properties composed across layers, references, and payloads.
let children = hero.children?;
let properties = hero.property_names?;
To read typed schema views (a Mesh and its points, a Skeleton, a Material)
over the composed stage, add openusd-schemas alongside
this crate.
More runnable examples live in the examples/ directory:
License
Licensed under the
MIT License, except for
src/usd/core_schemas.rs, which is generated from OpenUSD's own schema
definitions and covered by the Tomorrow Open Source Technology License 1.0.
third-party/ carries that license and upstream's notice;
vendor/OpenUSD/README.md in the repository records where the file comes from.