Closures

In Arnold 5.0 surfaces and volume shaders return closures rather than final colors. Closures describe the way surfaces and volumes scatter light, leaving the lights loops and integration to Arnold. This approach makes more optimizations and better rendering algorithms possible.

Types

BSDF and BSSRDF Closures

BSDF and BSSRDF closures define how light scatters on and below surfaces.

Diffuse BSDF
BSSRDF

Refraction BSDFs and Absorption

For refraction, the BSDF takes an interior closure list parameter that defines the interior of the object. This can be used to model volume absorption or scattering inside glass for example.

BSSRDF

Emission Closure

The emission closure is used to emit light from surfaces.

Emission

Transparent and Matte Closures

Surfaces are opaque by default, and the transparent and matte closures can be used to make them transparent or to affect the alpha channel. When making a surface transparent or matte, other surface closures should have their weight reduced accordingly, so that the total weight of all closures does not exceed 1 and energy is conserved. Mixing with other closures can be done as follows:

Diffuse BSDF with transparency

The transparent closure makes the surface transparent, revealing objects behind it. The matte closure creates a hole in the alpha channel, while blocking objects behind the surface. This can be used to composite other objects into the image after rendering.

The relation to opacity and alpha is as follows:

opacity = 1 - transparent
alpha = 1 - transparent - matte

Stochastic Transparency

For best performance, stochastic opacity should be used. For OSL shaders this is applied automatically, for C++ it can be done like this. Note that for shadow rays only opacity is needed and creating BSDF and evaluating any parameters needed for them should be skipped for best performance.

Stochastic transparency

Volume Closures

The weights of volume closures are absorption, scattering and volume coefficients, with higher values resulting in denser volumes. Shadow rays only need absorption, and so may skip computation of scattering and emission and avoid evaluating any linked parameters needed for them.

Volume

AOVs

Shaders using closures cannot write lighting to AOVs themselves, rather Light Path Expression AOVs can be used.

 

  • No labels