Aversis Vray for 3D Studio Max Tutorials
 

Vray Tutorials

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)

This is a free tutorial! Please click on the Paypal donate button if you want to support this site and help me creating new tutorials.

Back to Vray tutorials page

Basic Vray Material Creation

Before you start

This tutorial is all about HDRI, used for realistic lighting and/or reflections.

Read the vray essential tutorials first before starting with this one!

The Vray version used to create this tutorial is Vray 1.50.00. This is the version that requires the hardware lock (dongle) as a licensing system. Please do not email me with questions about this tutorial if you are not using this Vray version, since the answer to your question is most likely that you're using a different version.

Make sure you have basic 3D Studio Max knowledge too, I will not explain every little detail so you have to know how to use Max. For example things like the material editor, creating and manipulating objects, modifiers etc should all be familiar.

 

Startup settings

It is important that you start the tutorial with exactly the same settings as I do. Click the screenshots to view all the startup settings. I also use the gamma 2.2 setup so change your max preferences also like in the screenshot.

These settings also use the Vray frame buffer, the adaptive DMC image sampler, no GI etc...

Vray tutorial - Basic material creation - Click to enlarge
Vray tutorial - Basic material creation - Click to enlarge

Create a simple scene

Simply create a cylinder with a teapot on top.

Vray tutorial - Basic material creation - Click to enlarge

Load a vray material

Open the material editor, and in the first slot load a Vraymtl. Assign it to the cylinder and the teapot, you'll see the color change in the viewport. Hit render and you will see a black image...

This is because in the startup settings we turned off 'default lights' in the global switches rollout. There are no lights placed in the scene, so it renders black of course :-). So go to the global switches and turn on 'default lights' to enable max's default light.

Render again, now it's better, a nice grey cylinder & teapot!

Vray tutorial - Basic material creation - Click to enlarge
Vray tutorial - Basic material creation - Click to enlarge
Vray tutorial - Basic material creation - Click to enlarge

Diffuse color

On the right, an overview of the material settings. The first one is also the easiest: diffuse color. This is the base color of your material.

Duplicate the grey material and rename it teapot.

To change the diffuse, click on the color swatch and choose a color, for example a deep red. Assign the teapot material to the teapot.

If you render, the teapot is now red...

Vray tutorial - Basic material creation - Click to enlarge
Vray tutorial - Basic material creation - Click to enlarge
Vray tutorial - Basic material creation - Click to enlarge

Reflection color

The next parameter is the reflection color. In some programs you probably only had a slider for reflection strength, well this is the same but it uses color values to set the reflection strength.

Black means zero reflection, white means 100% reflection (mirror). If you choose white for reflection, the diffuse color will completely be gone, since the material is now 100% reflective.

For now, choose a medium grey and hit render. You'll see that the teapot becomes reflective as it is reflecting the black environment and the grey cylinder (and itsself of course - note the teapot's handle).

Vray tutorial - Basic material creation - Click to enlarge
Vray tutorial - Basic material creation - Click to enlarge

Reflections and environment

As you can see, the reflections look a bit dull. If you want nice reflections, you need something in your scene to reflect in the object. Instead of building a complete environment, there is a much easier way: hdri environment maps.

Go to an empty slot in the material editor and click the 'get material button'. In the material/map browser, scroll down and double click on the VrayHDRI map. Now in the HDRI map settings, click the browse button and choose a hdri map. I selected one from the max 9 maps folder: C:\Program Files\Autodesk\3ds Max 9\maps\HDRs\KC_outside_hi.hdr

This map is in the 'spherical environment' format so you have to select this in the VrayHDRI settings (see screenshot). Leave everything else as is.

Now we have to put the map as an environment for the scene. I will not use the Max environment, because Vray has it's own environment options. Use the max environment only if you want your map to show up as a background in your rendering.

So go to the Vray environment rollout, turn on 'reflection/refraction environment override' and drag the hdri map from the material editor onto the map slot here (see screenshot).

Vray tutorial - Basic material creation - Click to enlarge
Vray tutorial - Basic material creation - Click to enlarge
Vray tutorial - Basic material creation - Click to enlarge
Vray tutorial - Basic material creation - Click to enlarge

Reflection and Frensel

So we loaded a hdri map in the vray reflection environment slot. Hit render and look at the result. The reflections are very strong suddenly, note however that the reflection of the cylinder actually looks the same as before. So the material didn't become more reflective, it just got a complete environment to reflect so the reflections are way more prominent now!

Our material has a medium grey reflection color, which means about 50% reflection strength, this is actually a lot!

 

But next to the reflection color is a small checkbox: "fresnell reflections". This is a very important feature. Check it and render again: the reflections look a lot less strong now.

Then change the reflection color to white and render again. You can see some of the strength coming back now.

From the vray manual:
Checking this option makes the reflection strength dependent on the viewing angle of the surface. Some materials in nature (glass etc) reflect light in this manner. Note that the Fresnel effect depends on the index of refraction as well.

 

So on a round object, the reflections will appear stronger on the sides than in the middle of the object. You can see it a little bit in the reflection of the cylinder.

 

 

 

The manual already states that the fresnell option depends on the Index Of Refraction of the material. IOR is a property in the refraction options, but as you can see in the reflection options, there is a property called Fresnel IOR which is dimmed. Next to the fresnell checkbox, there is a small 'L' which is a Link button. When it is presses, the fresnell IOR is linked to the Refraction IOR. This is the default behavior and also physically correct. When you unpress it, you can change the fresnel IOR independantly from the refraction IOR.

So for now, unpress it and change the fresnell IOR to 1.3.

 

Render again, and notice the reflections now: it is very clear that the centre of the object is less reflective than the sides. This is what fresnell does. the lower the IOR, the more pronounced this effect is. When you enter 1.0, all reflections will be gone... When you enter for example 16, you will get an almos mirror like surface.

In my opinion, it is a good habit to always use fresnell on any reflective material, and simply change the reflection color and fresnell IOR to your needs.

Play around a little bit with reflection color, fresnell IOR and diffuse color to see the effects on the material.

Vray tutorial - Basic material creation - Click to enlarge
Vray tutorial - Basic material creation - Click to enlarge
Vray tutorial - Basic material creation - Click to enlarge
Vray tutorial - Basic material creation - Click to enlarge
Vray tutorial - Basic material creation - Click to enlarge

Refraction color

First delete the teapot and create some other objects. I made a sphere and a torus knot with some lumps in it.

 

 

 

Adjust the material like in the screenshot: a red diffuse and a middle grey refraction color. All the reflection parameters are back to default, so no reflections.

 

 

 

 

 

 

 

Render the image and you'll see that the objects are half transparent. The red diffuse is partially visible.

Vray tutorial - Basic material creation - Click to enlarge
Vray tutorial - Basic material creation - Click to enlarge
Vray tutorial - Basic material creation - Click to enlarge

Refraction

A better way to color refractions is by using a tinted refraction color and a black diffuse. Black diffuse means that you turn off the diffuse component, so in our refraction case, the color of the material will be determined by the refraction color only. So a black diffuse and a reddish refract color.

 

 

 

 

 

This results in this image, as you can see, the refractions are all tinted red now (look at the bottom of the sphere compared to the previous image).

Vray tutorial - Basic material creation - Click to enlarge
Vray tutorial - Basic material creation - Click to enlarge

Refraction glossiness

Just like with reflections, you also have a glossiness parameter for refraction. I does the same: blurs the refractions. I added some reflections again with fresnell to make the material more realistic (see screenshot).

Play around with refraction color (darker, lighter, more saturated,...) and the glossiness parameter to test different effects.

The subdivs again control quality of the blurry refractions. Note that blurry refractions are slower than blurry reflections, so it can take a while to render...

There are many other refraction parameters, but for now this is enough to explain. With basic diffuse, reflect and refract settings you can create already a lot of materials.

Vray tutorial - Basic material creation - Click to enlarge
Vray tutorial - Basic material creation - Click to enlarge

Refraction IOR

The IOR is Index of Refraction. It is a material property that changes the way light travels trough transparent objects. Light hits a surface and will bend off under a certain angle. It travels trough the object and when leaving it, it will bend again. It's that property that makes objects under water appear closer or in another position than they actually are.

The first image is with IOR lowered to 1.1. As you can see, the objects bends the light less so you can almost see right trough it.

The second image has IOR=2.2. Now there is a lot more refraction going on!

Also note that the reflections change drastically, beacause the fresnel IOR (in reflections) is linked to the refraction IOR. So increasing the refraction IOR will also increase the frensel IOR, resulting in stronger reflections.

Vray tutorial - Basic material creation - Click to enlarge
Vray tutorial - Basic material creation - Click to enlarge
Back to Vray tutorials page