Samples for the OpenUSD Exchange SDK
August 20, 2026 ยท View on GitHub
These samples demonstrate some key concepts for writing OpenUSD converters. The samples use OpenUSD and the OpenUSD Exchange SDK (docs, github) to demonstrate how to author consistent and correct USD:
USD ValidationcreateStagecreateTransformscreateMeshcreateCurvescreateMaterialscreateReferencescreateAssetcreateCamerascreateLightscreatePhysicscreateSkeletonsetDisplayNamessetSemantics
How to Build and Run Samples
Linux
This project builds with CMake and requires "make" and "g++". The build script fetches a pinned CMake automatically (or uses a system cmake if one is present), so you only need "make" and "g++" installed:
- Open a terminal.
- To obtain "make" type
sudo apt install make(Ubuntu/Debian), oryum install make(CentOS/RHEL). - For "g++" type
sudo apt install g++(Ubuntu/Debian), oryum install gcc-c++(CentOS/RHEL).
Use the provided build script to assemble the OpenUSD Exchange SDK + OpenUSD runtime (via install_usdex) and compile the C++ samples with CMake. The samples consume the SDK through find_package(usd-exchange).
./build.sh
For debug builds, use ./build.sh -d
C++ Samples
Use the run.sh script (e.g. ./run.sh createStage) to execute each program with a pre-configured environment.
Tip: If you prefer to manage the environment yourself, add
<samplesRoot>/_install/linux-x86_64/release/libto yourLD_LIBRARY_PATH.
For command line argument help, use --help
./run.sh createStage --help
You can also run all samples together, saved into a single layer.
USDZ Output
Samples can package their output stage as USDZ by passing --usdz. The sample still writes its normal USD stage first, then creates an independent .usdz package next to that stage using the same filename stem:
./run.sh createMesh -p /tmp/sample.usdc --usdz
The --path argument remains the writable USD stage path. Passing a .usdz path to --path is not supported because USDZ packages are not writable stage layers.
USDZ packaging requires every external asset dependency to resolve on disk. When createMaterials is run with --usdz, it skips the OmniPBR/MDL-specific examples so the package contains only dependencies that can be localized without MDL search-path configuration.
Python Samples (with a virtual environment and the USD Exchange wheel)
Setup and activate a virtual environment for USD Exchange using these directions from the SDK docs.
To install the optional usd-validation-nvidia package, use the optional/extra syntax:
(usdex-env): python3 -m pip install usd-exchange[test]
Call python3 directly (e.g. python3 source/python/createStage.py) to execute each program with a pre-configured environment.
For command line argument help, use --help
(usdex-env): python3 source/python/createStage.py --help
Windows
Building
This project requires Microsoft Visual Studio 2022 or newer. Download & install Visual Studio with C++. The build script fetches a pinned CMake automatically (or uses a system cmake if one is present), so Visual Studio (compiler + MSBuild) is the only manual install.
Use the provided build script to assemble the OpenUSD Exchange SDK + OpenUSD runtime (via install_usdex) and compile the C++ samples with CMake. The samples consume the SDK through find_package(usd-exchange).
.\build.bat
For debug builds, use .\build.bat -d
C++ Samples
Use the run.bat script (e.g. .\run.bat createStage) to execute each program with a pre-configured environment.
For command line argument help, use --help
.\run.bat createStage --help
You can also run all samples together, saved into a single layer.
Python Samples (with a virtual environment and the USD Exchange wheel)
Setup and activate a virtual environment for USD Exchange using these directions from the SDK docs.
To install the optional usd-validation-nvidia package, use the optional/extra syntax:
(usdex-env)> python.exe -m pip install usd-exchange[test]
Call python.exe directly (e.g. python.exe source/python/createStage.py) to execute each program with a pre-configured environment.
For command line argument help, use --help
(usdex-env)> python.exe source/python/createStage.py --help
Building within the Visual Studio IDE
CMake generates a Visual Studio solution under _build/cmake/windows-x86_64/release (run .\build.bat once to produce it). Open usd-exchange-samples.sln from that folder in Visual Studio to tweak, debug, and rebuild the sample C++ code.
Note : If the user installs the OpenUSD Exchange Samples into the
%LOCALAPPDATA%folder, Visual Studio will not "Build" properly when changes are made because there is something wrong with picking up source changes. Do one of these things to address the issue:
Rebuildthe project with every source change rather thanBuild- Copy the OpenUSD Exchange Samples folder into another folder outside of
%LOCALAPPDATA%- Make a junction to a folder outside of %LOCALAPPDATA% and open the solution from there:
mklink /J C:\usd-exchange-samples %LOCALAPPDATA%\cloned-repos\usd-exchange-samples
Issues with Self-Signed Certs
If the scripts from the Samples fail due to self-signed cert issues, a possible workaround would be to do this:
Install python-certifi-win32 which allows the windows certificate store to be used for TLS/SSL requests:
tools\packman\python.bat -m pip install python-certifi-win32 --trusted-host pypi.org --trusted-host files.pythonhosted.org
Running All Samples Together
The samples are intended to be run sequentially and will build up the USD stage that is originally created in the createStage sample. The can also be run independently and will either open or create a stage depending on whether it exists. To run all of the samples sequentially with one command, type this in the command line after building:
Linux:
./run.sh all
python3 source/python/all.py
Windows:
.\run.bat all
python.exe source\python\all.py
This will output a single layer file after all of the samples have run sequentially. The output is a standard USD stage that can be opened in any USD viewer.
Build and CI/CD Tools
The Samples build with plain CMake, consuming the OpenUSD Exchange SDK through find_package(usd-exchange). The Repo Tools Framework (repo_man) and packman are still used to fetch the SDK package (and its OpenUSD), to run install_usdex, and for testing/formatting/CI. This is a representative setup for how a customer's CMake application would link against OpenUSD and the OpenUSD Exchange SDK. Here's a list of interesting files:
- CMakeLists.txt - the CMake build for the samples; calls
find_package(usd-exchange)and links each sample - build.sh / build.bat - assemble the SDK + OpenUSD runtime via
install_usdex, then configure + build with CMake _build/target-deps/usd-exchange/release/lib/cmake/usd-exchange/- the SDK's CMake package config (provides theusdex::core/usdex::rtxtargets and theusdex_target_link_usd()helper)- this is not available until dependencies are fetched
For details on choosing and installing the OpenUSD Exchange SDK build flavors, features, or versions, see the install_usdex tool documentation.
Using the OpenUSD Exchange SDK in an Application
See the OpenUSD Exchange SDK Native Application Guide for a walkthrough of how use the OpenUSD Exchange SDK and OpenUSD in a native application.
External Support
First search the existing GitHub Issues and the OpenUSD Exchange SDK Discussions to see if anyone has reported something similar.
If not, create a new GitHub Issue or forum topic explaining your bug or feature request.
- For bugs, please provide clear steps to reproduce the issue, including example failure data as needed.
- For features, please provide user stories and persona details (i.e. who does this feature help and how does it help them).
Whether adding details to an existing issue or creating a new one, please let us know what companies are impacted.
Licenses
The license for the samples is located in LICENSE.md.
Third party license notices for dependencies used by the samples are located in the OpenUSD Exchange SDK License Notices.
Documentation and learning resources for USD and Omniverse
OpenUSD Docs - Creating Your First USD Stage
NVIDIA OpenUSD Resources and Learning
OpenUSD Code Samples Documentation