Skip to content

prman_23.Material Layering System

Mitch Prater edited this page Oct 14, 2022 · 1 revision

The Material Layering System is based on the PxrSurface shader. This shader contains a number of individual responses and response types that can be used to define a material's response to illumination. A single PxrSurface bxdf is used to create the appearance for an entire set of layered materials. To do this, the parameter settings of each individual material layer are composited together to produce the final set of parameter values that control the PxrSurface shader. Similarly, a single displacement shader is used to create the composited set of layered material displacements.

These two shaders, and the top-level Material Parameters, are contained in the shading-library Material_v2_NMC macro. This macro uses the NetworkMaterialCreate and ShadingGroup nodes available in Katana version 3.2 and higher to encapsulate all the shading required to define a fully Layered Material that will be rendered with RenderMan 23 and RenderMan 23 for Katana.

Material_v2_NMC

In the Katana Node Graph, you can Tab-create a Material_v2_NMC node.

The Material_v2_NMC node's Parameters set the constant, non-connectable attributes that control the PxrSurface shading computations. Since these are constants of the PxrSurface shader, these settings will apply to all the Material Layers it contains.

Material_v2_Shaders

Inside the Material_v2_NMC NetworkMaterialCreate node is a Material_v2_Shaders ShadingGroup node.

The Material_v2_Shaders ShadingGroup contains the PxrSurface bxdf shader and a displacement shader, and it uses these to generate the prmanBxdf and prmanDisplacement outputs that define the bxdf and displacement shaders for RenderMan 23 for Katana renderings.

osl/material/v2_PxrSurface

The Material_v2_Shaders MaterialInput connection is where the base Material defined by an osl/material/v2_PxrSurface shader is connected.

The material_v2_PxrSurface node is a PrmanShadingNode that has an osl/material/v2_PxrSurface shader as its nodeType. Using the supplied katana/UIPlugins/ShadingNodeMenu.py script, you can type alt+p to list the available prman shaders and create a PrmanShadingNode that contains the selected shader. Alternatively, you may use the Tab menu inside the Material_v2_NMC node to create a new instance of an osl/material/v2_PxrSurface Material.

The osl/material/v2_PxrSurface shader's Parameters completely encapsulate a single Material's response to illumination as well as its surface displacement.

osl/material/v2_PxrSurface

All the connectable parameters of a PxrSurface shader are available, but in a more user-friendly and enhanced interface, where every parameter is clearly and thoroughly documented, along with controls to define the Material's displacement and how it relates to other Material Layers.

Each response has its own Enable parameter. Initially, all responses are disabled. The more responses that are enabled, the more computation the PxrSurface shader must do: for greatest efficiency, only enable those responses that are necessary to create the Material.

Expanded osl/material/v2_PxrSurface