Aversis logo  

FREE Vray Tutorial - Render glass and liquid materials? [1]

Please don't translate or copy these tutorials elsewhere. I don't like the tutorials to float around in 10 different versions and places on the net. Feel free to link to this page of course! (see also Terms of Use)

Before you start

This tutorial is all about rendering glass and liquid in V-ray. It's quite basic, but even for experienced users there might be some useful tips and tricks!

V-ray version 2.0 was used to create this tutorial. You will probably be able to follow along even with older versions, but some screenshots may vary, or some settings may be missing or will have a slightly different effect on image quality.

The included files are all 3D Studio Max 2010. These will open fine in newer max version, but you will not be able to open them in older ones!

You are allowed to use everything you find in the sample files for your own projects, but you are not allowed to use the textures, models or any part of the file to resell or redistribute.

First learn 3D Studio Max, then start with Vray. It is an extension to 3DS Max, not a replacement! For example things like the material editor, creating and manipulating objects, modifiers etc should all be familiar before trying to learn Vray.

Page 1 - Page 2 - Page 3

Startup scene

Please download the startup 3DsMax file here:
glass-liquid-startup.rar

Note that this is a 3DsMax2010 file, so you need at least that version to open it. Please don't email me for older versions...

The scene features a typical studio setup:
- White photo-studio groundplane/background
- A few big rectangular lights

Free Vray 2.0 Tutorials | Rendering glass and liquid with Vray

I also use the gamma 2.2 setup, please read that tutorial first if you don't know what I'm talking about. If you open the startup scene and accept all the dialog boxes, you should be fine.

GI is enabled, and I chose a black environment override color for reflection/refraction.

Wineglass

In the middle stands our wineglass that we will be rendering in this V-ray tutorial. Currently both groundplane and wineglass have the same white, non reflective material.

Hit render and you should get the image below.

As you can see main lighting is coming from the right and from the top. On the left there is a dimmed blueish light.

Free Vray 2.0 Tutorials | Rendering glass and liquid with Vray

Glass material

Copy the floor material to a new slot, rename it 'glass' and apply it to the wineglass object.

Free Vray 2.0 Tutorials | Rendering glass and liquid with Vray

Glass material - diffuse and refraction color

First we will change the diffuse color to pure black, and the refraction color to pure white. This is the best way to create any kind of glass material. Effectively you are disabling the diffuse color (pure black) and then by setting refraction to pure white you make is 100% transparent.

If you would like to know more about vray material creation, please purchase the Aversis Vray Materials tutorial here.

Free Vray 2.0 Tutorials | Rendering glass and liquid with Vray

Glass material - reflections

So with the newly created glass material applied to the wineglass, hit render to check out the result so far.

It doesn't really look like glass, but it is indeed very transparent!

Free Vray 2.0 Tutorials | Rendering glass and liquid with Vray

Glass material - reflections

We also need to make the glass material reflective of course, so simply change the reflection color to a light grey.

Free Vray 2.0 Tutorials | Rendering glass and liquid with Vray

Now when you render, it's starting to look more like real glass.

Free Vray 2.0 Tutorials | Rendering glass and liquid with Vray

Glass IOR

Change the IOR in refraction parameters to 1,45. Each material has a typical IOR value, and for glass 1,45 is a good starting point. This will also dim the reflections a little bit, since the reflection IOR is linked to the refraction IOR by default. The lower the IOR, the less refraction is going on, and the less reflective the object will become.

Free Vray 2.0 Tutorials | Rendering glass and liquid with Vray
Free Vray 2.0 Tutorials | Rendering glass and liquid with Vray

Glass color

Instead of using a tinted refraction color, we will be using the 'fog' parameter to color the glass.

Change the white fog color to something like in the screenshot. I found that medium grey values work best, with a slight tint of the color you want in it. I chose a blueish tint, but don't overdo it since the goal here is to create normal transparent glass.

Free Vray 2.0 Tutorials | Rendering glass and liquid with Vray

When you render, the result looks a bit strange. The glass suddenly becomes very dark.

Free Vray 2.0 Tutorials | Rendering glass and liquid with Vray

Glass color - fog multiplier

To change the effect of the fog color, lower the fog multiplier to 0,1 and render again.

Free Vray 2.0 Tutorials | Rendering glass and liquid with Vray
Free Vray 2.0 Tutorials | Rendering glass and liquid with Vray

As you see, the glass becomes more transparent, but the regions where a lot of refraction is going on, stay dark (thicker parts of the wineglass).

This looks a lot more like real glass.

For example take a look at this picture.

Of course, the look of the glass will depend heavily on the environment it is photographed in!

Glass color - fog multiplier

Reduce the multiplier even further to 0,02.

Free Vray 2.0 Tutorials | Rendering glass and liquid with Vray

This will make the material even more transparent, as expected. The thinner parts look more real, but the thicker parts now also became a bit too bright.

Free Vray 2.0 Tutorials | Rendering glass and liquid with Vray

Glass color - fog bias

To get the best of both worlds, you can use the fog bias. Change it to -1,0 and do a test render. As you can see, the thin parts only got slightly darker, while the thick parts are now almost black.

Free Vray 2.0 Tutorials | Rendering glass and liquid with Vray
Free Vray 2.0 Tutorials | Rendering glass and liquid with Vray

Try -0,3 to reduce the bias effect a little bit. That looks better, now we just have darker thick parts without affecting the thin parts too much.

Free Vray 2.0 Tutorials | Rendering glass and liquid with Vray

Max depth

Another thing we will be changing, is the max depth setting for both reflections and refractions. To speed up rendering, this is set to 5 by default.

So vray will by default stop tracing rays when they effectively passed 5 surfaces. For example in our scene, when you look through the upper part of the wineglass, you pass 4 surfaces (the glass has thickness, so there are 2 surfaces on each side of the glass).

It's the same for reflections, when a reflection is reflected, and that one is again reflected and so on, this can go on for a while. It's like when you stand in between 2 mirrors facing each other, you're reflection will be reflected in infinity. Click here for an example.

So to speed up calculations, you can control the depth of reflections and refractions that will be calculated by Vray. Usually 5 is enough, but since we are rendering glass specifically, increase the depth to 10 for reflections and refractions.

Note that the difference is subtle...

Free Vray 2.0 Tutorials | Rendering glass and liquid with Vray
Free Vray 2.0 Tutorials | Rendering glass and liquid with Vray

Reflect on backside

In the options rollout of the glass material, turn on the 'reflect on backside' option. You will see that now also the inside of the glass surfaces reflect the light sources (looks like double reflections in the upper part of the glass).

Free Vray 2.0 Tutorials | Rendering glass and liquid with Vray
Free Vray 2.0 Tutorials | Rendering glass and liquid with Vray

Better quality

In the Vray DMC sampler rollout in the render setup dialog, change noise threshold to 0,01 to render a noise free image.

This is the final result of our glass material!

Now let's fill the glass with some wine.

Free Vray 2.0 Tutorials | Rendering glass and liquid with Vray
Free Vray 2.0 Tutorials | Rendering glass and liquid with Vray
Page 1 - Page 2 - Page 3
Back to Vray tutorials page

AVERSIS 3D RESOURCES

• Home
• Terms of use - free stuff
• Terms of use - HDRI
• Terms of use - Tutorials
• Terms of use - Vray Materials
• Terms of use - Textures

• Visit us on Facebook
• Subscribe to our newsletter

AVERSIS SHOP

• Vray tutorials
• Individual HDRI maps
• HDRI Collections
• Vray Materials
• Textures

FREE STUFF

• HDRI maps
• Vray tutorials
• Rhinoceros tutorials
• Photoshop tutorials
• Vray Materials
• Textures
• 3D Models
• Wallpapers

CONTACT

If you have any problems regarding the Aversis shop, don't hesitate to contact us through email at info(at)aversis.be

©2013 | AVERSIS 3D RESOURCES

All rights reserved. No part of this website may be reproduced without written permission from Aversis 3D Resources