Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Bxdfs not only compute the scattering of light, but are also allowed to provide the presence and opacity :

  • presence (a scalar) 
  • opacity (a color)

of non-opaque materials. This  This is done using the RixOpacity interface. A RixOpacity is queried by , that the renderer will query by invoking RixBxdfFactory::BeginOpacity().

Note that the term opacity has traditionally be used to describe several notions, including presence. In RenderMan RIS, the presence is a separate notion from opacity.

...

Historically (RenderMan RIS 21 and before) presence has been used for masking out parts of an object, while opacity has historically been used for coloring shadows cast by an object. Depending some ray types (e.g. camera rays), opacity was being ignored, and probabilistic hit-testing was mandatory for presence.

In RenderMan RIS 22, this has been unified, and presence and opacity are now combined into a single property, the final opacity. This final opacity can be used for both probabilistic hit-testing and traditional 'blending' opacity.

However, despite the fact that we are now dealing with a combined final opacity, it can still be helpful to describe the main two usages of this quantity as:

  • a 'presence' (actually: scalar final opacity)
  • an 'opacity' (actually: colored final opacity)

Note:

  • the RixOpacity API still exposes two hooks (for each of the presence/scalar and opacity/colored component of the final opacity), and depending on the instance hint returned by the RixBxdfFactory, and on the ray type, only one of this hook may be called.

Presence (scalar final opacity)

Consider the case of trying to render a tree leaf. Rather than model it as a polygon mesh, it's common to represent a leaf as a cheap bilinear patch with an associated mask texture representing the leaf shape. Where the mask is zero, there is no leaf. We use the term presence rather than opacity to capture this use case. The leaf-shaped map is a scalar presence map.

...

Nonetheless, it can be desirable to have a method by which approximate colored shadows can be efficiently produced. These are often preferable to the physically realistic, but noisy, color shadows produced by considering indirect paths. RenderMan allows the bxdf to return an opacity color, which will influence the colors of shadow resulting from tracing transmission rays. An opaque object would yield black shadows, as if returning an opacity of [1 1 1], i.e. white.

...

Note that opacity:

...

opacity describes the transmittance straight through the surface (no bending)

Below is an example using opacity to yield colored volumetric shadows. The box encloses both the angel statue and a volume. The only light source is behind the stained glass window (the right wall of the box).

...

  • if the shading mode is k_RixSCPresenceQuery, only the RixOpacity::GetPresence() method will be called. RixBxdfFactory::BeginOpacity() need only evaluate the pattern inputs relevant to computing presence.
  • if the shading mode is k_RixSCOpacityQuery, either RixOpacity::GetPresence(), RixOpacity::GetOpacity() (or both) will be executed on the object, and pattern inputs relevant to both presence and opacity should be fully evaluated.

Probabilistic Hit-Testing