How to create realistic renderings with transparent materials

You’re probably asking yourself, “What are nested dielectrics, and why should I care?”

First, dielectrics are materials that do not conduct electricity which pretty much means all materials besides metals. Nested dielectrics, in turn, refers to non-metallic objects modeled within other non-metallic objects. The reason you should care about nested dielectrics is it is a difficult problem to render situations like this, especially when you look at semi-transparent dielectrics.

For example, if you’re modeling a drink in a glass with ice cubes, air bubbles and water droplets on the surface of the glass, and you want an accurate rendering, your rendering engine needs to be able to account for different Index of Refraction values for all the models – the glass, drink, air bubbles and ice cubes.

There are at least four different ways in which this can be modeled:

The first method is to model such that the volumes of different geometries don’t overlap, but instead are coincident (Fig 1). However, rendering coincident surfaces can be incorrect due to modeling precision errors. This approach is also very tedious, especially if you have a complex shape like a perfume bottle for instance.

The second method is to have a slight air gap between the volumes (Fig 2). All renders can handle this method but it will not produce correct results. The refractions will look somewhat plausible but compared to a correct render, they are visibly wrong.

The third method is to model interfaces (Fig 3). Instead of thinking of the model as a single object, you break it down and model the actual “interface” between the surfaces. Some renderers like Mitsuba, Keyshot, LuxRender use this approach, but it will not work in Fusion since models are also used for prototyping and building products, so splitting up the surfaces is not a good idea.

The last method is to model the liquid and glass as overlapping volumes (Fig 4). This is the simplest to model, but the drink will appear to be inside the glass interior. The solution is nested dielectrics. Most renderers like Arnold, Maxwell, RenderMan and Houdini have this feature.

With this approach, you model the liquid and glass as overlapping geometry as shown in Fig 4. Then you set up priorities on the different models. At render time, wherever multiple geometries overlap, the shader for the model with lowest number contributes. When deciding the numbers, in the area where the geometry overlaps, the geometry that you want rendered should have a lower number and the one that you don’t want rendered should have a higher number.

In the example below, glass has the highest priority (winner), so it has the smallest number, 1. The second priorities are for the ice cubes and bubbles, 2. The third priority is for the drink in the glass, 3.

Nested dielectric rendering in Fusion

Model and Rendering by: Roberto Ziche

What happens if you set the wrong priorities?

In the above example, the priorities are set as follows:

glass = 1, icecubes and bubbles = 2, liquid = 3

Note that both bubbles and ice cubes are inside the liquid and you want them to be visible, so they have a lower number than the liquid. But if you set it up as follows:

glass = 1, icecubes and bubbles = 2, liquid = 0

Then you would see this result. It does not render what you expect. The ice cubes and bubbles are not seen in the drink anymore.

How do you set this up in Fusion?

The dielectrics priority control option will only show in the context menu under Render Workspace. Follow the steps below the set up the dielectrics priority:

Find the bodies/components that you want to set the priority

Right click on the body/component and call the context menu.

Click on “Dielectrics Priority Control” option

In this window, switch the “default” option to “fixed” option.

Choose an appropriate index in the drag down option: 0 for the highest priority and 5 for the lowest priority.

Click OK to confirm.

You will see the result once you turn on Ray Tracing.

Now, hopefully you can see the value of having nested dielectrics as a feature in our rendering workspace. Whether you’re modeling a glass of whiskey with ice cubes, a bottle of wine, or perhaps some non-alcoholic dielectric as well, play around with these different priorities in your renderings and let us know what you think in the forums.