Square Enix © Goodbye Kansas

Table of Contents

This tutorial explains the steps of creating a glass material with V-Ray.

 

Overview


In this tutorial, we show how to make glass material using the versatile VRayMtl.

Three types of glass material are examined here - standard transparent glass, tinted glass and frosted glass. All are achievable effects only by changing few parameters in the V-Ray material.

 

Basic Glass Material


Let's start by assigning a VRayMtl material to the glass geometry.

In real world, glass is usually transparent and somewhat glossy. By default, it does not have diffuse color.

To achieve that here, let's set the Diffuse color to black, this way eliminating color from the material.

Then, set the Reflection Color to something like mid-gray or a bit lighter. This way, we make the material reflective.

 

 

 


 

To make the material transparent, set the Refraction Color very close to white. The white color indicates that this material is fully refractive.

In real world no glass material is fully reflective or fully refractive, and the same goes for glossiness. To break the "perfection", let's reduce the Reflection glossiness to something like 0.95 and the Refraction glossiness to 0.99.

Standard glass has Index of Refraction (IOR)1 of 1.51714. The Index of Refraction stands for how the material refracts the transmitted light. Air has IOR of 1 by definition, which means it is no obstacle for light transmission.

So, let's set the IOR of this material to 1.517.

Since glass is highly reflective and refractive material, it is recommended to trace the respective rays further than default. Make sure Max depth (both Reflect and Refract) is set to 8.

Leave the Fresnel reflections enabled as they are by default. Fresnel reflections ensure proper reflection of the object based on the view angle. If you disable them, the whole object will get uniform reflections all over making it look fake. For physically accurate result, it is recommended to leave this option enabled.

Now, let's render and see how the basic glass material looks like.

 

 


 

And voila! We have glass.

 

Tinted Glass


Often glass can be tinted with color. Let's see how to achieve that.

VRayMtl has an option called Fog color. We can use it to introduce some tint to the glass.

Change the Fog color to blue. For the purpose of this tutorial, we make it [10,10, 255].

Now, do a test render. The tint is very well pronounced.

We can make the tint effect weaker by reducing the Fog multiplier amount. By default, its value is set to 1.

 

 


 

Since the blue color we use is very rich, let's set the multiplier to some small value - 0.05 and compare the two renders.

The second render shows a slight tint visible mainly in the thicker parts of the objects.

We can control the intensity of the tint based on object thickness - by using the Fog bias parameter.

 

1
0.05

 


 

When the Fog bias value is negative, that is -1.0 in this example, the thick parts get denser tint.

When Fog bias is set to 1, the tint is distributed more evenly across both the thin and thick parts.

For the purpose of this comparison, the Fog multiplier is set to 0.5 to get more distinguishable results.

 

-1
1

 

Frosted Glass


Another common type of glass is the so called "frosted" glass. That is, finely deformed surface of the glass, so it looks blurry.

We can achieve this easily by manipulating the glossiness parameters.

Let's reduce the Reflection glossiness to 0.8, making the reflections blurrier.

Set the Refraction glossiness to 0.8 - this makes the actual "frosty" effect of the material.

You can play with this amount to reach the desired look. Here we show also an example rendered with Refraction glossiness of 0.5 in order to compare the effects.

We have now frosted glass.

 

0.5
0.8