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:
To the novice this would seem like a black ring, but is, in fact, our transparent material. Click the Background button to place a checkered pattern in the material slot. Name the material DMS_GlassAirObject. By default, this shader is already set up for a glass object, thus, we need not make any adjustments to it. Click the Assign Material to Selection button, then click the Go to Parent button. Name the material DMS_GlassAirObject. We now have what we want the surface to appear like assigned to our object, yet, because we're designing this object to look like glass, there is one more aspect of this material we need to take care of, and that's the reaction of photons with that surface. With the Dielectric Material Shader, this is a simple matter of copying the Surface settings to our Photon settings. See below:
Click and drag the Surface button to the Photon button, and select Instance from the Copy Panel. Click OK to close the panel. What we have just done is to copy our Surface settings to our Photon settings, since we need for both of these settings to be identical to each other.
Let's see how our material looks with a Quick Render (F9).
At this point, it looks similar to raytrace glass, but once we apply the DMS to the remaining two objects subtle differences between the two materials will become more apparent.
With our first material created and applied, the remaining two are fairly easy to create. In the Material Editor, click on the DMS_GlassAirObject material to select it, then drag a copy of it to the second slot to the right. Hit H to call up the Select Objects panel and select DMS_AirLiquidObject, the smallest of the three objects. Click the Surface button to return us to the Dielectric Material (3dsmax) panel. Because our chosen object is the interface between air and liquid, we will need to make a change in the Index of Refraction from 1.5 to 1.333. Rename the material DMS_AirLiquidObject, click the Go to Parent button, and rename the material here DMS_AirLiquidObject. Assign the material to the selection. Because we Instance copied our Surface settings to the Photon settings in our first material then copied that material to the second slot it's not necessary that we drag a copy from the Surface button to the Photon button.
The third material we'll create will need special attention in its creation, as this one is an actual interface between two physical objects of differing IORs. Before moving on with this material there is something important that should be noted. You'll remember, and have probably wondered why we didn't take the element of air into account while creating the two previous materials for the DMS_GlassAirObject and DMS_AirLiquidObject. In Max, and for that matter, in any other 3D program that I know of, the element of air isn't physically modeled, that is, made into a physical object, after all, how could you apply a material to a non entity? Thus, air is considered an implicit object with an effective IOR of 1.
Our third object, DMS_GlassLiquidObject, is the point where the element of water (a physical object with an IOR of 1.333) meets the element of glass (a physical object with an IOR of 1.5). Hit H to call up the Select Objects list, and choose DMS_GlassLiquidObject. In the Material Editor, select the second material we just created for the DMS_AirLiquidObject and slide a copy of it over to the third material slot. Click the Surface button to take you to the Dielectric Material (3dsmax) Parameters. This object represents that interface where the object of water meets the object of glass, that is, we'll have light traveling through these two objects with their differing IORs. The first setting we'll adjust shall be the Index of Refraction (out) that we'll enter a value of 1.5 for. This is the IOR of the glass material. Name the material DMS_GlassLiquidObject, click Return to Parent and rename the material DMS_GlassLiquidObject here as well.
Assign the material. Let's try a quick render (F9).
Our render shows a large dark area where the DMS_GlassLiquidObject is located. Our current settings aren't allowing the light to pass through the interface, i.e., from the liquid side to the glass side.
To correct this, return to the DMS_GlassLiquidObject material in the Material Editor, click Surface and set the Outside Light Persistence to pure white. Click on the Outside Light Persistence color swatch and slide the Whiteness slider all the way down. White will work fine for this project, though other values of grey and even colors can be used to suit the needs of your scene. Try Quick Render (F9) again.
There is one more adjustment I'd like to familiarize you with before we move to the GPP portion of this tutorial. The Persistence Distance is closely dependent on the Light Persistence setting, and controls the distance at which the level of light passing through the objects is reduced to the level specified by Light Persistence.
Step 3: Glass (Physics_Phen)
1. Hit H to call up your Select Objects list, and on this list double click GPP_GlassAirObject. Open Material Editor (M), and slide the sample slots up one row to expose the unused third row. Click to select the first sample slot, then click the Material Type button (reading Standard) to open the Material/Map Browser. Double click Glass (physics_phen). Look familiar?
Glass (physics_phen) is technically a mental ray material. Its photon and surface properties, however, are governed by the Dielectric Material Shader we learned about earlier. Like the first DMS material we applied to DMS_GlassAirObject, the default settings for GPP need no adjustments as it's already set for glass. Name the material GPP_GlassAirObject then click Assign to Selection button. Now, like before, click the newly created material and slide a copy of it to the second slot of the third row. Hit H to call up the Select Objects panel, and then double click GPP_AirLiquidObject. With this second GPP material, we need only change the Index of Refraction to 1.333. Name the material GPP_AirLiquidObject and assign it to the selection.
Again, click the second material and slide a copy of it to the third slot. Hit H and select GPP_GlassLiquidObject from the Select Objects list. Earlier in the tutorial when we worked with DMS_GlassLiquidObject, we had to make special considerations for the material assigned to it. With GPP this must also be done, because this interface is where two physical forms (water and glass) are adjacent to each other. Enter a value of 1.5 into the Index of Refraction (out). Next change the shade value of Outside Light Persistence to pure white. Name the new material GPP_GlassLiquidObject and assign it. Try a Quick Render (F9).
< previous page continued on next page >