6. Working with USD

6.1. Learning Objectives

In this tutorial, we will cover how to

  • save USD stages

  • load and reference existing USD stages

6.2. Saving Options

  • Save: To save the current USD stage, go to the Menu Bar and click Files > Save or Files > Save As .. to save as a new file.

  • Save Flattened As: Saves the current USD file while merging all components to one mesh.

  • as .usda files: You have the option to save as .usda file instead of .usd file. .usda file is a human-readable text file format for the given USD stage.

  • Collect Assets: If your current stage used many reference USD stages, materials and textures from other folders and servers, you should Collect Assets to make sure all the external references that used in your stage gets collected in one folder. To do so, save the current USD locally, then find it in the Content tab, right click on it and select Collect Asset.

6.3. Loading Options

  • Open: To load a USD stage, go to Menu Bar and click Files > Open. This opens the USD stage and you can directly edit it.

  • Add Reference: Adding a USD file as a reference. You will not be able to edit the referenced USD. This can also be done by finding the file in Content Tab, and drag it into the viewport.

6.3.1. Set Stage for Reference

Let’s open a new stage and load the mock robot we built as a reference. It will load the referenced USD under a Prim named the same as the USD filename. Notice that it loaded everything under the original World(defaultPrim), including PhysicsScene, defaultLight, and GroundPlane. This may not be great if you are loading multiple USD references and they all have their own version of PhysicsScenes and defaultLights. You cannot delete them on the new stage because they are loaded by reference, but to delete them in the original USD would make it difficult to work within those USD stages.

To both have the necessary environment setup in the USD stages but not export them when they are being referenced, you need to move non-referenced items out of the default Prim.

  • Use the hamburger icon on the top right corner of the Stage tab to open the options. Select Show Root.

  • Drag the robot out of World and into Root. It should now be parallel to World.

  • Right click on the robot and Set as a Default Prim.

Now if you open a new stage and load the same file again as a reference, only the robot will be imported.

6.4. Summary

In this tutorial we learned how save and open USD files.

6.4.1. Further Readings