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)
| 194626 Views
| 0 Comments
| Comments 0
Date Added: 9th December 2009
Software used:
Maya, mental ray

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.

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

1094_tid_Fig.09.jpg
Fig. 09
1094_tid_Fig.10.jpg
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!

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

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

1094_tid_Fig.13.jpg
Fig. 13
1094_tid_Fig.14.jpg
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.

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

1094_tid_Fig.16.jpg
Fig. 16
1094_tid_Fig.17.jpg
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.

1094_tid_Fig.18.jpg
Fig. 18
1094_tid_Fig.19.jpg
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).

1094_tid_Fig.20.jpg
Fig. 20





< previous page next page >
 
1 | 2 | 3
Related Tutorials

Tutorial

Gallery Image.



Keywords: water, splash, realistic,

Go to tutorial
rating star fullrating star fullrating star fullrating star fullrating star half (28)
Comments 10 Views 85195

Tutorial

Gallery Image.



Keywords: realistic, grass, animation,

Go to galleries 1
rating star fullrating star fullrating star fullrating star fullrating star full
Comments 1 Views 73331

Tutorial

Gallery Image.



Keywords: object, glass, drink, model,

Go to galleries 1
rating star fullrating star fullrating star fullrating star fullrating star full
Comments 1 Views 42597

Tutorial

Gallery Image.



Keywords: Project, ZBrush, Maya, MARI, Photoshop, Marvelous Designer, Yeti, Hair, Fur, Orc

Go to galleries 1
rating star fullrating star fullrating star fullrating star fullrating star half
Comments 3 Views 15658
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