Search Tips

Search is based on keyword.

`Ex: "Procedures"`

Do not search with natural language

`Ex: "How do I write a new procedure?"`

Give Feedback Support Portal

# Native USD Prims

In USD, prims (short for primitives) are the fundamental building blocks of a scene, and come in many forms, such as cubes, meshes, and xforms. Being able to natively create these in Katana can make USD workflows more efficient.

In Katana, you can use UsdPrimCreate to create or override prims. Katana tailors the UI to the selected prim automatically. Simply select a type, and the node properties are dynamically populated with the matching parameters.

The primSpec specifier determines how the prim is treated during composition and has the following options:

• define - create the primitive in the scene.

• over - a prim that is used only to override opinions that exist in the scene.

• class - for defining default attributes using a class template.

You can see examples of different primSpecs in the Scene Explorer in the section Styling in the Scene Explorer.

Note: There are also more specific nodes, such as UsdLight, UsdCamera, UsdScope and UsdXform nodes, which allow you to create different types of prims directly.

# The UsdPrimCreate node

As mentioned above, the UsdPrimCreate node is extremely flexible in creating and editing prims, in the most simple of forms.

Note: For more information on how to bring USD data from external USD files, refer to Importing USD Data.

The UsdPrimCreate is a dynamically populated node which will query USD’s API to display the parameters against a prim’s type. This dynamic approach is particularly powerful in order to keep Katana USD-version-agnostic. I.e. if you’re not using the same version of USD that Katana ships with, the UsdPrimCreate will be populated based on what’s present in the USD version that’s currently use.

To create simple geometry, it may be easier to use the UsdCapsuleCreate, UsdConeCreate, UsdCubeCreate, UsdCylinderCreate, UsdPlaneCreate, UsdSphereCreate, or UsdVolumeCreate nodes (which are derived from UsdPrimCreate), as this skips the step of needing to choose the prim type. It creates the geometry and shows the relevant geometry's properties immediately on adding it to your node graph.

There are additional prim-specific nodes that are available within Katana that are more catered to a workflow or action. These additional nodes are all derived from the UsdPrimCreate, but are populated with parameters and tools that are more tailored to the needs of that particular prim - such as UsdLight and UsdCamera nodes.

For example: Within the UsdPrimCreate’s parameters, setting the type to Camera will create a camera with default values. Alternatively, the UsdCamera node will also allow you to create a camera, but the parameters presented will be tailored to what you’d need when creating a camera.

Note: For more information on these, see Using UsdLight and Creating Native USD Cameras.

# Using the UsdPrimCreate node

## Create a Cube prim:

• In the Node Graph, hit Tab and select UsdPrimCreate.

• In its Parameters tab, set the prim’s hierarchy in the Scene Explorer via the primPath parameter. In this example, we’ve set the path to /root/cube1.

• Set the type parameter to Cube.

Tip: You could also use the UsdCubeCreate node to do the same thing. This node is derived from UsdPrimCreate. It skips the step of needing to choose the prim type. It creates the geometry and shows the relevant geometry's properties immediately on adding it to your node graph.

• In the Scene Explorer tab, expand the scene tree to the prim level, by selecting the arrows or double-click on the top prim location to expand everything.

This will result in a USD-native prim, of type Cube.

• This node’s properties will be dynamically populated through the USD API, directly within the Parameters tab. In this example, the Cube’s colour has been modified.

Note: To display the colour in the Viewer, uncheck the option in Display > Basic Material.

Note: To see the resulting usda file for any node, open the USD Text View tab and select the node to preview. Toggle the Mode parameter to display the result of the selected node, or to display all upstream results up to that node.

If you check USD Text View tab, you'll see the following usda file:

## Making downstream changes with UsdPrimCreate

A main rule of USD is that nothing gets “deleted” from the document. You can only deactivate elements from the scene, which will leave it unused but still present in the USD document.

By the same token, when prims of the same name and hierarchy are authored and opinions are set in multiple places, the results will record and show a combination of these opinions, as seen below:

Your browser does not support the video tag.

The same is true if both of these nodes were side-by-side and merged, as seen below. This is because they’re both pointing to the same prim and will combine both USD stages into one.