Search Unity

Pixar’s Universal Scene Description (USD) is a file format designed for large-scale asset pipelines, with a particular focus on parallel workflows. Apple also recently adopted this format for augmented reality applications in the form of USDZ. We are excited to announce that the USD Unity SDK is being released as a Preview Package for Unity! This package greatly expands on the existing USD integration with Unity. In this post, we’ll briefly explain the supported features and how to get started.

Getting Started

To get started, open the package manager (Window > Package Manager), enable preview packages (in “Advanced” options), search for USD and click the install button.

The USD importer is designed to use a linear colorspace, so ensure your scene colorspace is set to linear.

The package also requires .NET 4.x API compatibility for standalone player builds (currently limited to OSX and Windows). This should be set in the project settings as well:

Finally, to enable the highest fidelity vertex skinning, skin weights should be set to “Unlimited” in the project’s quality settings (Unity 2019 and later):

Working with Sample Scenes

Several sample scenes are provided to show how to work with the USD package and the run-time components. When working with Unity 2019.1 and later, these package samples are available via the Package Manager and can be easily imported directly into your project. For older versions of Unity these samples are available via the Film & TV Toolbox repository as an asset package.

Requirements

The USD package is supported on Windows / OSX (editor and player) and compatible with Unity 2018.3 (2018.3.4f1 and up) and 2019.1 (2019.1.0b2 and up).

Importing & Exporting Assets

Once the USD package is installed, a new top-level USD menu will provide access to importing and exporting USD assets. All file types supported by USD can be imported, including .usd, .usda (ASCII / text), .usdc (binary), and Alembic .abc files.

Assets can be imported as prefabs for maximal reuse, as GameObjects for quick experimentation, or as Timeline clips if the asset represents an animation clip that only needs to be used in conjunction with Timeline.

Imported assets always have a root object with a UsdAsset component. This component retains a path to the source USD file, which can be a relative project path or an absolute path to any valid file location. In this way, typical Unity project-centric workflows and large asset pipeline workflows are supported.

The UsdAsset component provides control over the import policies as well as what aspects of the asset are imported. It also includes buttons to refresh values from USD, to completely re-import from USD, and to delete all USD components. The advanced tab is intended for advanced users who need additional control over the import process.

Cameras

Cameras can be imported, exported and animated using Timeline. Clipping planes and camera projection are preserved along with the position and orientation of the camera.

Materials & Shading

USD assets may have materials associated with the geometry. There are two material systems supported by the Unity importer: Pixar’s “display color” and “preview surface”. Display color is limited to albedo and alpha vertex colors, where preview surface is similar to the High Definition Render Pipeline (HDRP) Lit surface shader.

Materials can be imported and exported from the built-in render pipeline, HDRP or lightweight render pipeline (LWRP). Custom exporters can be written using a simple interface and custom Unity shader parameters are automatically preserved on export and import.

Vertex Skinning

The USD distribution ships with skeletal deformation support in the form of vertex skinning via UsdSkel. When an asset has a UsdSkel skeleton rig, it will be imported into Unity automatically as a SkinnedMeshRenderer. Similarly, when exporting a model that contains a SkinnedMeshRenderer, it will be exported as a UsdSkel skeleton. Below is an example of Volund from The Blacksmith exported to USD with vertex skinning, rendering in usdview, an external viewer for inspecting USD files:

USD Variants

A powerful feature of Universal Scene Description is the ability to author variants of an object. The USD Kitchen set example provided by Pixar shows how variants can be used to create geometric and shading variants. In the example below, the selected crayon can either be new or worn (geometric variants) and the color can be selected from one of several shading variants.

USD Payloads

USD payloads enable the construction of extremely large assets by providing a mechanism to selectively load and unload subsets of a scene. When the payload is unloaded, the data does not exist in the Unity scene or in the USD scene in memory, making unloaded assets extremely efficient.

USD assets authored with Payloads will appear empty initially to ensure large scenes can be loaded incrementally as needed. Payloads can be loaded and unloaded using the USD menu, by using the UsdPayload component, or by changing the default policy on the root USD game object.

Streaming Playback

USD animation caches and skeletal animation can be streamed into Unity using the Timeline. Each frame of animation is streamed from disk on demand, enabling efficient playback of massive animation caches. USD files can be used as Timeline animation clips to be applied to a single UsdAsset in the scene hierarchy. To further boost performance, playback has been integrated with the C# Job System, reading data from disk and streaming it into Unity from multiple threads.

Timeline Recorder

Similar to streaming playback, a Timeline USD Recorder track can be added to capture animation over a given frame range. To add a recorder track, right-click an existing timeline and add a new track by selecting “Formats.Unity.USD > Usd Recorder Track” then add a recorder clip by right-clicking on the recorder track and selecting “Add USD Recorder Clip”.

Attribute Inspector

At times it can be helpful to inspect the underlying USD data exactly as it exists in the file. Typically an external viewer is used, such as usdview; however, this data can also be inspected directly in Unity by expanding the UsdPrimSource component. Once expanded, all attributes authored on the underlying USD Prim (USD’s equivalent to a GameObject) can be inspected.

The USD declaration of any attribute can be viewed as well, which can be both helpful for debugging and a great way to learn how that data was originally authored. This output also includes the documentation associated with the attribute, when it is part of an official schema.

Next Steps

The latest release of the USD Unity SDK makes it easier than ever to get up and running with Pixar’s Universal Scene Description. With these tools, feature-film scale pipelines can be created for Unity. USD layers enable non-blocking workflows where many artists can work on a single asset in parallel, without blocking each other with locked files.

We believe the world is a better place with more creators in it and we would love to hear what you create — let us know in the forum!

返信する

これらの HTML タグや属性を使用できます: <a href=""> <b> <code> <pre>

  1. Thank you, Jeremy, for all your work bringing this to fruition.

  2. Thanks for this, I’m needing AR asset streaming for 8 different projects, and USD is the route I’m going to take. GLTF/Umbra is going to take a beating on this one.

  3. Is there a way to update the contents of the USD and see those changes updated in the unity scene? I don´t seem to be able to update it unless I reimport the USD.

    1. There is a refresh button in the upper right corner of the UsdAsset component, is that what you’re looking for? The API that this button calls is also publicly exposed on the UsdAsset MonBehaviour.

      If that is still too heavy, the SetTime( ) API is what Timeline uses and is optimized for playback, if what you want is a super light-weight update (just for deforming points, etc).

    2. There is a refresh button in the upper right corner of the UsdAsset component, is that what you’re looking for? The API that this button calls is also publicly exposed on the UsdAsset MonBehaviour.

      If that is still too heavy, the SetTime( ) API is what Timeline uses and is optimized for playback, if what you want is a super light-weight update (just for deforming points, etc).

  4. This is awesome news! Does this preview include USDZ support to allow for runtime importation of USDZ models for Unity-based AR applications?

    1. USDZ *export* is fully supported for creating AR models, but import support is currently limited (it does not yet support importing textures from USDZ).