Skip to content

prman_20.Home

Mitch Prater edited this page Sep 6, 2022 · 37 revisions

Introduction

The prman_20 branch of Laika's Shading Library is the penultimate version based on the RenderMan 20 Physically Plausible Shading system and the RenderMan Shading Language. It makes extensive use of Co-shaders, and is founded on a few core concepts:

  • A Material template is used to create a Material. It encapsulates all the characteristics of a physical material, including its surface displacement.
  • Multiple Material shaders can be attached, as an ordered set of coshaders, to a given surface in order to layer multiple materials onto the object. Each Material has an associated Opacity that defines where the Material is and where it isn't, along with Transparency to control what percentage of light can pass through the Material.
  • A single Material itself is composed of three strata: the Upper, Middle, and Lower. Light passes between each pair of adjacent strata according to the chosen Fresnel or Blend function and its settings. Any number of individual Responses can be added to a given stratum (or none at all), and those Responses are combined according to their relative contributions as controlled by the Material's author and to reflect the characteristics of the desired material. The interaction of all these Responses to illumination, with each other, and between the strata is, by default, designed to be energy conserving and physically correct. However, this behavior is easily controlled and overridden as needed.
  • Displacement in each Material Layer is influenced by the Displacements of the Materials under it in an automatic, physically plausible, but user-controllable way. In this manner, a Material shader represents a true physical material and not simply a set of illumination responses.
  • A powerful, efficient, and extensive Override mechanism. This allows any shader parameter's value to be easily overridden in highly specific and broadly configurable ways within the scene in order to tailor the rendered image as needed. Rather than relying solely on coshader attachment, this system also allowed more fine-grained control based on Object and Material name classifications and pattern matching.
  • The illumination produced by light sources, and/or the light reflected from the Materials, can be influenced by specialized coshaders called Light Effectors, which can alter any characteristic of the illumination produced by the light. In this way, a small number of atomic light source shaders can be used to create an infinite variety of lights and lighting effects. These Light Effector effects can be associated with light sources, surfaces, or both.

Material

When Materials and their Responses are combined, only those that can contribute to the resulting image are sampled according to their degree of contribution to the end result. In this way, even though the number of layered Materials and their Responses can be large, no computation is wasted on bxdfs that aren't relevant for a given pixel. In practice, this system was very efficient, resulting in frame render times well below the industry average.

The RenderMan shader authoring tool Slim is used to create, save, and update networks of shading nodes (in Slim parlance, a shading node is known as a template), define the shader network's end-user parameter interface, and build the network into a shader.

Clone this wiki locally