Page tree

Versions Compared

Key

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

...

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.

...

It is important to note that in this usage, presence conceptually has no bearing on light scattering (and vice-versa). Where a material is partially present, its light scattering properties do not change. Instead, this is interpreted as the material scattering less often, with each scatter event being identical to what would happen with a totally present material. Critically, this mean that presence is not a way to model transparent surfaces such as glass, because the light scattering and refractive properties of the glass cannot be modelled modeled by presence alone.

A leaf rendered with PxrDiffuse, using a leaf texture map as input to the presence parameter.

...

The RixOpacity object is bound to a shading context, similarly to a RixBxdf object. RixOpacity::GetPresence() will typically use this shading context (along with any pattern inputs) to return an array of presence values. There are RixShadingContext::numPts presence values in the array. These presence values need to range from 0 to 1, where:

  • 1 is fully present
  • 0 is fully absent
  • any value in between would usually denotes a probabilistic presence for anti-aliasing

...

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, to 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 describes the transmittance straight through the surface (no bending)

...

When the RixOpacity API returns both a presence and an opacity value, they are combined (multiplied) together. In this case, one could thing think of the presence component as the 'intensity' and the opacity component as the 'color'.

...

The former would usually use probabilistic hit-testing, where each camera ray would use the (scalar) presence value as a probability to hit the surface, and either result in an actual hit, or a continuation (without a hit). In this case, for each original ray, only one shading event is computed (on the actual hit), although multiple presence evaluations may have happened.

The latter would usually usually use blending-and-continuation. On hitting a surface with (colored) opacity, shading would be computed, and weighted by (1 - opacity). A continuation ray would then be traced from this hit point (carrying a colored weight equal to opacity), and the process repeats, until hitting a surface with full opacity. In this case, for each original ray, multiple shading events may be computed (and special care needs to be taken to prevent a combinatoric explosion of the number of rays and shading events).

In Renderman RenderMan RIS 22, it is possible to use both approaches in all cases, independently of the final opacity being scalar or colored. This means:

...

However, note that as with most of the caching systems, this may introduce bias, manifesting itself as blurred results due to interpolation from the cached values. Presence and opacity caching efficiency is driven by the opacitycachememory setting – a speed vs memory trade-off. The more memory is allocated to this cache, the more efficient the opacity reuse will be.

It is also important to consider the effect of caching and view-dependent shading signals. It is not possible to meaningfully cache any presence or opacity values when these depend on the viewing direction (e.g. facing ratio). In case it is attempted the caching of a view-dependent signal, the result will not be deterministic, varying on which ray hit will trigger the evaluation of the opacity for a portion of a surface.

[Historical] Presence vs. Bxdf Continuation

...