Deborah R. Fowler
USD Intro
Posted June 16 2025
Updated on June 16 2025
USD Resources
Stage - USD scenegraph (composed view of scene)
Prim
- named (unique - only one with same name and path), can be geometry, transform etc.
- hierarchical (ie. /World/Camera
- typed (Mesh, Xform, Material) - determines their behavior
- stores metadata and
Composition Arc (see below) - brings things into stage
Layer - usually a file
Schema - IsA or API
Example files
In the documentation
on SideFX.com, there is a "quick example", however I was not
able to use the two_boxes part of it verbatim (perhaps there is a
way, however I found a solution that works). Here is what I found
works with usda files and hipnc supplied below.
box.usda works great! Here are my versions:
#usda 1.0
def Cube "box"
{
double size = 0.5
}
#usda 1.0 is a header
This "def" defines a new prim called box. The
"attributes" now called properties are defined in the curly brace.
Coming from a C++ background, I tend to match my curly braces with
each on its own line (personal preference). Within the braces is
the prim contents.
def is a specified
Sphere "IsA" schema
The two box example as listed in the docs as of this posting I
could not get to read in properly. The syntax I used was
#usda 1.0
def "box1" ( references = @./box.usda@</box> )
{
}
def "box2" ( references = @./box.usda@</box> )
{
double size = 5.0
}
Click
here for zip file of usda files and hip bringing them in
This defines the two boxes by referencing the other usda file
where box is defined as a primitive. If you look at the hip file
provided with the usda files you will see this can be imported
into Solaris with a file node or alternatively into Obj/geo
context with a USD import node. Both render perfectly in Karma
(ignore the odd looking corners in the Vulcan viewport).
This is a good start to understanding the layering of USD file
format. We will delve deeper as we talk about command line
rendering. Note that you are more likely to be using usd (or usdc)
rather than ascii readable file as binary will be smaller. In
addition, you will be generating the usd source from the interface
with a usd rop rather than these that were created in notepad++.
In these examples references is the metadata name and the
value is the path with target prim
So @./box.usda@ is the reference path and </box>
is the target prim.
For more examples see USD and
python
Composition Arcs
Take a moment to look at what some of the composition arc
possibilities are:
- sublayers (think photoshop - lighting layer, shading layer - studio departments)
- references - automatically loaded (even if not active),
enable instancing
- payloads - type of reference that can be loaded or unloaded on demand
- why not always it? smaller project, need assets on opening
or immediate access it requires an extra step
- inherits - a prim inherits and base properties of a
prim (similar to OOP)
- variantSets - allow creating alternative versions of a
prim or its sub-hierarchy
- specializes - establishes a relationship between a
base prim and a derived prim allowing refinement of base
(Similar to order of operation PEMDAS - parentheses, exponents, multiplication / division, addition / subtraction)