Simulation / Modeling / Design

Unlock Seamless Material Interchange for Virtual Worlds with OpenUSD, MaterialX, and OpenPBR

A shaded scene using OpenPBR materials and Omniverse RTX Renderer.

Today, NVIDIA, and the Alliance for OpenUSD (AOUSD) announced the AOUSD Materials Working Group, an initiative for standardizing the interchange of materials in Universal Scene Description, known as OpenUSD. As an extensible framework and ecosystem for describing, composing, simulating, and collaborating within 3D worlds, OpenUSD enables developers to build interoperable 3D workflows, unlocking a new era of industrial digitalization.

Additionally, NVIDIA Omniverse will offer native support for the new OpenPBR material model, a MaterialX-based uber-shader model co-developed by Adobe and Autodesk. This integration gives users a unified material interface that can be used across various applications.

Standardizing material interchange

Created to define the strategy for material representation in OpenUSD, the first item of the AOUSD Materials Working Group is to standardize the MaterialX standard library with OpenUSD in UsdShade

Any conforming OpenUSD implementation will have access to a common, standardized set of shader nodes for building materials that work across renderers, without requiring a dependency on a particular shading backend. Industries that need the long-term stability of a standard definition will benefit from this update. Developers can use OpenUSD materials and be confident that they will work in the ecosystem currently and in the future.

What are shaders and why are they important?

To describe materials in computer graphics, we use shaders, which are programs that a renderer runs to construct the material definition. The shader must tell the renderer how a material is structured, looking at the bidirectional scattering distribution functions (BSDFs) making up the layers of its surface appearance and how light is transported between them. It then describes how the BSDFs are modified across an object’s surface, usually by reading and combining textures to vary surface appearance.

There are many different languages for writing these programs and varying support for them in different renderers. For instance, many offline renderers enable writing shaders directly in C++ against their API, meaning they aren’t interoperable with other renderers. 

In real-time applications, shaders are generally written in either GLSL or HLSL. GLSL and HLSL can do more than just describe materials, such as running compute workloads in Vulkan and DirectX. GLSL and HLSL are examples of low-level shading languages, where the implementation of a material’s constituent BSDFs must be written by the user directly in the language.

At the other end of the spectrum is NVIDIA Material Definition Language (MDL), a high-level shading language. MDL provides the BSDFs as closures and the user describes how to combine and vary them to produce the desired appearance.

MDL is responsible for taking that high-level definition and generating the low-level shading code to implement that material, in HLSL, PTX, C++, or some other language. A renderer then uses that generated code directly to evaluate the material’s appearance. The same material definition can be used across renderers on different hardware platforms while maintaining the same appearance.

Materials described in this fashion can be written as a single monolithic shader, but it is more common for users to author them using shader graphs. Shader graphs enable users to create new materials by plugging shader nodes in a graph editor. Shader nodes typically map to individual functions in the underlying shading language.

Nodes such as text_roughness, text_color, OpenPBRBase, and material output connected in the Omniverse Material Editor Extension, representing a UsdShade graph.
Figure 1. A UsdShade graph constructed of connected nodes in the Omniverse Material Editor Extension

Materials can be described directly as shader graphs with OpenUSD using its UsdShade primitives as nodes. A node’s representation is unspecified. Users must provide an implementation for each shader to ensure that it works with the applications they plan on using to open the USD layer. OpenUSD enables the interchange of 3D scenes between different applications, and to achieve this, a common material description is necessary.

Describing materials as shader graphs with MaterialX

Hosted at the Academy Software Foundation (ASWF), MaterialX is an open-source, renderer-agnostic file format and library for describing materials as shader graphs. It defines a common set of nodes in its standard library. It also describes how the nodes are plugged together to form a graph. MaterialX can be represented either as an XML document with a custom schema (.mtlx format) or directly in OpenUSD as a graph of UsdShade nodes. 

MaterialX uses pluggable backends to generate executable code, the most complete of which is MDL. When a renderer loads a MaterialX material through OpenUSD, it requests code generation from the backend. The backend then generates the low-level code for the target platform, which the renderer can execute to evaluate the material.

OpenUSD, MaterialX, and MDL create materials in a high-level description that can be shared across any supporting renderer on any target platform. This ensures that the visual appearance will be the same. 

A diagram of how MaterialX uses the MDL backend to generate code from physically based visual materials and physically based non-visual materials for different platforms, including HLSL, x86, ARM, PTX, and LLVM IR.
Figure 2. Diagram illustrating how MaterialX uses the MDL backend to generate code for different platforms

MaterialX is supported natively in Omniverse using the MDL backend and can be loaded directly as UsdShade graphs, or by referencing .mtlx documents into an OpenUSD layer.

MaterialX graphs can be arbitrarily large and complex, which in extreme cases can make them unsuitable for real-time use. NVIDIA Omniverse RTX Renderer uses MDL’s distilling technology to convert arbitrarily complex materials into a compact material representation that guarantees optimal real-time performance while preserving the material appearance. 

OpenPBR: an uber-shader available in Omniverse and MaterialX

Material graphs offer users maximum flexibility for creating various materials, yet in intricate workflows, it’s often preferable to employ a single, overarching material definition known as an “uber-shader.” This shader can be used directly, for example with scanned PBR texture data. It can also serve as a foundation for further customization in a shader graph, saving users the trouble of building the entire material from scratch.

Last year, The Academy Software Foundation, Autodesk, and Adobe announced a new uber-shader model, OpenPBR being developed as an open specification and reference implementation within MaterialX. The NVIDIA Omniverse team is working with the OpenPBR group to finalize the new shading model and provide an OpenPBR implementation in Omniverse when the first production version of the shading model is released.

Four examples of OpenPBR materials rendered in Omniverse RTX.
Figure 3. A selection of OpenPBR materials rendered in Omniverse RTX

Omniverse will also have a new OpenPBR material library. Developers can use these materials, available as OpenUSD and MaterialX materials, in any OpenUSD stage. This library provides a ready-to-use, physically accurate library of materials to accelerate building visual applications.

Two angles of a warehouse simulation featuring a forklift retrieving boxes from storage racks using the new Omniverse OpenPBR material library.
Figure 4. A warehouse simulation using the new Omniverse OpenPBR material library

Getting started with material interchange

Understanding the various technologies and their interconnections is crucial for developers and content creators working with materials in computer graphics. OpenUSD, together with MaterialX and MDL, provides a solution for seamless material interchange, enabling the sharing of materials between different applications and renderers.

With the support of Omniverse and the ongoing efforts of the AOUSD Materials Working Group, the promise of seamlessly interchangeable, complete, physically accurate material descriptions will become a reality. 

In the future, the group will focus on adding complete physical material definitions in OpenUSD. This includes non-visual data like LiDAR, acoustic, and thermal properties. They’ll also explore new material descriptions like neural materials and work on exchanging OpenUSD materials with other systems like glTF. 

To get started with materials in OpenUSD, download NVIDIA Omniverse.

If you want to help or are interested in the future of materials in OpenUSD, join AOUSD and the Materials Working Group. To learn more about OpenUSD, attend OpenUSD Day at NVIDIA GTC 2024 on March 19, in person or virtually.

Discuss (0)

Tags