Welcome to the first installment of our Explainer Series on OpenUSD (Universal Scene Description), the foundational technology behind the Alliance for OpenUSD (AOUSD). This series will dive into the technical aspects that make OpenUSD indispensable for developers, artists, and designers, and explore fundamental features like layering, references, and other types of composition arcs.
What is OpenUSD?
Originally invented by Pixar Animation Studios, OpenUSD is a framework and universal interchange for describing, simulating, and collaborating across tools. It is designed to interchange and augment 3D scenes composed of many component assets, facilitating the assembly and organization of these assets into virtual sets, scenes, shots, and worlds. OpenUSD is the focus of the AOUSD, an alliance to promote and standardize this open-source technology.
Why Use OpenUSD?
Interoperability and Collaboration
OpenUSD enhances the interoperability of 3D tools and data, facilitating the exchange of assets and data between diverse software applications. This is crucial for efficient collaboration among diverse teams.
OpenUSD supports non-destructive workflows, allowing artists and designers to make changes and iterations without permanently altering the source data. This enhances productivity and encourages creative exploration and iteration.
OpenUSD is designed to be extensible, allowing developers to support custom schemas, file formats, and more via a rich plug-in system. This adaptability ensures that OpenUSD can meet future industry requirements.
Prims and Properties: The Building Blocks of 3D Scenes in OpenUSD
Understanding the role of Prims and Properties is a great starting point for anyone looking to leverage the power of OpenUSD. These are the building blocks for robust classification, organization, and manipulation of 3D scene elements.
NOTE: All usda examples in this article can be opened in usdview — see the installation instructions for Windows.
What Are Prims?
In OpenUSD, a Prim (short for “Primitive”) is a container that holds various data types and embodies an individual node in the scene hierarchy. Prims can represent simple geometric shapes like a cube or sphere, materials for look development, lights, and more.
Here’s a basic example of defining a Prim representing a cube mesh:
In this example, the Mesh Prim CubeMesh holds the geometric data for the cube and can also contain transform operations such as translates, rotates, and scales.
Any Xformable Prim allows you to manipulate the position, orientation, and size of the objects (Prims) nested underneath it in the scene hierarchy.
When you define an Xform Prim, you’re creating a node in the hierarchical scenegraph that can have transformational attributes. These attributes include the position (x, y, z coordinates), rotation angles or quaternions, and scaling factors. The Xform then applies these transformations to all of its descendant Prims, effectively altering how they are displayed or rendered in the 3D scene.
Here’s a simple example to illustrate:
In this example, the Xform Prim named “MyTransform” contains a translation operation that moves any nested Prims by 2 units along the x-axis and 3 units along the y-axis. Nested within this Xform are 2 Sphere Prims. The spheres will inherit the translation specified in “MyTransform,” meaning their parent space will be positioned at (2, 3, 0) in the 3D space.
“MySphere2” also has an additional local translate of (-1, -4, -7), which offsets its geometry relative to the parent Xform.
Note that the actual transform attributes come from the definition of Xformable Prims. Xform, Mesh, and many other geometric Prim types in OpenUSD subclass Xformable, so they also contain the ability to add and modify transforms.
Understanding Xform and Xformable is key to effectively arranging and manipulating meaningful sub-hierarchies of your 3D scenes.
What Are Properties?
Properties are the data members that reside within Prims. They come in two types: Attributes and Relationships.
- Attributes: These are the typed data fields that can hold values for built-in types like integers, floats, strings, and arrays. For example, the points attribute in the CubeMesh Prim above holds the cube mesh’s vertex coordinates as a point3f, i.e., an array of floating-point triples. Attributes can also be time-sampled to allow for animation.
- Relationships: Relationships are path-valued Properties; they point at other Prims or Properties in the scene. This enables the creation of semantic associations, such as logical dependencies or material assignments.
In this example, the material:binding Relationship in the BlueCube Prim points to a Material Prim located at the path /Materials/Blue, indicating that the cube should be rendered with this material.
How Do Prims and Properties Interact?
Prims and Properties work in tandem to create a rich, hierarchical structure that can represent a 3D scene in a highly organized manner. You can think of a Prim as a folder that contains various files (Attributes) and shortcuts to other folders and files (Relationships). This hierarchical organization makes it easier to manage complex scenes, as you can easily navigate, expand, or query the structure.
Prims and Properties are the DNA that encodes the complexity and richness of 3D scenes. By understanding their roles, types, and associations, you can unlock the full potential of data modeling in OpenUSD, whether you’re creating a simple 3D object or orchestrating an entire virtual world. Our subsequent blog entry on schema development will further expand on data modeling in OpenUSD.
Layers and Composition: Aggregating 3D Scene Elements in OpenUSD
Layers are individual USD documents that can contain elements of a 3D scene, or an entire 3D scene, and can be of various formats, such as .usda (text), .usdc (binary), or .usdz (packaged). Layers do not need to be physical files on disk or over a network or cloud — any data backends, including databases and IoT streaming, that implement a USD file format plugin can be ingested as native USD. We’ll dive deeper into file format plugins later in this blog series.
When it comes to building intricate 3D scenes, USD offers a rich range of mechanisms to streamline data aggregation and collaborative workflows. Layering allows for stacking multiple scene description documents to create a composite output. Composition in USD formalizes the strength ordering when considering data elements coming from multiple sites in the layer stack.
subLayers: Stacking Scenes Together
Layering is a powerful feature in USD that allows you to stack multiple USD layers together. The subLayers composition arc is used to specify the layers that should be combined.
subLayers = [@./overrideLayer.usda@, @./baseLayer.usda@]
subLayers is often used to separate departmental workflows in a film production pipeline. For example, the layout, animation, simulation, and lighting departments could all be working in respective subLayers of the same scene.
References: Reusing Scene Elements
The references composition arc allows you to reuse scene elements by pointing to other USD layers or specific Prims within those files. In this way, you can leverage USD to represent and organize large scenes in an efficient and modular manner.
More Composition Arcs for Scene Assembly
In addition to subLayers and references, USD offers other types of composition arcs with which to assemble scenes and aggregate datasets. Atomic elements of scene description in USD are called opinions. In USD, LIVRPS (Local, Inherits, VariantSets, References, Payloads, Specializes) provides a canonical strength ordering for the opinions aggregated across all composition arcs. A future installment of this blog will cover these composition arcs in more depth.
Understanding the structure of a composed USD layer stack leverages the full power of the OpenUSD framework. You can create intricate, reusable, and efficient 3D scenes via careful consideration of layering, references, and various composition arcs.
Performance and Other Considerations
Before we go, it’s good to note that understanding performance considerations will go a long way toward defining optimal and manageable asset structures for your large worlds and datasets in OpenUSD. Think carefully about the per-Prim cost for scenes that can grow into the millions and tens of millions in Prim count. Future installments of this blog will walk through more of these considerations, trade-offs, and approaches for various use cases and personas navigating the OpenUSD ecosystem.
OpenUSD is more than just another file format; it’s a comprehensive ecosystem that addresses the complex needs of the 3D graphics industry. Its ability to facilitate interoperability, support non-destructive workflows, and offer an extensible framework makes it a cornerstone technology for anyone involved in 3D content creation.
Stay tuned for the next blog in our Explainer Series, in which we’ll focus on OpenUSD schemas.