Guide / Materials

Nested Dielectrics

Glass, liquid and ice that overlap, without cutting the meshes apart.

A drink in a glass, ice in water, a bubble in a liquid: two clear materials that meet. Blender's Cycles bends light at every surface it meets, including the hidden ones where the two overlap, so the liquid looks wrong at the glass. Reblend works out which material fills each overlap and bends light only where one material really meets another, with the ratio of their IORs.

Whiskey with ice in a glass rendered without dielectric prioritiesThe same glass with priorities: the liquid meets the glass cleanlyWithout prioritiesWith priorities

Automatic priorities

Render Properties > Light Paths > Nested Dielectrics > Automatic Priorities, on by default. Overlapping glass and liquid objects get a priority from their size, the smaller one higher, so a glass wall, an ice cube or a bubble wins over the liquid around it. Only closed meshes with a refractive material take part, and only where they overlap or touch. Most scenes need nothing more.

Set a priority by hand

Object Properties > Shading > Nested Dielectrics > Priority, from 0 to 64. Where two objects overlap, the one with the higher priority fills the overlap; the other's surfaces inside it are ignored. Any priority above 0 ranks above the automatic ones. With Automatic Priorities off, only objects with a priority above 0 take part.

Modelling

Let the liquid overlap a little into the glass. A gap between them renders as a thin layer of air. Where they overlap, the glass fills the overlap, as the smaller object or by its priority.

Give the liquid its color with Reblend Surface's Transmission Color and Depth, or with a Volume Absorption node on the material, not with the color of a Glass BSDF. Otherwise the color comes from the surface and doesn't deepen with thickness. See Reblend Surface.

Other engines

Priorities apply only with the Reblend engine. Blender's Cycles renders the same file without them. Files from the Reblend 1.0 app keep their settings.