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:

Ok, so now that we have a handle on the physics that goes into this, we can make these materials. Let's start out by trying to accomplish the look of true glass using a Maya Blinn. I will first make the colour and diffuse colour very dark so as not to influence the look of the glass at all. The transparency is set pretty high (although we will texture this in a few moments). The Eccentricity is low and the Specular Roll off is high, creating a highly specularized (less glossy) look. The reflectivity will be textured in a few moments as well (Fig.08). Note: I do not have the Reflected Colour Channel textured since I have actual objects surrounding this in the pint glass in the scene. If the glass was on its own, it would need an image to reflect, and we would place that here.

Fig. 08

It looks so bad in Fig.09, mostly because of the lack of refractivity. So reflectivity is what we will establish next.
Ok, let's get the refractivity working! (Fig.10)

Fig. 09
Fig. 10

It's looking better now (Fig.11), but the glass is still too uniform in its thickness and reflectivity. Time to add some ramps to control this!

Fig. 11

Thickness - let's first add a ramp to control Transparency. We will control this ramp using Maya's Sampler Info node. First I will create a ramp texture and link it to control the transparency of the glass. The ramp is black-to-white, as it only controls alpha information. Whiter is more transparent; blacker is more opaque (Fig.12).

Fig. 12

This will (by default) apply the ramp directly to the UVs. However, since this is a V-Ramp (as seen in Fig.12), we can use the Sampler Info Utility's facing ratio attribute to control this V-Coordinate. This will cause the ramp to be applied based on how much the normals of the glass face the camera. The top of the ramp will now represent where the object's normals are facing the camera; the bottom will represent the angle which is facing 90 degrees away from the camera. We can then perform yet another render (Fig.13 - 14).

We're getting there! Now let's establish the reflectivity that comes with the Fresnel effect.

Fig. 13
Fig. 14

The Fresnel Effect - we need to establish another connection of ramps to the reflectivity channel. Also known as the "Bidirectional Reflectance Distribution Function", our goal is to establish a ramp to correspond values of how reflective the object will be when we look at the mesh from a low angle, and correspondingly from a high angle. When established, the ramps should looks as shown in Fig.15.

Fig. 15

Our hypergraph network should look as shown in Fig.16 (note: I have re-used the sampler info node). Here is our render (Fig.17).

Fig. 16
Fig. 17

Lastly, let's add some blurring for a touch more realism. With Mental Ray we can subtly blur our reflections and refractions (Fig.18 - 19).
Done! We have now successfully created glass using a Blinn. Let's now examine how Mental Ray can do this much more simply.

Fig. 18
Fig. 19

Creating Glass with a Dielectric Material

I have now made a second pint glass and created a Mental Ray Dielectric Material to apply to it (Fig.20). The attribute editor only has a few choices; this is because all of that sampler info and ramp stuff that we had to do with the Blinn is already taken care of. The material's attributes are a hard specular/reflective surface by default, and all we have to do is set the IOR value to that of glass. The IOR_out value is also crucially important and represents the value of the medium surrounding the glass (in this case air). A situation where this might need to be altered is when we are creating a material for water that is in a plastic water bottle. IOR would be set to 1.33 for water and the IOR_out would be set to 1.46 for the plastic surrounding it. Here we see a render as well (Fig.21 - 22).

Fig. 20

< previous page continued on next page >

1 | 2 | 3
Related Tutorials

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 64938

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 135807

A portrait of Pamela Spriggs

by Ian Spriggs
published on 2016-11-14

Keywords: Ian Spriggs, Maya, portrait, making of

rating star fullrating star fullrating star fullrating star fullrating star half (5)
Comments 0 Views 7481

The Making of 'Stylish Killer'

by Alberto Casu
published on 2014-01-29

Keywords: Tutorial, Making of, Female, Character, Model, ZBrush, Maya, MARI, Photoshop, V-Ray

rating star fullrating star fullrating star fullrating star fullrating star half (26)
Comments 2 Views 141878
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..