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
Creating Realistic Glass Using 3 Different Materials

| Your Rating:
rating star fullrating star fullrating star fullrating star fullrating star none
(Score 3.96 out of 5 after 26 Votes)
Date Added: 9th December 2009
Software used:
For this demo we will utilize Maya's Blinn material, Ramp texture, and Sampler Info utility. We will also use Mental Ray's Dielectric Material and new Mia_material. The user of this tutorial should note that I have also used Mental Ray as my renderer, with Final Gathering, Global Illumination, Caustics, and Image Based lighting used for optimal realism.

Creating Glass with a Blinn

Our first step is to create the geometry for the glasses. Whilst simple, we need to make sure that the revolved surface (constructed here using a NURBS) is thicker at the base (just like a real pint glass). See Fig.01.

Fig. 01

Next, I duplicate out a few of these, and set up the scene. My render settings are listed here as well (Fig.02 - 03).

Fig. 02

Fig. 03

Understanding What Goes into Glass

There are several components which need to be created. The first thing to note is that, of course, glass is a transparent entity. While this is the most obvious, we cannot overlook the subtleties inherent in this transparency due to the thickness of the surface as perceived. Second, glass is reflective, but again we must examine how this reflectivity works. It is a specularized surface, and thusly not very diffuse in terms of surface properties. Finally, glass is a refractive surface, bending light as it enters this medium which is denser than the air around it. Let's break these elements down for a closer look:

Transparency - As mentioned, glass is transparent. But let's examine what happens to our material as it gets close to the edge ... It gets thicker. At the edges of the glass we are actually looking through a denser amount of material. Think about it this way: when a space shuttle exits the atmosphere by flying straight up (off the perpendicular normal of the Earth) it only goes through 62 miles of air to reach outer space. Conversely, if you were standing on the top of Mount Everest and could look both north and south from the summit, you might be able to see 150 miles in each direction (a total of 300 miles) before the Earth curves away and you are looking into space. When we look at the edge of the glass, the same thing is true, therefore we are looking at more "object" and should treat these edges as less transparent (Fig.04).

Fig. 04

Reflectivity - Applying the same principle as before, that things are going to act oddly at the edge of our glass, we next throw into the mix the Fresnel Effect. When you look down at a reflective surface, the amount of reflection is determined by the viewing angle. If you were to look straight down into a pool of water, you would be able to see through the minimal reflectivity of the surface to the elements in the water below. At a more even angle, looking across the water, you are more likely to see reflection of the sky above, and not what is underneath. So, when texturing our reflectivity, we will also have to examine these edge effects to make our glass more reflective at glancing normals, and less reflective at normals which point directly towards the camera.

Specularity (vs. Diffuse) - We must also observe where on the spectrum for Diffuse to Reflective our glass needs to be. For the most part, since it is a dense, hard object, we will need to give it a low diffuse value and a higher specular value. We can then control glossiness depending on the purity of the glass, or whether or not the glass is "frosted".

Refractivity - Finally, since our glass is a denser medium than the surrounding air, we will need to compute the index of refraction value. A chart is listed for your convenience in Fig.05. We can quickly see that Glass's IOR value is 1.52 (or really any value between 1.5 and 1.55). As seen in Fig.06 - 07, when a beam of light enters a denser medium, it bends towards the normal of that surface, changing the perceived shape of objects inside or behind. The famous example can be seen on the left, this is called the "stick in the pond" example, theorized first by Socrates. The straw is not really bent, but the fact that we see it through a glass, with water inside that glass, means that light is bending twice between the straw and the eye. This concept has a name: Dielectrics (hence the specialized Dielectric shader that we will use soon).

Fig. 05

Fig. 06
Fig. 07

continued on next page >

1 | 2 | 3
Related Tutorials

Indirect Illumination with Mental Ray

by Andrew Klein
published on 2009-12-09

Keywords: indirect, illumination, lighting, mental, ray,

rating star fullrating star fullrating star fullrating star fullrating star half (14)
Comments 3 Views 137100

UV Sets in Maya

by Andrew Klein
published on 2009-12-09

Keywords: UV sets, textures, Relationship Editor, UV linking,

rating star fullrating star fullrating star fullrating star fullrating star full (6)
Comments 4 Views 66825

Maya rigging: Introduction to rigging a human torso

by Jahirul Amin
published on 2014-02-10

Keywords: Rigging, Maya, Body, Torso, Animation

rating star fullrating star fullrating star fullrating star fullrating star half (34)
Comments 3 Views 150591

PaintFX: The Ultimate Hair Designer

by Yinako Minako
published on 2009-06-22

Keywords: cg, hair, maya, paint, effects,

rating star fullrating star fullrating star fullrating star fullrating star full (1)
Comments 0 Views 33372
Readers Comments (Newest on Top)
Luxmi Annavi on Fri, 09 October 2015 3:27am
Thank you .Very nice.crystal clear tutorials.I am learning Maya by free video tuts.
Nishanth on Sat, 16 May 2015 5:32am
nice i gote some idea.thank you
Hardik on Fri, 06 December 2013 1:41pm
Thanks a lot for the tutorial.
Antiss on Tue, 04 June 2013 9:58am
My render keeps rendering a thick opaque glass no matter what i change
Jasmine on Fri, 28 September 2012 6:22am
Great tutorial. It's always nice to find a tutorial that is well explained.
Ciaran on Wed, 12 September 2012 12:59pm
Thought this was an excellent explanation and tutorial for glass simulation, even if 'Rob' gained nothing from it, it does give a good idea of the concept of refraction and reflection. Thanks.CB
VFX Vagabond on Mon, 02 July 2012 12:10am
I have searched countless times to find a solution to creating a glass shader and I can't believe its as simple as the MIa Material shader with a glass preset. Thanks a million
Savannah on Tue, 15 May 2012 10:23pm
Very helpful :) Thank you!
Mark on Wed, 15 February 2012 9:39pm
Actually I found this pretty helpful. It is very much at the beginner level but it shows you 3 different ways to create a glass look and helps you to identify what it is that gives glass the look that it has, and how to reproduce that in Maya. Thanks!
Rob on Wed, 11 January 2012 12:20pm
Terrible, though it is great to see you understand Maya, very good scene by the way. I have learned nothing from this "tutorial" apart from what I already understood about glass from my everyday encounters with it....
Add Your Comment..