First 30 Flashcards
Prims
Short for Primitive, and a quintessential component of USD.
Prims are the nodes within a hierarchy and can thus have parent/child relationships with other prims; meaning that prims can have other prims as children or siblings, or have another prim as a parent.
In the image below, every node in the hierarchy is a prim. The keen-eyed will notice that prims can have a type. Xform, Mesh, Scope and Material are specific prim types. These types come with default behavior and “data”, the mechanism of which is explained in a later chapter.
User s are also able to define their own Prim types
While Prims themselves indicate what “type” of scene element they are, they do not necessarily possess data themselves. However, they can be considered “containers” for named data, this data is generally expressed as Properties.
Properties
Prims can have Properties, which are essentially named and typed data.
A Property within USD is actually a collective term for two distinct types of Properties
In the above, you can see that properties are made up from a name and a typed value
These property names can also be namespaced. A property name can have 1 or more namespace identifiers separated by :.
Looking closer at the relationship example, the property name material:binding is actually namespaced. The property’s name itself is binding and it is part of a material namespace.
Namespaces can be used to categorize or group properties together.
Attributes
Attributes are Properties with direct values that may vary over time
Relationships
Relationships are Properties that point to other properties or Prims
Path
Prims and properties are defined through unique paths inside the scene hierarchy. They are a textual representation of a hierarchy - similar to folder paths in most operating systems - where each prim is separated from its parent or child via the / delimiter.
In the example below, the highlighted path /root/remi/head_M_hrc/GEO/head_M_hrc/eyeScrew_L_geo is a path to a prim with the name eyeScrew_L_geo. Constructed from the following hierarchy: / → root → remi → head_M_hrc → GEO → head_M_hrc → eyeScrew_L_geo.-
Properties are also defined by paths. Taking the previous example, inspecting the points attribute yields the path /root/remi/head_M_hrc/GEO/head_M_hrc/eyeScrew_L_geo.points. Property paths are constructed by appending the property name to a prim path, delimited by a . character
Paths in USD are name based, and this means you cannot define the same path twice. In practice this means that you cannot have two or more sibling prims with the same name
Layer
A Layer is a collection of Prims and their Properties that can be saved to/loaded from disk or memory. As such, it can be considered a “saveable hierarchy”.
Standard USD Layers can be represented on-disk via
Extension Description
.usda ASCII Text, human-readable format
.usdc USD Crate file format. High performance binary not human-readable format
.usd either Crate or Text
.usdz uncompressed and packaged format (.zip).
USD allows for extending what you can load as a “Layer” via a special kind of plugin (SdfFileFormat). In fact, the file types listed above are actually all plugins of this type.
Using this SdfFileFormat plugin type, it is for example possible to also support loading .fbx, .abc, .obj (or anything really) in Usd.
Metadata
Prims, their properties and the layers they are part of can have metadata applied to them. This is additional static (as in, it can not change over time) data that USD or a user can read, use or define.
Metadata can be used to describe behavior, incur meaning, represent documentation, etc. USD comes bundled with an extensive suite of metadata out of the box,
Layer stack
Each layer internally keeps track of a “local” stack of layers that contribute to that layer. This stack is an ordered collection of layers used within this layer that contribute to its hierarchy and composition.
A layer’s Layer Stack always has its own data at the top of the stack, making itself the most important.
Composition
Roughly put, the act of combining layers and their prims, properties and metadata together through various means known as composition arcs.
While combining layers together could be considered “composing” them, what USD’s composition engine actually uses are the layer stacks of each layer.
Stage
The composed result of opening a layer. Think of it as a Photoshop canvas when opening a .PSD document. All the Photoshop layers interact with one another to produce a “final image”. The layers still exist, they can still be edited, deleted, replaced, etc… but what you see is the result, and that is the Stage in USD.
This composed result can be “flattened” and saved to a new layer, which would be similar to taking the aforementioned Photoshop document and exporting it to a JPEG.
Opinions
Circling back to properties, when you set a value on an attribute or metadatum or author a relationship within a layer, you are effectively expressing an opinion on that value. This is named an opinion because value assignments can always be changed by others! This is a very important concept for composition.
A different way of looking at this would be that “setting a value” implies that that action is final and the value itself becomes immutable; whereas with opinions you merely mean
“Within this layer, I want the value for this to be <INSERT>”</INSERT>
If the value already existed before, you are essentially “overriding” it
Over rides
When expressing an opinion within a layer, it is possible to “redefine” a previously defined value of the property being edited. This mechanism is known as overrides because you are overriding what was there before. However, it is very important to note that the original data remains unchanged. The override only exists within the layer where you are defining it
This is by far the most important aspect to understand about USD. Opinions and their “value resolution” (resolving which value gets applied in the end) are key to the entire composition mechanism.
Below is a simple example of overriding a previously defined attribute’s opinion.
Stage traversal
Generally a concept used when programming with USD, but it is important to understand for users too. Stage Traversal is essentially iterating over the scene graph of a layer opened in a stage. Traversal can be filtered via “rules” (or predicates), limited to sub-trees, parts of the hierarchy can be pruned during traversal, and so on.
By default, USD Stage Traversal will only consider prims that are active, defined, loaded and are not abstract. Depending on which tool is used, users may be able to change this behavior. Using the programming interface however, developers have full control over this behavior.
Kind
Kind is a prim-level metadatum that can be used to “categorize” prims and their descendants into higher level concepts than just their definitions (ex. Mesh, Sphere, Cube, etc…).
Purpose
Purpose is an attribute that can be used to give a prim and its descendants a high-level “visibility flag” in context of rendering.
For example, if a prim has its purpose attribute set to render, it will be excluded from being drawn in a renderer that only wants to draw proxy prims.
In some sense, setting purpose could be considered Stage Traversal but for rendering
.
Purpose Description
default
The prim has no special rendering purpose and it will be included in all rendering paths
guide
A prim tree marked with guide is generally used by interactive applications that have asked to show “guides”. Think of it as requesting to visualize controller geometry for rigs, skeleton data, etc
proxy
Proxy is usually reserved for a lightweight representation of another object to be used in an interactive renderer such as a DCC viewport
render
The “final quality” data to be imaged. Usually enabled for offline rendering or final quality rendering