Glass Material
By Neil Blevins
Created On: June 19th 2002
Updated On: Aug 21st 2005

Here's a tutorial on how to create a glass material. For my example, I'll use the Brazil renderer inside 3dsmax, although there are equivalents in any renderer that allows raytracing.

Glass

The basic ingredients are as follows:

Glass

Here's the max file that made the image above, max5, brazil rio: rio_glass.zip (16K)

The first material in the file is a Brazil Advanced Material. Set the diffuse to Black. Add a falloff map to the reflect slot set to fresnel with an IOR of 1.5. Check the checkbox beside the Opacity map in Basic Surface Properties rollout, that will change it to Transparency (Tx). Add your color to the transparency. Set IOR for the transparency to 1.5. Make sure 2 sided is on under Base Shader. Turn off specular highlight if you want to use real raytraced reflections only and not light the scene with specular lights.

The second uses the Brazil Glass Material. Basically the same thing, it automatically has no diffuse, turn the reflections on, set to fresnel, IOR 1.5, set the transparency to the color you want, IOR 1.5. Turn off specular highlight if you want to use real raytraced reflections only and not light the scene with specular lights.

Make sure that there are at least 8 refraction bounces, if not more. This will ensure a lot of raytraced bounces inside the glass before it returns the background color.

Remember, half of what makes a material look like a particular material is the environment it's in. A wise man said reflections only look as good as the environment the object is reflecting, keep that in mind. For this scene, have a light background and a dark foreground. That way, the brighter back shows off the transparency of the object, and the dark foreground from behind the camera gets "caught" in the refractions. And of course, place a few self illuminated white cards near your camera to appear in reflections. These cards have an output map in the diffuse slot, and a higher then 1 RGB level, which blows out the cards to values above white, making them appear brighter in reflections.

Glass Clear

Here's a clear glass. Identical to the file above, except the color has been removed from the transparency.


This site is ©2005 by Neil Blevins, All rights are reserved.
Back to NeilBlevins.com