Keep up-to-date with Free tutorials!!


Sign up to our twice-monthly newsletter today for the latest tutorials, interviews and product information.

Sign me up to receive third-party emails from 3dtotal's partners, too!

- Latest news
- Exclusive Shop Offers
- Preview early content
- Plus much more


Not Ready to take that step? OK, Why not just Subscribe to the RSS Feed

submit tutorial
1 | 2 | 3
The Dielectric Material Shader and Glass Physics Phenomena

| Your Rating:
rating star fullrating star fullrating star fullrating star fullrating star half
(Score 4.33 out of 5 after 9 Votes)
| Comments 1
Date Added: 9th December 2009
Software used:
For readers "too used" to using raytrace glass this tutorial will seem quite alien in the beginning, and the methodology of modeling the objects utilizing these two materials will definitely appear even more alien. Both the Dielectric Material Shader and the Glass.

(Physics_Phen) are closely related to each other, though technically the glass ((physics_phen) also known as mental ray glass) is not a shader. These materials were created especially for those situations in which objects of differing IORs are brought to within close enough proximity to each other that the caustics from one will affect the other. You will find several settings unique to these materials that allow you to adjust for the passage of light through differing IORs.

The goal of this tutorial will be to show you how to first create a simple drinking glass modeled specifically for these transparent shaders, and then show you how to create and adjust the settings for each.

This tutorial was prepared and illustrated using 3D Studio Max 9, using other Max versions, particularly versions 6 and older, will yield differing results than what is illustrated in this tutorial. It may be necessary for some readers to tweak their settings to obtain satisfactory results. You will need the file GPP_DMS zip file below, once downloaded, uncompress into your Max scenes directory.

Before starting, let's take a look at a common water glass with raytrace materials applied to it.

The geometries for a raytrace glass and liquid are simple and straightforward. Two objects, one representing the glass itself and a second representing the liquid contained within that glass are modeled separately. The glass will have a raytrace material with a typical IOR of 1.5 applied to it, while the object representing the liquid will have a raytrace material with a typical IOR of 1.333 applied to it. As stated, simple and straightforward. Now, take a look at the splines used to create the objects for use with either the dielectric material shader (DMS) or the glass ((physics_phen) GPP).

The use of transparent shaders requires special consideration during modeling. In the illustration, we see three distinct splines each representing that area where two differing IORs meet. Unlike raytrace that uses two solid objects for it's glass and liquid components, the geometry for transparent shaders is based upon where these differing IORs meet, for example, where the IOR or water meets the IOR of glass.

It is helpful if you look at the splines (and the objects we'll be creating from them) as being the interface of two differing IORs rather than the outside borders of physical objects.

Part One: Creation of the Water Glass

1. You will now need to open the file Shader_Profiles.max. In the perspective view, we see the three splines illustrated above. Click the longest spline (yellow) labeled AirGlassLine that we will be lathing into our drinking glass. With the spline selected, click Modifiers (on the menu bar)>Patch/Spline Editing>Lathe. In the Modify Panel of the Command Panels, set segments to 36 and enable Weld Core.

It is a good practice to label each object created, especially considering the number of objects that can often be used in a scene.
Let's label this one AirGlassObject, then on the Modify Panel, right click Lathe in the modifier stack, select Collapse All and click yes.

2. Our object is rather ragged looking, so let's take care of this before moving on. In the Modify Panel, under the Selection rollout, select Polygon and use your Select Object tool to select all of the polygons of AirGlassObject. Once selected, slide the Modify Panel down to the Surface Properties group and click on Auto Smooth. The default value of 45 is fine for our needs. Slide back up the Modify Panel to the Selection rollout and click on Polygon to close off the selection process. Your final result should look like this:

3. If not already selected, select the AirGlassObject, right click to call up the quad menu, then click Hide Selected to remove it from view. Next, you will need to repeat Step 2 for each of the remaining splines, AirLiquidLine and GlassLiquidLine, and rename them AirLiquidObject and GlassLiquidObject respectively. Use Auto Smooth if needed.


4. The above illustration shows our three objects separated from each other. You can save the file for future reference if you like, however, the main tutorial file "Project_Start.max" already has everything set up for you.

Part Two: The Dielectric Material Shader

Let's start by opening Project_Start.max, and hitting F9 for a Quick Render. See below:

This scene is composed of a simple, cornered box, a target camera, an mr Area Omni with raytrace shadows enabled, and three drinking glasses. The center glass has had raytrace materials applied to both it's glass and liquid components, this will act as a comparison object to the other two. The left drinking glass will be used for the GPP material and the one on the right will be used for the DMS. At this point, only mental ray has been enabled, we will wait until we have our materials/shaders assigned before enabling caustics.

1. Before working with DMS and GPP, let's hide the center objects that make up our raytrace drinking glass. With the selection tool, scroll out a selection that selects only the center glass and liquid, right click the selection then on the quad menu select Hide Selection.

These objects are hidden so we don't have our test renders slowed by them. Now, select the DMS_GlassAirObject from the right glass (bright yellow), this is the largest of the objects that comprise the right drinking glass. Hit the M key to call up the material Editor, and select the first sample box on the second row. Click the Material Type button currently reading "Standard", then from the Material/Map Browser list double click mental ray. See below:

The "mental ray Material" is not in itself a material, instead, it's a platform by which a material/shader is created through the use of shaders, Sound complex? It's not as difficult to understand once you understand what each of the components represents. For example, the two components we'll have an interest in shall be Surface in Basic Shaders and Photon in Caustics and GI. In the simplest of explanations, the surface shader is the equivalent to the Diffuse value we find in a standard material, while the photon shader's settings dictate how photons will react to that surface, i.e.. GI and caustics.
With the DMS_GlassAirObject selected, and the mental ray materials panel open, select the None button to the right of Surface to call up the Material/Map Browser. Double click on Dielectric Material (3dsmax) and note what's just happened to our sample slot. See below:

continued on next page >

1 | 2 | 3
Related Tutorials

HDRI and Caustics for the Beginner

by Rick Timmons
published on 2009-06-16

Keywords: lighting, hdri, caustics,

rating star fullrating star fullrating star fullrating star fullrating star none (11)
Comments 0 Views 106371

Global Illumination for the Beginner

by Rick Timmons
published on 2009-06-16

Keywords: global, illumination, beginner, max, lighting,

rating star fullrating star fullrating star fullrating star halfrating star none (6)
Comments 1 Views 171333

Making Of 'Venetian Afternoon'

by Tim Jones
published on 2009-12-09

Keywords: scene, canal, bridge, water, venice,

rating star fullrating star fullrating star fullrating star halfrating star none (5)
Comments 0 Views 26095

Final Render 101: Basic HDRI and Ray Tracing

by Stephen Reb
published on 2007-02-06

Keywords: render, hdri, material, texture,

rating star fullrating star fullrating star fullrating star nonerating star none (2)
Comments 0 Views 23471
Readers Comments (Newest on Top)
Buzzy on Tue, 03 July 2012 3:10pm
Very informative for those with little or no caustics experience. Great article.
Add Your Comment..