Iray Programmer's Manual

Modeling glass

In real life, glass objects always have a thickness. Even when really thin, their depth is often not inconsiderable. In order to compute proper refractions, Iray expects light rays to travel through solid geometry.

In some cases, the thickness really is negligible. Examples are far-away windows or soap bubbles, cases where refraction effects are no longer visible. In such cases, modeling objects without a thickness is fine, if the materials are set up accordingly. The thin-walled feature of MDL is designed for just this purpose. Remember that refractions will be ignored with this setting enabled.

Figure 1. Thin-walled glass material
File: images/modeling_glass_thinwalled.jpg

Iray Photoreal will be able to properly compute and render refractions when glass is modeled as a solid geometry.

Figure 2. Glass material on a solid geometry
File: images/modeling_glass_thickwalled.jpg

The following example illustrates how important it is to model glass geometries in the exact same way as they appear in real life in order to get an accurate result with Iray Photoreal.

Figure 3. Light bulb modeled with a single continuous line. Once the Lathe modifier is applied, the result will be a solid geometry. When rendered with a physical glass material, the bulb will look like its one solid piece of glass.
File: images/modeling_lightbulb_solid.jpg

To model a realistic bulb, ensure that the hull is one thin layer of glass that always has a thickness. Model a very thin external layer.

Figure 4. Physically correct modelled lightbulb. Note the drastic difference between the solid lightbulb above and this version which uses a modelled hull.
File: images/modeling_lightbulb_shell.jpg

When rendered with a physical glass material, the result will now be photorealistic. Note the strong refraction effects at the top of the bulb.