OpenUSD Fundamentals

Self-Paced Hands-On Lab

Self-Paced Lab · Graphics & Simulation

Learn OpenUSD by Building
a Drone Racing Track

We're going to learn OpenUSD the fun way: by building a drone racing circuit from scratch, entirely with Python. You'll create stages, generate tracks procedurally, compose layers, set up variants, animate a drone flying through gates, and validate everything. No 3D experience needed, just curiosity and a terminal.

~30 minutes Beginner Python Interactive 3D Viewer

By the end of this lab, you'll know how to...

  • Create your first USD Stage and save it as a .usda file
  • Organize a scene with Prims in a tree hierarchy (like folders)
  • Generate 3D scenes from code, with parameters you can tweak
  • Use Layers to edit scenes non-destructively (think Photoshop, but for 3D)
  • Set up VariantSets so you can switch between configurations in one click
  • Animate a drone with keyframes and let USD interpolate the rest
  • Run validation checks to catch problems before they bite you later
  • Batch-generate 20 scenes at once and flatten them for export

OK but, why a drone racing track?

We needed a scene that's easy to picture in your head but complex enough to show off what USD can really do. A drone racing circuit turned out to be perfect, because it naturally touches every core concept:

Hierarchy A world, gates inside it, a drone, nested groups. It's already a tree.
Attributes Every gate has a width, a height, an index. Custom data attached to prims.
Procedural Place gates in a circle with a bit of randomness. Change the seed, get a new track.
Layers One team does geometry, another does simulation, another tags data. All in separate files.
Variants Square gates? Circle gates? Narrow gates? One dropdown switch, zero data duplication.
Animation A drone flying from gate to gate. The most natural keyframe scenario you could ask for.

Before you start

  • You know some Python (variables, functions, loops, that kind of thing)
  • You have Python 3.8+ installed
  • Run pip install flask usd-core and you're good, no GPU or special tools needed
  • Never touched OpenUSD or 3D before? No worries, we'll walk through everything
01

Environment Setup

Let's make sure everything is installed and ready to go.

ready
What is usd-core?
It's a pip package made by Pixar. It gives you the pxr Python module, which is basically all of USD's power without needing any GUI or renderer. You just pip install usd-core and you can create, compose, and inspect 3D scenes right from a Python script. That's it.
02

Your First USD Stage

Create a simple scene, save it to disk, and read it back.

ready
The basics: In USD, a Stage is the top-level thing, like a document for your 3D scene. Inside it you put Prims (primitives), organized in a tree, kind of like folders. Here we'll create a root, throw in a Sphere, a Cube, and a nested group, save it all as a .usda text file, then re-open it to make sure everything survived the trip.
03

Procedural Scene Generation

Now the fun part: let's generate a full drone racing track with code.

ready
Here's the idea: instead of placing objects by hand, we write a script that does it. We arrange gates in a circle, add a bit of randomness (controlled by a seed so it's reproducible), and attach custom attributes to each gate like gate:index, gate:width, and gate:height. This shows how USD lets you store whatever data you want on any prim. A drone gets placed at the first gate as a starting position. Play with the parameters below and see what happens!
04

Layer Composition

Split the scene into separate layers that compose together automatically.

ready
This is where USD gets really cool. Think Photoshop layers, but for 3D scenes. Each layer is its own file, and it can override stuff from the layers below it. The layer on top wins when there's a conflict. We'll create three:
base_layer, the original track geometry (weakest)
sim_layer, where we move a gate and hide another one
data_layer, where we tag things as "obstacle" or "agent" (strongest)
The beauty of this? Three different people (or teams) can work on the same scene at the same time without ever touching each other's files.
05

VariantSets

Give each gate a "shape" dropdown: square, circle, or narrow.

ready
Picture a dropdown menu on a 3D object. That's basically what a VariantSet is. You define a few options (like "square", "circle", "narrow") and you can flip between them whenever you want. The gate's width and height change automatically, no duplicated data, no extra files. This is how real studios handle things like LODs or material swaps. We'll export one .usda per variant so you can see the difference.
06

Time Samples & Animation

Make the drone actually fly through the gates. This is the best part.

ready
Time to bring things to life. In USD, animation works by storing (frame, value) pairs on any attribute. You set a position at frame 1, another at frame 15, another at frame 30, and USD fills in everything in between automatically. We'll place a keyframe at each gate, spread across frames 1 to 120, so the drone flies the full circuit and loops back to the start. Then we double-check that the interpolation actually works correctly. Once this runs, hit View in 3D to watch the drone fly!
07

Validation & Quality Checks

Make sure nothing is broken before shipping these files anywhere.

ready
Broken USD files are sneaky. They don't always crash, they just quietly do the wrong thing downstream. That's why we validate. This step runs 10+ automated checks on every stage we generated: is the axis set correctly? Are all expected prims there? Any duplicates? Is the time range valid? Do all custom attributes have values? It's the same kind of thing you'd put in a CI/CD pipeline at a real studio.
08

Batch Processing & Flattening

Generate 20 different tracks at once, then flatten one to see what happens.

ready
Let's scale things up. In the real world, pipelines generate hundreds or thousands of scene variations. Here we create 20 randomized tracks, each with different gate counts, radii, and seeds. Then we flatten one of them, which means collapsing all the layers, variants, and composition into a single standalone file. It's great for sending to other tools, but you lose the non-destructive editing magic. We'll compare file sizes so you can see the tradeoff for yourself.

Nice work! So, what now?

You just built a full USD pipeline from zero: procedural generation, layers, variants, animation, validation, batch processing. All those .usda files sitting in your out/ folder? They're standard OpenUSD. You can open them in any tool that supports it.

3D Viewer
Frame 1
Loading scene...