Share

Add prims to a stage in Bifrost-USD

A prim is something that can be added to a layer in a stage. It can contain a geometry, material definition, overrides, and so on, as well as other prims as children. Use one or more add_to_stage nodes in a chain to build the scene hierarchy.

  1. Add an add_to_stage node to the graph.

  2. Connect a stage to the stage input.

    If the stage port is left unconnected, a new and empty stage is used. In this case, it's best to right-click on the stage port and choose Create Node > Usd::Stage::create_usd_stage so that you can assign a layer file for saving the root layer of the file downstream in the graph.

  3. For the parent_path, specify the full path (including the leading slash "/") of a parent in the hierarchy under which to add the new prims. If this is left blank, the prims will be adding at the root of the specified layer. If you enter a path that does not exist on the stage yet, generic def nodes are created in the hierarchy — you can set the specific types of these prims downstream.

  4. Right-click on the prim_definitions path and choose an option from the Create Node menu.

    • Usd::Prim::define_usd_prim is a generic node that can be used to add any type of prim. The default settings define an Xform (transform), which is commonly used as a parent for other prims, but you can change them to define any prim.
    • The other options on the Create Node menu are based on define_usd_prim and specialized for specific uses.
  5. In the node you just added, set the parameters. For basic information about the related terms and concepts, see the USD glossary. In particular:

    • Set path to specify the name of the prim and its place in the hierarchy. It's always safe to include the leading slash, and the leading slash is mandatory if there is no parent_path specified in the add_to_stage node and the prim definition is not connected to the children port of another prim_definition. Here again, if you enter a path that does not exist on the stage yet then generic def nodes are created in the hierarchy and you can set the specific types of these prims downstream.
    • The basic types available are Scope, Xform, Capsule, Cone, Cube, Cylinder, Sphere, Mesh, NurbsCurves, and PointInstancer. The full list of available types depends on what has been registered by your version of USD for Maya and other plug-ins. You can see the full list by right-clicking on the Maya USD proxy in the Outliner and expanding the Add New Prim > All Registered menu.
  6. As desired, right-click on the fan-out ports of the prim definition node to add references, attributes, and so on. In particular, you can right-click on the children port to create a hierarchy of prim definitions arbitrarily deep.

  7. Right-click on the prim_definitions port of the add_to_stage node and repeat to add more prim definitions as desired.

  8. Connect the stage output of the add_to_stage node to any node that takes a stage as input. This should eventually connect to the output node at the top level of the graph to display the added prims in the host scene.

Was this information helpful?