Claudia Herbst-Tait
Professor
Pratt Institute
Department of Digital Arts


Class Notes: Creating and Rendering Glass

Open the file vase.ma located in my folder on DDA transfer.

Notice the file has two layers; the same object/vase is in each layer but the glass materials vary.
One uses a Blinn, the other a PhongE.

Here are the settings for the two glass shaders (we’ll compare in a moment).

Blinn Glass:
Set Color attribute to a grayish white
Set Transparency attribute to highly transparent, almost white

Set Diffuse 0

Specular Shading:
Set Eccentricity.05
Set Specular Roll Off 1
Set Specular color to almost white
Set Relfectivity to .5
Set Reflected Color to black


Phong E Glass:
Set color to almost black
Increase transparency to almost white
Set Diffuse 0

Set Roughness 0.25
Set Highlight Size: 0.15

Whiteness... increase lightness
Specular color... increase lightness to a grayish white/almost white
Set Specular color to a grayish white
Set Reflectivity 0.5
Set Reflected Color to black



Rendering Glass…
Make sure only one layer is visible. Do a quick test render – what we have is a glass texture that is
quite transparent but does not look a whole lot like glass. In fact, it’s barely visible…In order to make
this work, we'll need to raytrace the image.

When setting up Raytracing in order to render transparent surfaces, such as glass, we will be concerned
with:

1) render settings
2) the light attributes
3) the material attributes


In the Render Settings, Maya Software tab, scroll to Raytracing Quality, and turn on Raytracing.
You'll find four values to control:

1) Reflections: determines the number of times a ray will be reflected before it dies off
(Note: if the rendered material's Specular Roll Off value is set to 0, no reflections will be rendered.)

2) Refractions: determines the number of times a ray will be refracted before it dies off

3) Shadows: determines the number of times a ray can be reflected or refracted and still cast a shadow

4) Bias: can be used to adjust motion blurr


Do a test render.



Next, select the spot light and open the Attribute Editor. Scroll down and turn on
Ray Trace Shadows. We're dealing with three values to determine the quality of
raytraced shadows:


1) Light Radius: the larget the value, the softer the shadow

2) Shadow Rays: calculates the shadow edge; the bigger the value, the more refined the shadow will be

3) Ray Depth Limit: determines the number of times a ray can relfect and refract and still cause an object to cast a shadow


Do a test render. Things are probably slooowing down right around now... Consider rendering at 50% (main menu,
Render, Test Resolution...)



Next, check which layer is currently visible? Are you rendering the Blinn or Phong E layer?
Either way, select the corresponding materials, scroll down to Raytrace Options. There are
several attributes to control. The most important one for now is the Refraction Index.

The Refraction Index value determines the degree of refraction being rendered. Here are some Index of Refraction Settings:
Air: 1; Water: 1.33; Glass: 1.44; Diamond: 2.42


Turn on Refractions, set the Refractive Index to 1.44 and do another test render.

Render both layers with these render settings and compare the results. Look closely, especially at the quality of the highlights.



A word on Mental Ray shaders in general and the dielectric shader in particular... Also, have a look here.



Now, let's open the file vase_and_spheres.ma located in our folder on DDA transfer.

You'll notice that I increased the cone angle of spot light #1 and added a second spot light.
I also added a few spheres to the scene (they're on their own layer called spheres), and assigned
a metal material to them.

Metals can be challenging to create. For now, we'll start with a simple shiny metal. Here are the
settings I used on a Blinn shader (I've named it blinn_Metal).

Set the Color attribute to the color metal you'd like to create. For example, if you'd like to create gold,
use these settings:

H: 45
S: .8
V: .5


Set the Specular Color values to:

H: 40
S: 1
V: 2 (note: using a "Value" higher than one is what gives it the metal shine; experiment...)

Also, set the following and experiment with the values:

Eccentricity: .3 (this value determines the size of the highlight; higher values produce bigger highlights)

Specular Roll Off: 1 (this value gives a surface the ability to reflect its surroundings)

Reflectivity: 1 (determines how reflective the surface is...)

As you can tell, I didn't create gold but a non-descript grayish/bluish metal... Which type of metal
is part of your design? Do some research and look closely. What does it look like? How does it relfect
light?



Do a test render to see how it looks. You may want to turn off the "vase" layer for a quicker render.

You may want to try rendering with a better render quality and/or changing the camera's Background
Color (select the camera, open the Environment tab and add change the color or add an image plane.)


Brushed Metal
For examples of brushed metals, see the class text pages 129-136.
For the tutorial to work properly, change HSV to RGB in the Color Chooser and change the
RGB settings to the "0 to 255" range, (default is "0 to 1").

Also, note that, in the Hypershade, you can export and import shading networks. You may want to
import one of metal materials from the CD that came with your book, which contain settings that work.
From there you can experiment with it. Note that you also want to copy the "rusty.jpg" texture.