openusd
openusd is a Rust implementation of Pixar's Universal Scene Description (USD) format with no C++ dependencies.
Documentation
The following list of docs was used during crate development:
Features
- Reads all major USD formats:
.usda(text),.usdc(binary), and.usdz(archive). - Composed
Stagewith full LIVERPS strength ordering (sublayers, inherits, variants, references, payloads, specializes). - Recursive layer collection with cycle detection, format auto-detection, and expression evaluation.
- List-edit composition (
prepend,append,add,delete,explicit) across layers. - Generic typed field access via
Stage::field<T>withTryFrom<Value>conversion. - Variable expression evaluator for USD's expression syntax.
- Asset resolution with pluggable
Resolvertrait, filesystemDefaultResolver, and search paths.
If you encounter a file that can't be read, please open an issue and attach the USD file for investigation.
Example
use ;
// Filesystem-based asset resolver.
let resolver = new;
let stage = open?;
// Traverse all prims in the composed scene graph.
stage.traverse?;
// Read a typed field value (generic over TryFrom<Value>).
let active: = stage.field?;
// Access children composed across layers, references, and payloads.
let children = stage.prim_children?;
let properties = stage.prim_properties?;
Getting started
To begin, simply clone the repository including its submodules.
Make sure you have Rust installed on your system, rustup will do the rest.
# Clone the project
# Use cargo to build, test, lint, etc.
# Run examples
Minimum supported Rust version (MSRV)
The project typically targets the latest stable Rust version. Please refer to rust-toolchain.toml for exact version currently used by our CIs.
[!NOTE] This crate is under active development. No API stability is guaranteed until version 1.0.