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

By Andrew Klein
| Your Rating:
rating star nonerating star nonerating star nonerating star nonerating star none
(0 Votes)
| 197839 Views
| 0 Comments
| Comments 0
Date Added: 9th December 2009
Software used:
Maya, mental ray
1094_tid_Fig.26-(final).jpg
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.

1094_tid_Fig.01.jpg
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).

1094_tid_Fig.02.jpg
Fig. 02

1094_tid_Fig.03.jpg
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).

1094_tid_Fig.04.jpg
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).

1094_tid_Fig.05.jpg
Fig. 05

1094_tid_Fig.06.jpg
Fig. 06
1094_tid_Fig.07.jpg
Fig. 07



next page >

 
1 | 2 | 3
Related Tutorials

Tutorial

Gallery Image.



Keywords: glass, object, liquid, wine, light,

Go to tutorial
rating star nonerating star nonerating star nonerating star nonerating star none (0)
Comments 0 Views 149810

Tutorial

Gallery Image.



Keywords: car, vehicle, tire, roof, glass,

Go to galleries 1
rating star nonerating star nonerating star nonerating star nonerating star none
Comments 0 Views 100895

Tutorial

Gallery Image.



Keywords: reflection, refraction, materials,

Go to galleries 1
rating star fullrating star fullrating star fullrating star fullrating star none
Comments 4 Views 82954

Tutorial

Gallery Image.



Keywords: ZBrush, Cartoon, Character, Maya, Female

Go to galleries 1
rating star fullrating star fullrating star fullrating star fullrating star full
Comments 1 Views 8781
Readers Comments (Newest on Top)
avatar
(ID: 237812, pid: 0) Hardik on Fri, 06 December 2013 1:41pm
Thanks a lot for the tutorial.
avatar
(ID: 201081, pid: 0) Antiss on Tue, 04 June 2013 9:58am
My render keeps rendering a thick opaque glass no matter what i change
avatar
(ID: 152795, pid: 0) Jasmine on Fri, 28 September 2012 6:22am
Great tutorial. It's always nice to find a tutorial that is well explained.
avatar
(ID: 149041, pid: 0) 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
avatar
(ID: 129785, pid: 0) 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
avatar
(ID: 117264, pid: 0) Savannah on Tue, 15 May 2012 10:23pm
Very helpful :) Thank you!
avatar
(ID: 86723, pid: 0) 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!
avatar
(ID: 77780, pid: 0) 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