Page tree

Versions Compared

Key

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

...

Typically users model such things by creating a boolean operation so that these surfaces never really touch one another, it's either/or and not both at the same time. This can be complicated to setup set up and nearly impossible when trying to use a simulation like flowing water to do this effect. So in RenderMan you can add an attribute to the shape called Intersection Priority. It's a simple number to specify priority where lower numbers are higher priority.

Info

You can find the paper for this topic here:

...


We cache the IOR set in the material to determine the bending of rays, you can override this with an attribute or let the material set it itself. 


Below are a few examples of different solutions.

Carousel Image Slider
maxNumber4
sliderHeight300
labelsFilterdielectricExample
slidesToScroll1
slidesToShow2
captionstrue
 


To better understand the liquid placement, below are the possible options shown in a cross-section of the glass.

  • Coincident - This is where the surfaces perfectly meet. Notice the noisy artifacts where shading points fight one another in the same position.
  • Shrink - This example slightly shrinks the liquid inside the glass but creates air gaps.
  • Intersecting/Overlapping - This is the best placement to avoid problems but needs a better hint to the renderer that they have different prioritypriorities.

...


Note

RenderMan intersection priority and IOR assumes models are built volumetrically (no two-dimensional objects) with outward-facing normals.

 

 



Carousel Image Slider
maxNumber3
infinitefalse
sliderHeight250
labelsFilterplacement

...


In the above examples, the overlapping liquid and glass is are most similar to the correct method which uses overlapping but adds the Intersection Priority to the glass and liquid shapes. Notice the change in color for the liquid and how much better it captures the light and refractions. The glass has an Intersection Priority of 1 while the liquid is 2. If we were to add ice cubes those would be 3.

 


...


In some cases, you may experience a small dark line where the geometry overlaps. To solve this you can create a Trace Bias attribute on the glass shape. By default, this value is 0.0001 but can be increased in very small increments until the artifact is gone. Note that the attribute for Trace Auto Bias must be added to the object and turned off for manual trace bias settings to work unless the global setting for Trace Auto Bias is already off. 


The glass scene is courtesy of Julien Duval.