Nested Dielectrics

Nested Dielectrics

images/waterGlasses.png

How about a nice, cool, glass of water?

This example shows how the "intersectpriority" Attribute can be used in conjunction with the "indexofrefraction" Attribute to simplify the modeling of "nested dielectric" scenes.

In such scenes, a ray encounters a number of different media boundaries (air/glass, glass/water, water/air) and each boundary requires computation of the relative index of refraction to determine the refraction direction. The renderer tracks the priorities of objects encountered as the ray transits the scene. Only the current highest priority object is actually shaded. When a ray exits a material, which object is highest priority depends on the path the ray has taken through the scene. This information is coupled with the "indexofrefraction" to respond to the glass shader's request for the "outside IOR", which forms the basis of the refraction direction computation.

In this example, PxrGlass is used to model three different materials (glass, water, and airbubble).

Users who are comfortable inspecting .rib files can find the files for this example in the /lib/examples/RIS/scenes/vcm/waterglasses/ directory of their RenderMan Pro Server installation.The settings for the materials used are found in waterglasses.look.rib.