Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
Column
width55%

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

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.

UI Text Box
typenote

With V-Ray 5 Update 1, use Fog Depth instead of Fog Multiplier. Note that reducing the Fog Depth parameter makes the glass more tinted, while increasing the parameter weakens the tinted effect.

Column
width5%
 
Column
width40%
HTML
<iframe width="560" height="315" src="https://www.youtube.com/embed/otlH31Sgapw?list=PLm2Irfq-UvZ1mDaRYMlXzs6k-5Xb2ZzyP" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

...

Section
Column
width60%

Let's start by creating a VRayMtl material.

In the 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 . This eliminates the color from the material.

Then, increase the Reflect option by changing it to something like mid-gray or a bit lighter. This way, we make the material reflective.

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

In the 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 about 0.95 and the Refraction Glossiness to 0.99.

Anchor
1.1
1.1

Standard glass has Index of Refraction(IOR)1 of 1.51714. The Index of Refraction IOR 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 a highly reflective and refractive material, it is recommended to trace the respective rays further than default. Make sure sure Max depth (both Reflect and Refract) is set to 8.

Leave the Fresnel reflections and the Fog system units scaling 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 a physically accurate result, it is recommended to leave this option enabled.

Fog system units scaling option ensures proper calculation of the fog multiplier in the scene according to the system units.

Assign the material to the tea glass.

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

Column
width5%
 
Column
width35%

...

Section
Column
width60%

And voila! We have glass.

Column
width5%

 

Column
width35%

 

Tinted Glass

...

Section
Column
width60%

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, 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 render.

Column
width5%
 
Column
width35%

...

Section
Column
width60%

Now the tint is less visible and it shows mainly in the thicker parts of the objects.

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

For the purpose of this tutorial, let's increase the Fog multiplier to 0.5 to get more distinguishable results.

Column
width5%

 

Column
width35%

...