This repository is a collection of simple USD projects. Each project shows off a single feature or group of USD features.
This repository is split into six categories
- Features
- Concepts
- Tricks
- Plugins
- Tools
- References
Features highlight a single class or set of functions for working in USD.
Concepts take features explained in Features and extends them to real-world examples.
Tricks are simple, isolated ideas using USD Features.
Plugins show how to customize USD to suit your pipeline.
Tools are miscellaneous scripts that are built to do a specific task, with USD.
References are useful pages for finding more information about USD and how to interact with it in your projects.
Every project in this repository will show how to work in Python, C++, and USDA wherever possible.
If a concept folder is trying to show off a USD feature but it takes a lot of code then the top-level README.md file is there to summarize the important bits. It may also refer to other resources for where to read more.
Lastly, source-code files may contain explanations for what is shown.
Each of these lines is marked with XXX
.
Unless a C++ project has specific instructions, every project compiles and executes using the following commands:
cd {some_concept_cpp_folder}/build
USD_INSTALL_ROOT=/wherever/you/installed/USD/to cmake ..
make
./run_it
USD_INSTALL_ROOT
typically defaults to /usr/local/USD
on Linux but your location may vary.
See USD's build documentation for details.
Python modules can always run using python name_of_module.py
Here are links of a recommended viewing order for every project in this repository.
Defining customizable userProperties
Computing bounding boxes, using UsdGeomImageable and UsdGeomBBoxCache
Using "purposes" on UsdPrim objects
UsdResolveInfo - Finding where opinions come from
Enable debugging messages and write your own
Setting Time Varying Attributes With Sdf
SdfChangeBlock - Efficient USD authoring
SdfBatchNamespaceEdit and SdfNamespaceEdit - Efficient USD authoring
UsdStageCache - caching USD stages
TfNotice - Run functions when a stage changes, using callbacks
TfNotice - Send your own custom callbacks
Use weaker layers to modify stronger layers
How to uniquify an instanced UsdPrim
Using VariantSets in a production scenario
A practical example of the "specializes" composition arc
The "specializes" composition arc as a fallback mechanism
Reference a Prim in the current SdfLayer
Asset composition arcs - how subLayers, references, and payloads work together
Printing and modifiying prims using the C++ STL
Variant auto-selections - Using VariantSets to modify other VariantSets
Copy opinions from a VariantSet onto another Prim
Find a Prim's bound material (includes collections API)
2-pass exporting - Export USD stages 100x faster
Multi-payloads - Yes, you can have more than one
Getting Prims through VariantSets
usdview_auto_reloader - Update layers in usdview automatically
usdview_root_loader - Recursively load / unload Prim payloads
usdview_purpose_swap - Change between proxy and render purposes with a single button
usdview_copy_camera - Make a prim in usdview to represent the current view
VariantSet fallback selections
VariantSet selection export polices
usd_searcher - A command-line tool for searching USD files
Exporting UsdSkel from scratch
extentsHint and bounding boxes
Link Python Documentation To USD's Documentation
The USD supported plugin mastersheet
There's also Anki deck for this repository, which you can download by clicking here
See This wiki page for a list of planned topics that will be added in the future.
This repository is a constant WIP. If there's something that you'd like to see written about, please suggest it as an issue so that I / others can pick it up and work on it. Also, if you have something that you'd like to contribute, please make a PR. Submissions are welcome!
But note: This repository may not actually show the best way to do things in USD. It's just a collection of (my) personal findings. Also, as Pixar comes out with new USD releases and learning resources, this information may become out-of-date. Always prefer primary guides and documentation over anything that you see here.
Tested with:
- CentOS 7.6
- USD 19.07
- cmake version 3.13.4
- make 3.82
- g++ 8.3.0