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
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.
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:
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.
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.
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: