> [!abstract] Summary > **USD Theory** — the *why* and *what* of Pixar's Universal Scene Description. Covers the core concepts: **Layers**, **Variants**, **SubLayer vs Reference**, the **Stage**, **Prims**, **Opinions**, **Purposes**, **Kinds**, **Component vs Assembly** assets, **Parts / Variant Sets / Variants**, **Payloads** and **Layer Stacks**. Uses the Rodeo pipeline as a concrete studio example. --- # Why USD ![[../../../../OUT OF PUBLISH/KNOWLEDGE OUT OF PUBLISH/STUDIO/Attachments/file-20240915114031447.png]] ![[../../../../OUT OF PUBLISH/KNOWLEDGE OUT OF PUBLISH/STUDIO/Attachments/file-20240915115619072.png]] # What is USD - Created by **Pixar**. - File format whose key feature is that it can be **nested inside other USD files**. - Contains everything needed to render (**no rig, no sim setup**). - Every department contributes to the USD file via **LAYERS** — together forming a **LAYER STACK** (one layer per department). - **Prim** = an element contained in the USD file. # Import vs Load 1. In **Maya**, instead of using `Import`, use **Create / Universal Scene Description (USD)** to see the animation — this is the **USD world**. 2. When you want to work on an object itself: **Import** — no animation, but you can move points — this is the **Maya world**. 3. In **Houdini**, use **Stage / SubLayer** to load, or **Reference**. # Layers ![[../../../../OUT OF PUBLISH/KNOWLEDGE OUT OF PUBLISH/STUDIO/Attachments/6.30 USD Theory/image-20230220 1.png|425]] Hierarchies can be combined across layers: ![[../../../../OUT OF PUBLISH/KNOWLEDGE OUT OF PUBLISH/STUDIO/Attachments/6.30 USD Theory/image-20230220 2.png|450]] # Variants An object can have a switch called a **Variant Set**, allowing it to change properties (shape, color, hierarchy, etc.) by selecting a **Variant**. For example, a fern asset can have a **ModelingVariantSet** and a **ShadingVariantSet** if it needs multiple shapes and textures. ![[../../../../OUT OF PUBLISH/KNOWLEDGE OUT OF PUBLISH/STUDIO/Attachments/6.30 USD Theory/image-20230220 12.png]] # SubLayer or Reference? ### Reference - ![[../../../../OUT OF PUBLISH/KNOWLEDGE OUT OF PUBLISH/STUDIO/Attachments/6.30 USD Theory/image-20230220 3.png]] ### SubLayer - Reads a simple asset. # The Stage **The Stage is the composed scene.** You give USD a **root layer** to open (e.g. a shot file) and it opens all the **sublayers, references and payloads** to build the Stage = the full composed scene. # Prims **All members of the hierarchy.** ![[../../../../OUT OF PUBLISH/KNOWLEDGE OUT OF PUBLISH/STUDIO/Attachments/6.30 USD Theory/image-20230220 4.png]] - Prims contain **Properties**. - Attributes meant to be consumed by a shader are called **PRIMVARs**. # Opinions ![[../../../../OUT OF PUBLISH/KNOWLEDGE OUT OF PUBLISH/STUDIO/Attachments/6.30 USD Theory/image-20230220 5.png]] # Deactivating Prims - A **non-destructive way to delete a prim** — it can be reactivated later by another layer. # Purpose ![[../../../../OUT OF PUBLISH/KNOWLEDGE OUT OF PUBLISH/STUDIO/Attachments/6.30 USD Theory/image-20230220 6.png]] - **Render** — only in render. - **Proxy** — only in viewport. - **Guide** — visible only when explicitly requested. # The Kind Problem with purposes: if you move the proxy, you also need to move the render. **Solution: The Kind.** ![[../../../../OUT OF PUBLISH/KNOWLEDGE OUT OF PUBLISH/STUDIO/Attachments/6.30 USD Theory/image-20230220 8.png]] In **Houdini**, to move geo + proxy together, select the **component**: ![[../../../../OUT OF PUBLISH/KNOWLEDGE OUT OF PUBLISH/STUDIO/Attachments/6.30 USD Theory/image-20230220 9.png]] # Component Asset **The smallest asset you can publish.** These are assets in which **modeling, textures, shading, rig, etc.** are published. In environments, we use them mostly as source assets (e.g. biomes with parts and variants). For most assets you only need a **defPart**. ## Parts **Parts are complementary "sections" of an asset.** They are assembled together to form an asset. For complex assets, parts let you split heavy data. For example, you could publish a ground asset as three parts: `hero`, `midground` and `background`. ## Variants ### Variant Set In USD, a **Variant Set** is a collection of different **Variants**. In the RDO pipeline, the only available Variant Sets are the **pipeline steps**. Even when working in the `env` step, modeling should always be published in the `mod` pipeline step. ### Variant Variants are created **per part** and **per pipeline step**. If no variant is specified for a step, data is published in the **defVariants**. > [!info] Storage > **Variants are published as separate files**, just like Parts. # Assembly Asset **Shot context, or an assembly of components** (e.g. a shelf with components on it). Assembly assets are powerful and behave like shots. They can be organized with groups and can contain **instances** of other assets. The layer stack referenced for each of these instances is updated when the assembly's layer stack is built. ### `_assetLibrary` This group must be present for any assembly that contains set dressing. You need instances of any asset you'll need to **layout or scatter** in the environment. If an asset has multiple variants, only one instance is needed here. ### Local Assets Local assets are component assets that only exist inside an assembly. Their parts and variants are defined directly in the **assembly manifest**. Local assets are useful for publishing environment assets — they can contain any geometry that is not set-dressed, and contain the set dressing itself. ### Parts Naming (Local Assets) Parts for local assets must follow a strict naming convention (may be relaxed later). Each part must start with one of the prefixes: `geo`, `inst`, `lay`, separated from the part name by a single underscore `_`. - **`geo`** — geometry. Variant Set: `mod`. - **`inst`** — instancer. Variant Set: `env`. - **`lay`** — layout. Variant Set: `env`. # Exemple of possible structure ![[../../../../OUT OF PUBLISH/KNOWLEDGE OUT OF PUBLISH/STUDIO/Attachments/6.30 USD Theory/image-20230220 10.png]] ![[../../../../OUT OF PUBLISH/KNOWLEDGE OUT OF PUBLISH/STUDIO/Attachments/6.30 USD Theory/image-20230220 11.png]] ### Publishing Hierarchy ![[../../../../OUT OF PUBLISH/KNOWLEDGE OUT OF PUBLISH/STUDIO/Attachments/6.30 USD Theory/image-20230220 16.png]] *We have to follow the modeling hierarchy.* # Payload ![[../../../../OUT OF PUBLISH/KNOWLEDGE OUT OF PUBLISH/STUDIO/Attachments/6.30 USD Theory/image-20230220 13.png]] - Creates the **base hierarchy** for the asset. - Sets the correct **purpose** tag. - Automatic **Variant Set**. - **LOD switching**. - Used for **all publish types**. - **One payload package per pipeline step** (one for modeling, one for animation, etc.). # Layer Stack 1. **USD layer** — references all the payloads, per pipeline step per shot/asset. - ![[../../../../OUT OF PUBLISH/KNOWLEDGE OUT OF PUBLISH/STUDIO/Attachments/6.30 USD Theory/image-20230220 14.png]] 2. **All USD layers are stacked into a Layer Stack**, which creates the Shot. - ![[../../../../OUT OF PUBLISH/KNOWLEDGE OUT OF PUBLISH/STUDIO/Attachments/6.30 USD Theory/image-20230220 15.png]] --- # 🔗 Related - [[USD terms and definitions]] — glossary of USD concepts (prim, opinion, layer, stage…). - [[USD Extension]] — file-format differences: `.usd` / `.usda` / `.usdc` / `.usdz`. - [[USD From 0 to pro - L4 WS]] — extended theory course (history, pillars, toolset). - [[ANIMAL LOGIC use of USD]] — studio-scale USD architecture example. - [[MAYA Automatic Retopo]] - [[../../../../OUT OF PUBLISH/IN STUDIO/RDO USD PIPELINE|RDO USD Pipeline]] - PDF: [[USD-at-Scale.pdf]] - External: [Introduction to USD — Dilen Shah](https://www.dilenshah.com/post/introduction-to-usd-universal-scene-description) - [[USD MOC]]