USD Basics

The new USD 3D tools have been designed for a painless transition from the classic system by using familiar approaches where possible. However, as a USD beginner, you’ll encounter a number of new concepts and terminology that are important to grasp to make full use of the enhanced workflows.

Note:  If you’re already familiar with the basics of USD, our developer guide includes a more detailed explanation of the basics concepts of USD in Nuke.

Elements of a USD Scene

The idea behind Pixar's Universal Scene Description (USD) is not radical in the sense that 3D scenes have always been described using a hierarchy of objects, attributes, relationships, etc. However, the mechanisms USD introduces for handling and composing 3D data efficiently can be seen as significant advancements in the field.

Let’s look at a few key elements of the USD framework.

To help understand each term, let’s imagine our scene describes a superhero flying through a city.

Note:  For a glossary of USD terminology, see USD Terms and Concepts from Pixar.

USD Prims (Primitives): The Building Blocks of a Scene

A prim (short for primitive) is the fundamental building block in a 3D scene. It is an item that represents geometries, lights, cameras, dynamics and also other groupings of prims. It acts as a container, defining  properties that determine its characteristics and behavior.

In our example, the prims would be the superhero, buildings, vehicles, street details such as lampposts, trees and parks. Each of these prims would contain prims that describe finer details, animations and other defining characteristics. Characteristics like size and color are stored as attributes on the prim.

The USD Stage: The Complete Scene

A USD stage is a scene description framework that organizes the 3D data into one unified representation. The stage is described by a scene graph that is composed of layers, which are typically files that hold scene information.

The stage provides access to all the prims in the scene, which are structured hierarchically. In other words, the stage is the complete tree (as described by the scene graph) of all prims that make up the scene.

You can import the stage from its USD file using GeoImport.

In our example, the stage is the broader environment of the city through which the superhero is flying, encompassing all the structures, entities, and the superhero character.

USD Layers: Functional Parts of the Scene

Layers are a crucial concept in USD as they facilitate non-destructive editing and collaboration. A layer is a self-contained file that stores a part of the scene, supporting edits and enabling the creation of alternate versions without impacting the original source. Layers are referenced by a source file to pull them into their parent scene.

Layers operate in a stack, where each layer can override or modify the contents of the layer(s) below it. This gives rise to a key strengh of layers - their support for non-destructive editing.   Essentially, you can make changes on a new layer to modify existing attributes. However, the edited attribute data only exists on the new layer, so the original attribute data remains if you wish to revisit and reinstate it.

Ultimately, main layers can be defined to reflect the division of responsibility between different departments in the production pipeline. A scene would contain a model layer, an animation layer, a texture layer, a look dev layer, a lighting layer and so on. This allows each department to make changes safe in the knowledge that they non-destructive for the other departments.

 

In our example, the layers are organised so that different departments can focus on their area of responsibility (modeling, texturing, look development, lighting, etc.)

There would be several layers that hold distinct aspects of the scene. The model layer would set up the structures in the city, vehicles, the superhero, and the environment. (Within the model layer there may be a sub-layer stack for a particular building, where small variations are stored, any of which can be used or discarded non-destructively.)

There would be a texture layer to describe the surface of the models in complete detail.

There could be an animation layer for our superhero’s flight path and the movement of vehicles. Plus an FX layer for particle effects of other visual enhancements. Also, camera and lighting layers.

By separating the scene in this way, each layer can be worked on independently and non-destructively.

USD Layers in Nuke

In Nuke, each of the new 3D nodes creates a USD layer. These layers can be composed together to form a stage as required, such as when using a viewer.

The principal 3D nodes create cameras, geometry, lights and shaders, and each of these corresponds to a USD layer when the scene is made in Nuke.

Note: The order of assembling layers is important due to the effect of layer overrides in the stack. A different order may apply different overrides.  Keep this in mind when merging the outputs of the 3D nodes.

The image below shows the layers of a simple scene as shown in the scene graph.

This scene has three layers one for each of geometry, camera, and lights.