Unlock the Power of OpenUSD Plugins: A Developer's Guide
Dive into the world of OpenUSD plugins with this comprehensive guide. Learn how to build custom schemas, file format plugins, dynamic payloads, and Hydra 2 scene indices to enhance your OpenUSD workflows. We'll cover practical examples and best practices to get you started quickly.
What You'll Learn:
- OpenUSD Plugin Development: Master the art.
- Schema Creation: Both codeful and codeless.
- Hydra 2 Scene Indices: Create compelling and accurate scene.
- Dynamic Payloads: Load data on demand.
- File Format Plugins: Work with custom file types.
Jumpstart Your OpenUSD Plugin Journey
This repository empowers you to craft diverse OpenUSD plugins, streamlining your USD environment. Fork, customize, and adapt these samples to meet your unique project needs.
Key Plugin Types Explained
Let's explore the core OpenUSD plugin types covered in this guide:
- OpenUSD Schemas: Define custom data structures and behaviors within your USD scenes.
- File Format Plugins: Enable USD to read and write custom file formats, expanding its interoperability.
- Dynamic Payloads: Load scene data on demand, optimizing performance and memory usage.
- Hydra 2 Scene Indices: Integrate custom data sources and representations into the Hydra rendering pipeline.
Quick Start: Build and Test Your First Plugin
Ready to build your own plugin? Follow these simple steps:
- Prerequisites: Ensure you have CMake 3.23.1+ installed and accessible via your system's PATH.
- Build: Utilize the provided tools to build the libraries and configure your environment.
- Test: Load the sample scenes within
usdview
to validate your plugin's functionality.
Explore Sample Scenes to Understand use cases.
The repository includes several sample scenes that demonstrate the capabilities of different plugin types:
- Dynamic Payloads: Open
resources/scene.usda
inusdview
. Right-click on 'MetropolitanMuseumOfArt' and select "Load." Witness how data is dynamically fetched from REST APIs, creating a dynamic scene structure. - Hydra 2 Geospatial Coordinates: Load
resources/wgs84/deutschebahn-rails.usda
. See how WGS84 coordinates are resolved in Hydra 2, with an overlaid referenced map ensuring precision. - Hydra 2 Metrics Assembler: Load
resources/metrics_assembler.usda
. Experiment with themetersPerUnit
value inmetrics_assembler_2.usda
to understand its effect on scene scaling.
Understanding the Project Structure
The repository's organization is intuitive:
- /deps: External dependencies.
- /src: Source code for all plugin examples.
- /hydra-plugins: Hydra 2 scene index plugins.
- /usd-plugins: Schema, file format, and dynamic payload plugins.
- /tools: Build scripts and utilities.
Leverage Pre-Built Packages for Faster Development
This repository uses NVIDIA's packman
tool to manage pre-built packages, including:
- NVIDIA's customized OpenUSD 22.11 build.
- Stock OpenUSD 23.05 builds.
- Python distributions (3.10/3.11).
- Build support files (
nvopenusdbuildtools
).
Keep your Directory Clean
Folders prefixed with _
are automatically generated during the build process and can be safely deleted:
_build
: Intermediate build artifacts._install
: Built and staged plugins._venv
: Virtual environment.
Licensing and Contribution
Note the licensing terms mentioned in the file. The dynamic payload example uses the Metropolitan Museum of Art Collection API, subject to their terms and conditions. See CONTRIBUTING.md
for contribution guidelines.