Unlock the Power of OpenUSD: A Hands-On Guide to Plugins with NVIDIA
Are you ready to dive into the world of OpenUSD and craft your own custom tools? This guide provides a practical introduction to building various OpenUSD plugins, empowering you to extend its functionality and tailor it to your specific needs. Level up your skills and control your OpenUSD environment today!
Your Gateway to OpenUSD Plugins
This repository serves as a launchpad for creating different types of plugins for OpenUSD. Whether you're interested in defining custom schemas, crafting specialized file formats, managing dynamic payloads, or manipulating scene indices, you'll find valuable examples here. Imagine the possibilities as you tailor every aspect of your OpenUSD experience.
What You'll Discover
This guide will walk you through building plugins for:
- OpenUSD Schemas: Both codeful and codeless approaches to defining your own data structures.
- File Format Plugins: Read, write, and manipulate custom file formats within OpenUSD.
- Dynamic Payloads: Load data on demand, optimizing performance and managing complex scenes.
- Hydra 2 Scene Indices: Powerful tools for manipulating and optimizing scene data in Hydra.
Quick Start: Building Your First Plugin
All samples in this guide leverage CMake for building OpenUSD plugins.
Prerequisites:
- CMake 3.23.1+ installed and accessible in your system's PATH.
Ready to get started? Here’s how to quickly build and test the samples:
- Use the provided tools to build the libraries.
- Configure your environment to load the sample scenes in
usdview
. - Run the commands (assuming Linux or git-bash on Windows) to build your first OpenUSD plugin.
Sample Scenes: See Plugins in Action
Each sample includes a dedicated scene to showcase its capabilities. Let's walk through the available examples.
- Dynamic Payloads: Interact with live data by opening
resources/scene.usda
inusdview
, and loading the dynamic payload. See how deferred reads invoke REST APIs to retrieve department and object data for the Metropolitan Museum of Art. - Hydra 2 Geospatial Coordinates: Open
resources/wgs84/deutschebahn-rails.usda
. Witness the magic as WGS84 coordinates are resolved in Hydra 2, with a reference map ensuring accuracy. - Hydra 2 Metrics Assembler: Load
resources/metrics_assembler.usda
. Experiment with themetersPerUnit
value in themetrics_assembler_2.usda
layer to understand how it affects the scene. - Hydra 2 Warp: Explore deformation and simulation:
warp_demo_mesh.usda
: Use warp to deform a mesh.warp_demo_sim.usda
: Simulate physics against sphere particles.
Demystifying the Project Structure
Navigate the repository with ease:
/deps
: Dependencies for the project./src
: Source code for all the sample plugins./hydra-plugins
: Hydra 2 scene index plugins./kit-extension
: Kit extension files./usd-plugins
: Core USD plugin examples./dynamicPayload
: Dynamic payload plugin source./fileFormat
: File format plugin source./schema
: Schema plugin source.
/tools
: Build scripts and utilities.
The infrastructure (build.bat, build.sh, etc.) relies on NVIDIA's packman
tool to manage pre-built packages. These include:
- NVIDIA’s customized OpenUSD build for Kit.
- Stock OpenUSD builds.
- Python distributions to build OpenUSD packages.
- Build support files for CMake (
nvopenusdbuildtools
).
Understanding Derived Artifacts
Folders starting with _
are derived and can be safely deleted during cleanup:
_build
: Location for generated build artifacts._install
: Installation and staging area for built plugins._venv
: Virtual environment for easy testing in usdview.
Dive Deeper: Specific Plugin Guides
Refer to these detailed guides for specific plugin types:
- Schemas, File Format Plugins, and Dynamic Payloads
- Hydra 2 Scene Indices
Licensing and Usage
The content is subject to the license agreement found here. The dynamic payload example leverages the Metropolitan Museum of Art Collection API, subject to its specific terms. Be mindful of rate limits (80 requests per second) when using this API.
Contribute and Collaborate
We encourage contributions! Check out CONTRIBUTING.md
to learn how you can help improve this repository.