You are on page 1of 128

Vray Modul/MKV/LP3I/2020

Efendi, S.I.Kom

What is Vray?

As you probably already know, Vray is a render plugin. It's a plugin, which means that it adds
functionality to an existing program. Vray's features mainly aim at creating photorealistic
images, together with improving rendering speed. Currently, Vray exist for 3D Studio Max,
Maya, Rhinoceros 3D, Sketchup, Softimage, Blender and there's even a standalone version
available.
Most of Vray's features can be found in the render setup dialog (F10), but many other
additions are distributed across the complete program. For example Vray adds its own
materials and textures, light types, a fur generator, a toon style effect, displacement modifier,
frame buffer, effects, etc... Vray is created by Chaosgroup, a European company based in
Bulgaria.

Vray 3. 0 Features - Full scene anti-aliasing

Anti-aliasing is directly related to image quality. Take a look at the image below to see the
difference between anti-aliasing and no anti aliasing. It deals with smoothing out object
edges, texture details, blurry reflections, area shadows etc...

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Because it affects so many aspects in your image, it is very important to understand how to
control it. Changing anti aliasing settings has a huge effect on render times, it can bring a
render from 5 seconds to a few hours by altering a setting from 0.1 to 0.001.

In Vray you can control the quality of the image with only a few settings, which makes this
perfect for switching from a quick preview render to a high quality final image. You just have
to learn and understand the effect and importance of each setting, so you know what to
expect by changing a parameter.

Vray 3.0 - Standard V-ray Material

Vray adds its own material types to 3DS Max. The most important one is the Standard V-ray
material, this will be the base for most of the materials you will create. There's also a blend
material, which can be used to blend several other materials together to create more
complex, layered materials.

The normal Vray material is the one you will be using most. With only this type you can create
anything like glass, plastics, metals, wood, and so on.

Below are a few examples of simple materials you can create by altering just a few parameters
in the standard V-ray material.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
First some plastic and metal materials:

But also glass or transparant plastics are super easy to create and render:

Besides the normal Vray material, there are some more specialized materials like the
VrayLight material, VrayBlend material, Vray2sided material, VrayfastSSS, vraymaterial
wrapper, Vray Carpaint, and Vray Flakes. You can create every material you can imagine with
these types (or a combination of these types or in combination with Max's texture maps).

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Here's an example of the VrayLight material in action. You can assign it to any object to turn
it into a light source. There's even an option to make it a real direct light source so it casts
sharp raytraced shadows.

Another example, this time the VrayCarpaint material. It adds a subtle 'flake' effect to the
base layer of the material, simulating the look of metallic paint. But it's also a layered material,
so you can change the diffuse and reflection parameters for the base and the 'coat' layer
individually. For example, note the subtle glow around the sharp reflections of the coat layer.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Vray 3.0 Features - Displacement mapping

Displacement mapping is mostly used to add fine detail to your objects at render time. You
can use any kind of map for the displacement, and vray will 'displace' your mesh according to
the grayscale info in the map. For example black pixels will not be displaced, white pixels will
have the highest displacement.

This is similar to bump maps, but with displacement the actual mesh is displaced, so even at
the edges of your object you can see the 'bumps'. You can even use displacement to turn a
flat plane into a rough mountain landscape!

The image below shows the difference between a simple bump map and Vray's displacement
modifier. Both use the exact same texture map.

Vray 3.0 Features - Fur generator

Vray fur is a special object type which lets you place fur strands on any type of geometry. The
fur is not heavy on the viewport as it is generated at render time.

Fur can be used for thins like hair, grass, cool looking trees, rugs or even a cactus. The latest
Vray version has lots of options to create quite realistic fur, and with todays computers it's
not impossible to achieve decent render times too.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Here's a quick example, adding some hair to our fish model:

Vray 3.0 Features - Physically accurate global illumination

Global illumination is one of Vray's strongest points, which is why many archviz people choose
V-ray as their preferred renderer. Global illumination is the simulation of how light behaves
in the real world. When light hits objects, it gets partially absorbed, and partially bounced off
again. Without GI, this behavior is not calculated.

When you add a light source, it casts light onto the other objects and that's it, everything that
is not directly lit by the lightsource will be black.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Now with GI turned on, light gets reflected from the groundplane and the fish model, and
everyhting not lit directly by the light brightens up.

In Vray 3.0 You have the choice between various methods of calculating the global
illumination, depending on the quality and speed you're after, or if it's a still image or an
animation you're creating.

Calculating global illumination is heavy on the CPU, but Vray has loads of clever optimizations
built in to speed things up. You have full control over the speed vs quality.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Vray 3.0 Features - Area lights

V-ray also adds its own light types, one of them being the planar light (or area light). As you
can see in the image below, these lights act like big light panels, as you would see in photo
studio's. The larger the light, the softer the shadows will be (or vice versa).

Vray 3.0 Features - HDRI / image based lighting

Another feature of Vray lights is that you can map a texture to it. When used with the special
HDRI texture maps, you can light your entire scene with only one light, and get very natural
lighting and reflections out of it. The image below is lit with only one light, casting very nice
shadows and lighting the model from different directions.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Vray 3.0 Features - Sun and sky system

V-ray also adds a complete sun/sky system to 3dsMax. With this you can easily setup a
sunlight with a corresponding sky texture. The sky texture automatically adjusts its colors to
the chosen position of the sun. This is very usefull for architects to make sunlight studies on
their buildings.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Vray 3.0 Features - Physical Camera

Vray can also mimic real world camera properties, when you replace the standard max
camera with a Vray Physical Camera. This will add a lot of features to control every aspect you
can control on real cameras like shutter speed, aperture, depth of field, motion blur, lens
distortion, vignetting, color balance, iso, and so on...

Below is an example of depth of field: objects out of focus will become more blurry. And of
course like everything else, you have full control over every property that defines the DOF.

Another feature related to the camera is motion blur. Vray can calculate raytraced motion
blur, resulting in very realistic blur (much better than with any post method). For example,
the green fish in the image below is moving quite fast from left to right, while the red fish is
spinning.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Vray 3.0 Features - Lens effects

Another great addition are the Vray lens effects. This effect is added in post through the Vray
Frame Buffer, and can be adjusted to your needs after the render has completed.

This is especially usefull when you have bright light sources or very bright reflections in your
scene. The image below show the effect, exaggerated a little bit to make it more visible.

Also note how this effect solves anti aliasing issues that will always be present in situations
like this! (see second image without lens effect)

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Vray 3.0 Features - RT (real time)

Since version 2.0, Vray comes bundled with Vray RT, which is a realtime renderer! You can
assign a viewport to Vray RT, and it will constantly show it in rendered mode. Change any
setting like a material or light source, and the render will update immediately.

This is very useful for placing lights, so you can see the effect of it on the fly, without having
to wait long for a new test render.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
It also uses your GPU to render the image, so with the right gear this can really speed up
render times!

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Rollouts in different tabs!

Since Vray 3.0, the position of the rollouts have been changed. Users coming from V-ray 2.4
or lower will need some time to adjust!

As you can see in the image below, there are 3 tabs that belong to Vray:
 Vray

 Indirect illumination
 Settings

Basic - advanced - expert

Vray 3.0 also tries to make artists life a bit easier by only showing the most important settings.
In many of the rollouts, you'll find a button saying 'basic'. You can click it to cycle through 3
versions: basic, advanced and expert.

In this introduction tutorial, we're just showing screenshots of the 'basic' settings. You'll
notice that in most other tutorials we'll be using the expert mode. Not because we'll need all
these expert settings, but simply to have full control over every parameter when needed.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Vray Authorization

The authorization rollout is used to correctly set your VrayLicense server information. This is
something you normally should only do once, just to make sure Vray can access your license.
If something is wrong, you'll notice that no other Vray rollout will show any information.
Please refer to the installation instructions for more information.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
About Vray

Some copyright info :-) Useful if you don't know what version you have installed!

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Vray Frame Buffer

Vray has its own frame buffer, that can replace the max VFB. The virtual frame buffer is the
window that holds you render, from where you can save your image. Since Vray 3.0 this will
be selected by default, so you shouldn't worry about it too much.

With the Vray VFB, you can do lots of stuff like color corrections for example. It can also show
different render elements (like the alpha channel), you can even control how buckets are
rendered by letting them follow your mouse!

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
This rollout also allows you to render to the specific V-ray raw image file format, usefull for
advanced users. Many users will never touch this rollout, as it takes the resolution settings
from max (found in the Common tab).

Vray Global switches

Title says it all, a lot of global 'switches' can be found here. A useful tab for test renders, for
example with one checkbox, you can turn off displacement in the scene, or all textures, or all
lights, glossies, etc...

Also a very good one is the override material button. You can assign a material to all your
scene objects at once, very useful for troubleshooting a scene, or to evaluate pure lighting.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Vray Image sampler (anti-aliasing)

This is one of the most important rollouts regarding image quality. The image sampler
smooths out your image so you don't get jagged edges, or noisy shadows or reflections etc...
You can choose between 4 image samplers, of which the Adaptive is the most useful 99% of
the time. That's why it is now set as the default method. Adaptive subdivision can be usefull
is some rare cases, but it is even announced that it may disappear in future versions, so better
leave this one alone.

A special one is the new 'progressive' method. This is a special function inside Vray that used
a 'progressive' approach to rendering instead of working with the usual 'buckets'. It very
quickly displays a low quality image, that it starts to refine more and more. With this option
you can very quickly see the global lighting and colors for the whole image, so it's usefull for
test rendering.

On top of that, you can choose an anti-aliasing filter. Especially when dealing with fine
textures, these can prevent what is called 'moire patterns'.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Vray Adaptive image sampler

This rollout only exists because in the previous rollout 'Adaptive' was selected. So this rollout
changes depending on which sampler you choose.

It contains settings specific to the Adaptive image sampler, but in many situations the default
settings work just fine.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Global DMC

This Global DMC rollout is one of the most important rollouts of them all!!! This is where you
can turn a 2 seconds preview render into a 3 hour high quality image. These settings work
together with the image sampler settings, and it controls the quality of EVERYTHING in Vray.
Changing values here has an effect on GI calculations, anti-aliasing, shadow quality, DOF,
motion blur, blurry reflections and refraction, etc...

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Vray Environment

Here you have 3 controls for your scene environment. Each can be controlled with a color or
texture map, mapped to an 'infinite' sphere wrapped around the complete scene.

The first one is the GI environment, which needs Global Illumination enabled to work. It's also
sometimes called 'skylight', as it is in fact a light source surrounding the scene, just like the
sky would do. Simply choose a solid color, or add a texture map to the map slot, usually a hdri
image. When turned off, the 3dsMax environment color is used for the GI environment.

Turn on the reflection/refraction environment if you want to use a different coloror texture
map to show up in reflections/refraction.

To have even more control, you can also override the refraction environment by enabling this
option.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Vray Color mapping

Color mapping can apply some kind of color 'corrections' to an image. For example by
choosing different types, you can prevent burnt out areas in your image created by bright
lights.

The clamp output and sub pixel mapping options can be used to clamp pixels to the 0-255
range and can therefore help to better anti-alias very bright lights or reflections. (options only
visible in expert mode)

Depending on the type you choose, color mapping can also be used to brighten or darken the
complete image, instead of having to alter every light source in the scene.

Last but not least, there is also a gamma control, which is in fact very very important. See the
Gamma 2.2 setup for more info on this! Since V-ray 3.0, gamma 2.2 is enabled by default, and
should not be changed. That's why it will not show up in basic mode.

Vray Camera

Need a fish-eye, cylindrical or spherical camera? Here you can specify all this. These camera
types override the settings of your camera in the scene.

This tab also controls depth of field and motion blur in your image.

DOF is the the effect when objects appear out of focus outside a certain range. This is caused
by the camera's aperture, the bigger the aperture, the bigger the DOF effect.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Motion blur is caused by the shutter speed of the camera. With slow shutter speeds, moving
objects will become very blurry. Mostly used in animations, but it can be used in stills too of
course (just like in real photography).

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Vray Indirect illumination (GI)

GI or global illumination controls, very important to create realistic lighting.

Vray Irradiance map

This is also a variable rollout. Depending on the GI engines you choose in the previous rollout
this one will change. By default the Primary GI engine was Irradiance Map, so the IR map
rollout is shown.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Vray Brute Force GI

yet another variable rollout, currently brute force is selected as the secondary GI engine so
this will show up. Other secondary bounce rollouts can be Lightcache and photon map.

Vray caustics

Caustics are light patterns formed by refracted/reflected light. Take a look at the rendered
image, these are caustics. There are two types of caustics: GI caustics and direct light caustics.

Setting up caustics can be quite confusing, because the outcome depends on several other
settings, for example in each lightsource. Also the type of lightsource has a big impact on
caustics (for example a 3dsMax spotlight vs a V-ray planar light).

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Vray Default displacement

This rollout controls the default values for displacement, which will kick in when you specify
displacement on a per material basis.
When you use a vray displacement modifier on an object however, the modifier will override
these settings.

Vray system

Another 'behind the scenes' rollout. Here you can control for example how Vray handles your
RAM while rendering, which can become very important when dealing with extremely high
polygon scenes.

You can also change the render bucket size, or how you want these buckets to appear while
rendering the image.

The frame stamp lets you 'stamp' all kinds of info into your image, like for example render
time or V-ray version.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Distributed rendering is also set up here. By using this, you can render a single image using
multiple computers. You need to have your network set up correctly of course to do this...

Vray Render elements

Render elements are used to split an image into all kinds of layers which can be composited
later. Vray uses 3dsMax's render elements interface, but it adds its own types, and doesn't
support max's render elements.

For example you can split the image into a diffuse component, reflection layer, refraction, GI
light only, direct light only etc...

This kind off stuff is pretty advanced, and you also need a decent compositing program to put
all the layers together again.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Create basic Vray materials

Startup settings

It is important that you start the tutorial with exactly the same settings. These settings also
use the Vray frame buffer, the adaptive image sampler, no GI etc...

We also use the gamma 2.2 setup so change your max preferences like in this screenshot. In
the latest max versions the settings should be identical. You can also set output gamma to
1.0, but then make sure you set the vray color mapping mode setting to 'color mapping and
gamma' so the gamma is burned in the image.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Create a simple scene

Simply create a cylinder with a teapot on top.

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, a nice grey cylinder & teapot appear!

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Diffuse color

In the material editor you can see all the basic Vray material properties.

The first one is also the easiest: diffuse color. This is simply the base color of your material.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Duplicate the grey material and rename it 'teapot'.

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

If you render, the teapot should now be red.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Reflection color

The next parameter is the reflection color. In some 3D programs there is 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 disappear, since the material is now 100%
reflective.

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

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
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 any hdri map. There are a lot of free ones
online, here the famous kitchen hdri map is used.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
This map is in the 'probe' format and you'll have to select 'angular as the mapping type in the
VrayHDRI settings (see screenshot). Leave everything else default.

Now we have to assign the map to the environment of the scene. We will not use the Max
environment, because Vray has its own environment options. Use the max environment only
if you want your map to also show up in the background of your rendering.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
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.

Reflection and Fresnel

So we loaded a hdri map in the vray reflection environment slot. Hit render and look at the
result. The reflections look very strong! Actually the material didn't become more reflective,
it just got a complete environment to reflect in so the reflections are simply more prominent
now!

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
The material has a medium grey reflection color, which means about 50% reflection strength,
this is actually a lot.

Next to the reflection color is a small checkbox: "Fresnel reflections". This is a very important
feature that almost all materials have. Check it and render again: the reflections look a lot less
strong now.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
The Fresnel 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 Fresnel checkbox, there is a small 'L' which is
a Link button. When it is pressed, the Fresnel 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 independently from the refraction IOR.
For now, unpress it and change the Fresnel IOR to 1.3.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Render again, and notice the reflections now: in the center of the object the reflections are
less strong, while the sides of the object still reflect a lot.

When you enter 1.0, all reflections will be gone... When you enter for example 16, you will
get an almost mirror like surface.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
It is a good habit to always use fresnel on any reflective material, and simply change the
reflection color and fresnel IOR to your needs.

Experiment yourself with reflection color, fresnel IOR and diffuse color to see the effects on
the material.

Refraction color

First delete the teapot and create some other objects, for example 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.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Render the image and you'll see that the objects are semi transparent. The red diffuse color
is still partially visible.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Refraction

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

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
As you can see, the refractions are all tinted red now (look at the bottom of the sphere
compared to the previous image).

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Refraction glossiness

There is also a glossiness parameter for refraction. This will blur the refractions.
Play around with refraction color (darker, lighter, more saturated,...) and the glossiness
parameter to test different effects.

The subdivs control the quality of the blurry refractions. Note that blurry refractions are quite
slow to render.

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

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
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. The IOR makes for example
objects under water appear closer or in another position than they actually are.

The first image is with the refraction IOR lowered to 1.1, and the fresnel IOR linked to the
refraction IOR again. As you can see, the objects refracts the light less so you can almost see
right trough it without much distortion. Because we linked both IOR's, reflections are also not
very strong anymore.

Change the refraction IOR to 2.2. Now there is a lot more refraction going on!

We linked both IOR's, so reflections are also a lot stronger than before.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Conclusion

That's it for this very basic Vray material tutorial.

With these parameters:

 diffuse
 reflection color
 fresnel
 refraction color + glossiness
 refraction IOR
You can already create many of some commonly used materials:

 Plastics
 Glass
 Transparent plastics
 Metals: alloy, copper, chrome, steel, ...

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Global illumination methods

What is GI?

GI is short for Global Illumination. Renderers that use global illumination algorithms take into
account not only the light coming directly from light sources (=direct light), but also the light
that is bounced off all surfaces (=indirect light). This results in much more natural and
photorealistic lighting compared to traditional non GI renderers.

Non GI rendering

Below, a simple image with only one light, coming in from the left. As you can see, the
shadows are completely black and you hardly see the shape of the objects. Also note the
shadow underneath the glass sphere, which is also black.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
GI - primary bounce

In reality, light keeps bouncing around until it loses all its energy. Each time a bounce occurs,
the light loses a bit of energy, depending on the properties of the surface it hits (it gets
reflected more or less, gets absorbed more or less depending on the surface material
properties).

So after an infinite amount of bounces, the lights energy reaches zero. To calculate an infinite
amount of light bounces would be crazy, so Vray has some ways to optimize this. Also, the
loss of energy has an exponential curve, so in fact the light energy fades out pretty quickly
after a few bounces. This means that the effect of the first bounce on the final lighting will be
a lot bigger than forexample the63rd bounce.

V-ray divides the indirect illumination into two main parts: primary and secondary bounces.

Below, the same image now with GI turned on and only the primary bounces active. Note the
shadows and the interior part are not black anymore. There are still very dark places, this is
where the primary light bounces almost don't reach.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
GI - secondary bounces

To further mimic real world lighting, we must enable the secondary bounces too. Calculating
primary and secondary bounces is not an easy task for a renderer. You have to imagine a light
ray from the direct light hitting a surface, and bouncing off that surface in all directions. Let's
say it scatters into 50 new rays, which are the primary bounces. These 50 rays again hit some
surface, and scatter again in 50 new rays. So after only two bounces there are already
50*50=2500 rays flying around. And this is only from 1 ray of the direct light. Of course Vray
has some ways to limit the number of rays, together with very clever ways of finding out
which rays are more important on final lighting than others etc...

The images below shows the effect of the secondary bounces. As you can see, the second
bounce has a big effect on overall lighting, 4 bounces results in a smaller difference. The jump
from 4 to 12 bounces is almost nothing.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Primary bounces - Brute force

The easiest engine is the 'brute force'. As the name already suggests, it requires brute force
to calculate the lighting. This method computes the GI in every single shaded point. So even
on very flat surfaces where lighting is very even, every point will be calculated. This is of course
very slow, but also very exact.
The image below is lit with Vray's skylight. Think of this as a real sky illuminating the scene.
There is no sun, so it's a bit like a cloudy day: casting light evenly from all directions. This
skylight is treated as primary bounce GI, so in this scene, there is no direct light. All the light
(and thus also shadows) are calculated by the GI engine, which make the skylight perfect for
testing the quality and speed of the GI engines!

I rendered the image below with the default values for the engine. As you can see, this is 8
subdivs. The secondary bounces are grayed out, since we disabled these for the tests. The
subdivs value is the quality of the brute force GI. So more subdivs result in more accurate
calculations, a less noisy image and of course slower render speed. I included the render time
in all the images to compare.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
The second image is with brute force subdivs set to 16. You can clearly see the noise is a lot
less now, but render times went from 29 to 68 seconds. Note that the subdivs value of 8
actually means 8*8=64, and 16 means 16*16=256. So take care when you want to increase
quality! (This is true for all subdivs values inside Vray by the way.)

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
The third image has subdivs=32. Notice how it's especially the noise inside the box that gets
better now. Also note how defined the shadows under the teapots and the sphere are. Even
caustics are showing up underneath the glass sphere! Caustics appear when light gets
bundled by reflective and/or refractive objects. Like in the old days when you used to burn
ants with a magnifying glass from the bundled sunlight...

To summarize, if you have a powerful CPU and enough time to wait, brute force is an easy
and very high quality GI engine. The downside is that when you start using secondary bounces,
especially on interior scenes where there is usually a lot of secondary GI light, that the brute
force method will become extremely slow.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Primary bounces - Irradiance map

The irradiance map is Vray's answer to efficiently speed up GI calculations. Not all surfaces
and regions in a scene have the same GI detail (=shadows), for example on a flat plane without
any objects, lighting will be very even in every point. But when the surface is very bumpy, and
lots of small objects rest on it, the GI will be much more detailed: small shadows and varying
light intensities all over the place.

Basically, the irradiance map calculations can find out which parts of the scene need accurate
GI calculations and which parts don't. This is controlled by various parameters that you can
see in the screenshot below. The mode is set to 'expert' to show every possible option.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
The result of the irradiance map calculations, is a collection of points on the surfaces in the
scene. Each point has a given value for its color (=light). Areas that are flat without much
detail, will have points spaced far away from each other because lighting doesn't vary much
between two points close together. But in more detailed areas, points will be placed much

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
more dense. In our scene for example, underneath the teapots, where there is variation in
lighting (=shadows).

The image below is rendered with IR map as primary bounce. You can see it looks pretty
similar to the brute force image, but shadows are less detailed, and especially inside the box
the shadows form 'splotches'. But on the other hand the render times are a lot lower.

The second image below shows how the IR map points are placed. You can clearly see there
are less points in the background than for example in between the wall and the cylinders, or
under the teapots.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
For the last image, very low IR map settings were used to better see the 'blurring' or loss of
detail in the shadows. Now all objects seem to be floating because of the lack of detailed
shadowing underneath them.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Primary bounces - Light cache

Light cache is another GI calculation method. It's a bit special as it computes 100 bounces by
default. So if we put it in the primary bounces, it's actually computing secondary bounces too.

The first testimage uses default settings, and as you can see, it is much lighter than all the
previous images. This is due to the extra bounces it computes.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
To speed up calculations and to get some contrast back in the shadows, just lower the
bounces. In the image below, 3 bounces were calculated.

Compared to the IR map, lightcache is a bit easier to set up. The most important value for
quality is again the subdivs. Don't compare it to the brute force subdivs because for the
lightcache, you need much higher values. The second image is rendered with 2000 subdivs
(instead of 1000). You can already see a big improvement in the GI detail and quality of the
shadows.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
If you turn on "show calc. phase" you will see the LC process being updated during calculation
time. This is a very effective way to evaluate lighting without having to wait for the render to
complete.

The last render has 5000 subdivs, resulting in very good quality. Although it is possible to
achieve good quality with LC only, it is mainly used for secondary bounces while you use IR
map or brute force GI for the primary bounce.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Primary bounces - Photon map

Photon map is yet another way of computing a GI solution. However I never had the need to
use this method. The other engines are in fact much easier to set up and to understand.

GI engines - combinations

Although you can use any combination of engines for primary and secondary bounces, there
are some really useful combinations. We will render some examples with the 3 most used
combinations:

 primary = IR map and secondary = brute force


 primary = IR map and secondary = light cache
 primary = brute force and secondary = light cache

IR map and brute force

This combination is used a lot for scenes without too much secondary light. For example
product renderings are usually made in some kind of studio setup, where an object is placed
on a flat plane, lit by some large area lights and/or a skylight. Since most bounces fly off into
the sky and therefore don't need further calculation, there are not much secondary bounces
present, and the effect of these bounces on overall lighting is small.

So most of the GI lighting is covered by the primary bounces with the ir map settings. The
small amount of secondary bounces are calculated by the exact brute force method. With
some good IR map settings, this results in high quality images with fast render times.

The biggest effect on overall lighting in this scene even comes from direct lights, so even with
some lower IR map settings the image is still very good, as the effect on total lighting from
the primary bounces isn't even that big.

This method will however be slower for interior scenes, then you will be better off with the
next combination.

Note the shadow detail and low noise levels, and even the GI caustics are well defined!

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
IR map and Light cache

When the amount of bounced light gets more prominent in your scene, the ir map + brute
force combo can become quite slow. The lightcache is ideal as a secondary bounces engine,
since it's so fast.

On top of that, when you use this combo, the LC is calculated first, and all the info from the
LC is used for the calculation of the IR map. As a result, the IR map will be computed faster
too.
When you're after extreme detail in your GI light, you're better off using the next combo,
instead of increasing the IR map settings to extremes. Because then the IR map will become
very slow too. So the IR map + LC is a good combo for relatively flat interior scenes.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Brute force and Light cache

For very good quality images, this is the way to go. Of course a lot slower than the other
combo's, but still not as slow as brute force + brute force would be. This can be a very good
combo for high quality interiors, but also for exteriors and product scenes.

The IR map has many problems with moving objects, since it is an approximate method, so
each frame will have a slightly varying lighting solution (the sample points move from frame
to frame). This results in 'flickering' of the GI light in your animation. By using an exact method
like brute force, you can remove the flickering. However that requires a lot of computing time.
There are ways to remove flickering when using ir map or lightcache, depending on the type
of animation this requires a different approach. This might be a topic for a future tutorial!

As you can see in the image below, the render time becomes very high. But note the shadows
that the teapots are casting. It shows detail that was completely lost in the previous image.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Conclusion

GI is great to produce realistic images, but it is always a struggle between image quality and
detail versus render times. Each engine has its advantages, so it's important to know when to
use which engine.

Especially the IR map has many settings to control, which can increase render times a lot if
you don't know what you're doing.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Vray skylight to light a scene

Startup settings

It is important that you start the tutorial with exactly the same settings. See below for a
screenshot with all the startup settings.

We also use the gamma 2.2 setup so change your max preferences like in this screenshot. In
the latest max versions the settings should be identical. You can also set output gamma to
1.0, but then make sure you set the vray color mapping mode setting to 'color mapping and
gamma' so the gamma is burned in the image.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Create a simple scene

Simply create a large cylinder with some teapots on top. I also created a max camera with a
lens of 50mm. Make a grey Vray material with a diffuse of RGB=220 and assign it to the
cylinder (floor) and all teapots.

Note that I don't use RGB=255, so no pure white. In real life, no material is pure white, so
don't do it in 3D viz either. Using very light materials will result in wrong looking GI lighting,
since these materials will bounce off too much light.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
If you render now, it should be black because there are no lights in the scene and we turned
off the default 3dsMax light in the vray global switches.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Turn on the skylight

In the vray environment rollout, turn on the GI environment and give it a light blue color.

Render again, still black... The skylight is not a direct light source, it's not a real light that you
can select in the viewports. Imagine it as an infinite big sphere surrounding your scene, casting
light to the inside. This light is 'indirect' light, calculated by global illumination. So we need to
enable GI for it to cast any light.

Open the Vray indirect illumination (GI) rollout and turn GI on. Adjust the settings like in the
screenshot.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
As you can see, we use a multiplier of 0.8 for both primary and secondary engine. This means
that a maximum of 80% of the light hitting a surface will be able to bounce off (if the surface
is pure white). If you never use too bright materials (see previous step) and use these GI
multiplier setting, you will never get problems with your GI calculations. Using pure white
materials and full GI multipliers can confuse V-ray, so this is a simple trick but it does make a
difference!

Now if we render again, you will see the teapots. The skylight is an environment light, which
means it casts light uniformly from all directions. This results in very soft shadowing and
uniform lighting on all surfaces.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Adjusting the skylight

In the environment rollout, change the multiplier next to the skylight color to 1.5 and render
again. The scene brightens up, because the multiplier is used a the skylights 'strength' value.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Also try some different skylight colors to see the effect on the rendering.

Add a 'sun'

To make the lighting a bit more interesting, we will add a direct light to the scene. I used a
directional light with vrayshadows turned on. Make sure the light is bigger than your scene
(check screenshot to see the light settings and placement I used).

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
When you render, the scene is way to bright because now we have a skylight of 1.5 and a
directional light of 1.0. Together these 2 lights overexpose the scene...

Change the skylight multiplier to 0.3 and render again. Better already!

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Lighting color

Change the directional light color to something yellowish, and the skylight to a bit more
saturated blue. This will add a subtle change to the coloring of the direct and indirect lighting.

Try some combinations of more and less saturated colors for 'sun' and sky to find a satisfying
result.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Balance sun vs sky

The sun would cast much darker shadows in real life. To achieve this, you have to adjust the
balance between skylight multiplier and directional light multiplier.

For the next image an even lower skylight multiplier of 0.15 is used, and 1.15 for the
directional light. As you can see this changes the overall contrast.

By changing the colors of both lights, and their strength, you can achieve different looks.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Conclusion

With a few simple clicks, you can create an good looking lighting setup. It renders fast, can be
tweaked in every aspect and you can render any view without having to rotate your lights.
Even when viewed from the back, the image still looks good as the skylight brightens up the
parts of the model not directly lit by the main direct light source.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Gamma 2.2 setup or linear workflow

UPDATE FOR VRAY 3.0!

This tutorial is based on the original gamma 2.2 tutorial which is now really outdated. 3dsMax
and V-ray now use gamma 2.2 setup by default! Still, there are a few things you should know,
which is what this new tutorial is all about.

You can find the original tutorial here, if you want to learn more about the original problem
and how it was solved in 2005.

What's it all about?

Back in 2004, some great people started a thread on the V-ray forums about 'working in linear
space'. The thread almost exploded, and many people tried to understand what seemed to
be a very complex workflow to get better looking images.

The base problem was simple. Vray and 3ds Max do their calculations in 'linear space'. The
vray camera has a 'linear' response to light. This means that it is working in 'gamma 1.0 space'.
All this is no problem, but since 3dsMax and Vray are set up to work in gamma 1.0 space, it
also assumes that you view the output on a device that has a linear curve or gamma 1.0.
However your computer monitor is not gamma 1.0 at all. Since we didn't tell max and vray
about this, our images are actually displayed much darker!

Gamma 1.0 vs. Gamma 2.2

Here's a simple example: an interior with one very big opening where bright light can enter
the room. On the left is the result without gamma 2.2 setup. The scene is very dark, and if
you would like to brighten it up you'd have to increase the light strength, resulting in even
more blown out areas around the window opening.
On the right is how V-ray and 3dsMax are setup now by default with gamma 2.2, resulting in
a much brighter image, more like you would expect the light to behave in a scene like this.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
HDRI and gamma

Another common problem was HDRI lighting and reflections. This example shows how
obvious it was that the 'new' gamma 2.2 method was the way to go.

On the left again the 1.0 method, clearly showing that there was way too much contrast in
lighting and reflections. This doesn't match with the lighing found in the original hdri map
(middle).

On the right you can see that the reflection in the chrome ball is almost identical to the original
hdri, and also lighting is much more natural.

Washed out textures, colors and low contrast lighting

One issue that came up, was that many converted scenes suddenly looked washed out, they
lacked contrast. The reason for this is that when setting up a gamma 2.2 scene, you also have
to select your colors in this gamma 2.2 space.
The same goes for textures. All textures are actually already setup to be viewed on your
gamma 2.2 monitor. So if you now apply another gamma 2.2 curve to it inside 3dsMax, they
will be double corrected and look way too bright.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
This is why you had to setup 3dsMax's interface and bitmap loading properties correctly, so
you can choose colors that will match your final output, and load textures with the correct
gamma interpretation.
Below is a comparison of the old 3dsMax settings and the new defaults. Again on the left is
the old setup, where no correction is applied, and on the right is the gamma 2.2 setup.

You are changing several things:

 Enable gamma/LUT correction: this enables this whole section


 Gamma: specify the gamma you want to work with. Most common is 2.2
 Materials and colors: Here you specify that you want the color selectors and
material editor should also be displayed with gamma 2.2. This is very important, so
you are choosing colors that will match your final output!
 Bitmap files input gamma: Here you specify that all loaded textures are ready for
gamma 2.2, to make sure that they don't get double corrected and look washed
out in your render.
 Bitmap files output gamma: This setting controls how images are saved, more on
this later in this tutorial.
Take a look at the material editor and color swatches, how they got brighter. So if you want
the same deep red for the teapot in the new gamma 2.2 scene, you should also choose a deep
red in the now corrected color selector.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Virtual frame buffer - sRGB button

So, all the above was just to make sure you are choosing colors correctly, and that you load
your textures correctly.

In the V-ray virtual frame buffer, there is a tiny button which is pressed by default: sRGB
button. This button applies a gamma 2.2 curve to the VFB, so it displays your image as gamma
2.2 corrected, it doesn't actually burn the gamma curve into the image.
Below you can see the effect of the button. When unpressed, it displays the image again
without correction, so it looks dark and wrong as before.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Saving images from the virtual frame buffer

To save your image correctly, we go back again to the 3dsMax preferences. Remember
the output gamma setting? This is set to 2.2 by default, which is very important!
Since the sRGB button is also just a preview tool, we need to make sure that while saving the
image, you apply this gamma 2.2 to the actual pixels in the image, otherwise when you view
the saved image in an image viewer, it will simply look too dark again (because the gamma
2.2 curve wasn't burned into the image).
But this is where the problems start... The sRGB button applies a curve to display the image
correctly. But is this the exact same curve as 3dsMax applies while saving the image? The
answer is NO! Altough the difference is small, it is not 100% the same.
Hover your mouse over the image below to switch between the saved image with 3dsMax
output = 2.2 and a screenshot taken from the Vray frame buffer. As you can see, the saved
image is a bit brighter overal, proving that the sRGB curve is not the same as the 3dsMax
gamma 2.2 curve.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Saving images from the virtual frame buffer - full float EXR

In a true linear workflow, you would also save your images as full float 32bit images, for
example EXR. True linear workflow means that you setup all your programs to correctly
display these linear images. So your image never gets the gamma or sRGB curve burned in, it
is only displayed with such a curve in your software package (for example after effects or
photoshop).
When saving an EXR, the output gamma is also not burned in. However I found some mixed
results in this regard. Sometimes when I open a full float exr in photoshop it gets double
corrected, sometimes it is displayed correctly.

In the case below, photoshop read the image correctly, and this time, it looked 100% identical
as the screenshot from the VFB inside 3dsMax. Hover over the image below to compare.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Gamma 2.2 setup without true linear workflow

What if you don't want to save your image in full float format all the time? A true linear
workflow is usefull for people who will use the full potential of these images to further post
process them, for compositing needs etc...

Many people however will do just fine with a saved image where the gamma curve does get
burned in while rendering the image, so you don't have to worry about getting the exact
same output gamma curve while saving the image.
To achieve this, you need to go to one more setting in V-ray that controls this whole gamma
thing: the color mapping rollout.
You will need to switch on 'expert' mode to see all the settings. As you can see, the gamma is
set correctly to 2.2.
But what about this 'mode' dropdown? By default, this is set to 'color mapping only (no
gamma)'. This means that no gamma curve gets burned in, the pixel values won't actually
change while rendering. As we've seen, the image is displayed correctly because of the sRGB
button.
But if this gamma 2.2 isn't applied here, what does this mode do to our image? Well, if you
would turn it off, by choosing the 'none (don't apply anything)' mode, you will get an image

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
that is almost identical... The only difference is, that you will get slightly worse noise and
GI quality.
Reason for this is that V-ray is doing all kinds of image sampling based on some algorythms
that try to identify to what extent more sampling is needed or not (to clear noise for example).
When it is sampling very dark regions, it will stop sampling quite early, as the noise isn't very
obvious in these regions. But as we've seen, the actual image is quite dark, it is just displayed
brighter because of the sRGB button. So when you choose the 'none' mode, Vray is actually
doing it's sampling on a very dark image. If you choose the 'color mapping only' mode, it is
doing its sampling on the brighter image, but only the sampling, the gamma will not be
applied to the actual pixels.
So, the only remaining mode 'color mapping and gamma' is doing both: it does the sampling
on the bright image, AND it burns in the gamma curve. But as I said earlier, because the
gamma is burned in, you need to disable the sRGB button or else it will get double corrected.
But because now the gamma curve is burned in already inside vray, we need to set the output
gamma of 3dsMax back to 1.0, because otherwise it will apply its gamma curve AGAIN while
saving out the image, and it will get double corrected.

Here's an overview of the settings you should use if you want to burn in gamma while
rendering:

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
To make it a bit more complicated, here's a comparison between the image with the gamma
burned in, and the saved EXR where no gamma was burned in. As you can see, this burned in
gamma also looks a bit brighter.

Conclusion is that the sRGB curve is not the same as a gamma 2.2 curve. But in the case of
gamma burned through color mapping, it doesn't matter, as you're never using the sRGB
button. Your image viewed in the VFB will be exactly the same as your saved image.

Summary

The linear workflow/gamma 2.2 setup now is the default workflow for V-ray and 3dsMax.
All recent renderers by the way use this approach. If you're new to Vray, you won't notice it
that much, except when saving images to a non full float format, as then the curve applied
while saving is not the same as the curve applied while viewing the image in the V-ray VFB, so
you'll get slightly different looking images when saved.
The best solution, and the most professional one is to save out your images as EXR files. With
these files, you'll also have the most control for further color corrections or compositing. This
way you're working in true linear space.
A second solution is to apply gamma 2.2 through color mapping, and to turn off the sRGB
button and save out the image without an extra gamma correction.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
In my opinion, there is no right or wrong, use whatever method that suits you best!

Below are the settings for both approches:

True linear space setup:

Here are all the setting for the most professional workflow, these are the defaults for V-Ray
and 3dsMax:

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Burn in gamma 2.2 setup

Here are all the setting if you want to burn in gamma during rendering:

Extra note: using RGB values from clients

There's one more problem we didn't cover, and that's when you try to apply colors from a
logo to a certain object in your scene. For example, you want to make the teapot the same
red as the background of the Ferrari logo. So you take it into photoshop, use the eyedropper
to sample the red and you write down the RGB values: 229,28,36.

Now you go in 3dsMax and change the red of the teapot to these exact values. As you can
already see in the color selector, this looks more like pink than red. Also the render shows a
pink teapot.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
The problem is that max is setup to chose colors so they will look correct once rendered with
a gamma 2.2 curve. Photoshop however is not, so you can't just copy these RGB values.

One approach is to take a small part out of the logo image, save it as a texture and apply this
small texture to the diffuse channel of the material:

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Or, place the texture in an empty slot of the material editor, double click it to open it up, and
then in the teapot material diffuse color swatch use the eyedropper to sample a color from
this logo texture:

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Render glass and liquid

Startup scene

The scene features a typical studio setup:

 White photo-studio groundplane/background


 A few big rectangular lights
GI is enabled, and there's a a black environment override color for reflection/refraction.

Wineglass

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, the main lighting is coming from the right and from the top. On the left there
is a third light which is tinted slightly blue.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Glass material

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

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

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
diffuse color (pure black) and then by setting refraction to pure white you make is 100%
transparent.

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.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Glass material - reflections

We also need to make the glass material reflective , so simply change the reflection color to
a light grey, and make sure you have Fresnel reflections also checked.

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

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
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.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Glass color - Fog

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.

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

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Glass color - fog multiplier

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

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. Of course, the look of the glass will depend heavily on the
environment it is photographed in!

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Reduce the multiplier even further to 0,02.

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 transparant.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Glass color - fog bias

To get the best of both worlds, you can use the fog bias. Change it to -0,3 and do a test render.
As you can see, the thinner parts look almost the same as before, while the thicker parts
become a lot darker.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Max depth for reflection and refraction

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 forever. It's like when you're in between 2 mirrors facing each other,
your reflection will be reflected in infinity.
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 12 for both reflections and refractions.

Note that the difference is subtle...

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
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).

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Water object

Unhide the 'water outside' object and do a test render.

This 'water' object currently has a white opaque material applied.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Water material

Copy the glass material to a new slot and rename it 'water'.

Apply the water material to the water object, and hit render. As you can see, the water
doesn't look very tasty...

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Water material

First, change the IOR to 1,33. This the correct IOR value for water. Then make the fog color a
lot brighter, as in the second screenshot. We don't want to darken the thick parts as with the
glass material, so set the fog bias to 0 again.

Now render again, this looks more like it!

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
How to model the Water object!?

In order to render realistic liquid inside a glass, there is a small trick you need to take care of...

First of all, because of adhesive forces, the water surface will be curved where it touches the
glass. So if you want realistic results, you have to model this effect. If you zoom in on the
edges of the water object, you will see it has a slight curve, it is not simply a straight cap!

Then there is an even more important detail when modeling the water object. The screenshot
below shows 3 ways to model it.

The first one is to model the water surface smaller than the glass inside surface. As you can
see in the render below it, this doesn't give the desired effect. Take a look at a real glass filled
with water, this is not how it should look like!
The third image shows the water object modeled exactly against the inside glass surface. This
means that the water object and glass object intersect each other, and as you can see in the
rendered example, this results in strange looking effects.
The middle image is how it should be. You make sure that the upward curve touches the
inside of the glass, and then you model the rest of the water sides LARGER than the inside
surface of the glass. In this case it is just 0.1mm larger, which is already enough. The rendering
below shows that this is the way it should be modeled.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
So keep these 2 tips in mind when modeling your liquids inside a glass.

Red wine material

Copy the water material to a new slot and rename it 'red wine'.

To better see the materials in the editor, click the background button for each material:

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Change the fog color to a light, not too saturated red color.

Hit render and behold, the water is turned into red wine! (More like a cheap rosé though)

Red wine is darker

Change the fog color to 0.05, to make the wine darker. This isn't perfect yet, but you get the
point.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
If you want, play around with fog color and fog multiplier to get various effects.

Empty the glass

Select and hide the 'water' object. Hit render and you should get an image of an empty glass
again.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Dispersion

Dispersion is a subtle effect seen sometimes in pictures of glass, where the glass will color like
a rainbow in some areas.

Since V-ray 2.0, rendering dispersion is as easy as ticking a checkbox! So that's what we'll do,
just enable the dispersion checkbox and hit render.

Note that the effect is very subtle, and render times increase a lot (10s vs 25s).

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
When zoomed in, the effect becomes more visible. Even though the effect is subtle, it will add
to the realism of your image. Especially if you're doing close ups in highres, dispersion can be
very beatifull.

Dispersion - abbe

Dispersion only has one setting: abbe. Lower it to 10 and render. You'll see the effect becomes
more visible now, but a bit too much.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Final render

Set abbe to 35, to get something in between.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Play around with the scene

Here's an extra scene with a few copies of the glass and wine.

We changed the materials slightly to create 3 types of wine. Added a different camera angle,
used some vray DOF to focus on the front glass and then added a little bit of contrast and a
vignette in photoshop.

Also the render settings have been altered for higher quality. Note that this image rendered
11 minutes, while the previous one was only 30 seconds. So depending on your machine this
scene can take a while to render.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
The importance of true high dynamic range in hdr images

Buying HDRI maps

Many people don't seem to realize that there is more to a HDRI map than only a pretty picture.
Since you usually have to decide on buying HDRI maps from examining low dynamic range
previews, it's important to know what to look for and how to spot bad quality maps.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
This article will help you in doing just that, with a strong focus on the dynamic range which is
usually overlooked, especially by the providers of HDRI maps.

What to look for when buying HDRI maps?

There are a lot of websites offering HDRI maps, but only a few offer really high quality and
valuable maps. Here's a small overview of what to look for in a HDRI map:

1. Dynamic Range.

The most important thing is the actual dynamic range of the image. This is in fact what
this article is about, so we'll get back to this topic later on. But first read about some
other aspects of what makes a good HDRI stand out.

2. Is the map useful for your renderings?

You don't want to render your brand new watch in a desert environment. And you don't
want to render the latest concept car on a kitchen table. So think about what you want
your environment to look like, so it fits the scene you will be rendering. Even if you will
not be rendering your objects with the HDRI as a backdrop, the environment is
important. It shows up in reflections and makes up your lighting, so rendering objects
outside of their usual environment will look unnatural.

3. Variation in HDRI bundles or collections.

Make sure that when you buy a complete collection, that there is some variation in the
environments. Many collections contain dozens of maps from wide open exterior spaces.
The clouds seen from hill X look the same as the clouds seen from hill Y, so there's no use
in 15 maps from the same area on the same day. Same goes for city environments and
even interiors. The following maps look different, but the effect on your rendering will
only be small.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
4. Contrast and light

A HDRI map is used for rendering reflections and realistic lighting. So that's what you
want in your map: interesting features that will appear in your reflections, and nice lights
that will bring your scene to life. So make sure you get a rendered preview of a scene lit
with the specific hdri map, that's the only way you can see if it creates nice reflections
and vivid lighting.

Usually what you want in a HDRI map is contrast. If there's contrast, it will show in the
reflections on any material, even on rubber or slightly shining plastic. Also check out the
light sources: how many, what colors, how big, where are they placed, etc...
Here's an example of a HDRI map with lots of light sources, and very nice contrast. Next
to it is a scene rendered with the same HDRI map, notice the nice reflections and lighting!

5. Resolution vs sharpness.

Don't be fooled by some of the numbers... Higher doesn't always mean better quality! If
the high resolution map is blurry, then the high resolution has no use.
The Aversis HDRI maps are sharp when viewed at 100%.

6. Image quality.

Many maps are created with fisheye lenses, and have some stitching going on. So check
if the maps have stitching problems. Some are even created with mirrored balls, which
will lead to lots of artifacts like dust, scratches, wobbly lines, photographer in view, etc...
Here's an example of wobbly lines (left) and dust or surface imperfections (right):

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
7. Vertical lines.

Sometimes it will look like buildings are falling over, because the HDRI was not carefully
shot or stitched. These types of artifacts should have been corrected in the stitching
software, but most people don't pay much attention to it. Here's an example of verticals
that are not corrected (also note the curved horizon):

What is the dynamic range of a HDRI map?

In fact the dynamic range is the difference between the darkest and the brightest pixel in your
image. For example a HDRI map of a sunny environment, should have a very high dynamic
range if you want the reflections and lighting to match the actual real life environment. The
sun is ultra bright, and the darker regions (shadows) are very dark. In fact it is impossible with
todays cameras to completely capture the dynamic range of a sunny scene. Even with the
shortest exposure time, and smallest apertures, the sun will still be an overexposed point in
your image (while the rest of your image will be black!).

Many HDRI maps you can find on the web, don't capture the full dynamic range present in
the real scene. Here's a comparison between 2 HDRI maps, both lowered in exposure equally:

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
A good hdri map will keep the light sources bright when lowering exposure, while all other
pixels will go darker and darker. But as you can see in the bottom row, already after lowering
exposure by two stops, the sun in the hdri starts to go from bright white to light grey...

Note the two bands of sun color in the middle. The top HDRI captures a lot more of the actual
dynamic range. Only after lowering exposure by 12 full stops(!!!), the sun starts to change its
intensity. Lowering the bottom hdri 12 stops results in a black sun color...

Hu? EV's?

The dynamic range of a HDRI map is usually expressed in number of EV's or F-stops. EV stands
for exposure value, and 1EV corresponds to one full stop of light on a camera. For example
going from 1/400s exposure time to 1/200s, is going up one full stop, or 1EV.

The number of EV's is not directly related to the number of pictures that are used to create
the HDRI map. Many cameras can also expose the image with 1/2 stops, or even 1/3 stops.
So if you take 12 different exposures but with 1/3 stop interval, you capture in fact only 4 full
stops or 4 EV's! This is very important to understand.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
All this confusion results in many websites putting up random numbers next to their HDRI's
as they please. So you cannot really trust these numbers, and you have to take the hdri into
photoshop or something to really see the dynamic range you're dealing with.

As a guideline, you can use these values to make sure if the claimed numbers are correct or
not:
1. Sunny exterior scene

You're looking for 10 to 13 EV's. 13 EV's means for example going from 1/4000s to 1s of
exposure time. In a sunny scene, 1s with a very small aperture will most certainly result
in a very bright picture, so there is no use in shooting longer exposures as the scene will
be completely blown out. More EV's are possible with very high end cameras which are
able to shoot very short exposure times.
2. Interior scene

Here you will have even higher dynamic range, because indoor lights are a lot less bright
than the sun, so todays cameras will be able to capture these light better. 17EV's is not
an exception, which means going from 1/4000s to 8s of exposure.

So people claiming 25EV's or more are simply crazy, or not getting it right. If a HDRI has a lot
smaller EV span, than you can be pretty sure it's not a really good HDRI map (regarding the
dynamic range).

Dynamic range vs lighting & reflections

You might wonder what the problem is with bad dynamic range in HDRI maps. As said earlier,
when you don't capture the full range, you're in fact not capturing the exact lighting situation
of the real environment. So this will most likely translate into your 3D rendered scene,
resulting in a bad match with the real scene.

Here's a comparison of a scene rendered with the 2 HDRI maps we already compared before:

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
It is very obvious that both images look completely different... They should look quite similar
since they are both shot on a sunny day. You immediately notice three things:

1. Lighting color
2. Shadow sharpness
3. Reflection strength

Reflection strength

The red material is a not very reflective plastic. As you can see on the left, the sun is still strong
in reflections, since it is such a bright light source. The rest of the environment is reflecting
quite dark, like it should. You can also see that the sky reflects more into the object than the
trees and grass. This is normal since the sky is a lot brighter than the trees etc...

In the image on the right, you will see that the balance in reflections is completely wrong. The
white house appears even brighter in the reflections than the sun! That can't be right... This
rendered image looks more like renderings from 10 years ago, where Low Dynamic Range
images were used as reflection environments.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Shadow sharpness

How sharp your shadows appear, is directly related to the size of the light source. In these
HDRI maps, the sun is the main light source. The image on the left features sharp shadows,
because you can see that the brightest pixels in the hdri cover only a very small point.

In the right image, the sun is a lot larger, there are no brighter pixels in the middle of the star
shape. So all of these pixels have a big effect on the overall lighting. The mild shadows appear
very soft, because of this large sun. Then also the shadows are barely visible, because there
is almost no difference in intensity between the sun and the sky. So the balance of lighting
gets completely messed up.

Lighting color

Also because of this messed up lighting balance, the right image appears so blue!

Normally you would have a yellowish very very bright small sun, and a very big (but less
intense) blue sky. So the sky tries to make the lighting blue, but it is overpowered by the very
bright yellow in the sun. These two balance each other out which results in an image where
the sunlit areas are slightly yellow, and the sky lit areas are slightly blue (shadow zones).

Below I have selected a pixel in two areas: directly lit by sun and a shadow area. You clearly
see that the shadows are slightly blue, and the sunlit areas slightly yellow.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Examine preview renders

If you want to know the true dynamic range of a HDRI map before buying it, you can easily
spot it from looking at the preview images rendered with it. If it's a sunny scene, you shouldn't
see a totally blue image, with very soft shadows. Same goes for interiors, check out the light
placement (spotlights, big windows, etc...) and examine the preview render to see if the
reflections and shadows match.

Hopefully this article will help you spot bad quality HDRI maps in the future so you don't end
up spending money on crappy ones. Here's a small summary of points that should need your
attention:

1. Dynamic range: examine preview renders.


2. Is the map useful for your renderings?
3. Variation in HDRI bundles or collections.
4. Contrast and light.
5. Resolution vs sharpness.
6. Image quality.
7. Vertical lines.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
Please do the following tasks with 3DMAX software.

We’ll also need to setup the Max interface for a better workflow:

1. Set the System Units in Customize Menu > Units Setup to millimeters for best
performance. Set the Display Units to anyone you’ll be comfortable working with for
entering measurements.
2. Go to General Preferences in Customize again and switch on ‘Use Real-World
Texture Coordinates‘. This option will let you describe texture size in real world
measurement values.

Modeling

Before we begin modeling our room, we need to manage the imported shapes. It’s a good
idea to put them in a separate layer of their own right now. Select all the shapes and give
them proper wire color from the Modify tab. Detach any extra pieces and create Groups for
the different views.
Use the Front, Left and Top views to rotate and align their respective line drawings. Make
sure the elevation plans are centered on the Origin in the viewport. If you start modeling
and render too far away from the origin, you may notice lighting bugs and errors.
Now is the time to check the scale of the elevation plans to match real world units. You can
do this by using the Tape Measure tool in the Helpers section. Check the ceiling height and
scale the entire plan to match the actual height for the room.
The basic process for modeling structures is as follows:

1. Switch to the TOP view for modeling the walls.


2. Use the line tool with 2.5D vertex snapping enabled to create the shapes for the
walls.
3. It’s a simple tracing work where you need to start the line from one vertex and close
it on the same one.
4. Use the Extrude modifier to give volume to these walls.
5. As for the floor and ceiling, create a box geometry that covers the entire room. Place
the floor so that the origin point rests on the top surface. Duplicate it as instance for
the ceiling.
6. Use the same line shape method for filling the space below and above the windows
and doors.
7. In this training, a readymade window geometry has been used for the final touch.

Lighting

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
The next major step is setting up lighting. Consider lighting a modeling tool where you
model the scene with lights. Lighting the scene is a creative step that can make or break
your visualization. But it doesn’t mean that it’s hard to setup great lighting quickly.
We’ll also take this time to place our VRay Physical Camera in the room. For interiors, values
of f/4, 1/100 shutter speed and 100 ISO work well. White balance should be set to neutral.
If you want to remove the yellow cast in the room, then you can add a 50% gray sphere to
scene, render and pick the color cast over it and set that color as the custom balance. A
focal length of 28mm is the widest you should choose for interior spaces.
Place VRay Plane Lights outside the windows and doors covering the entire area. Set them
to Skylight Portal mode and make them Invisible. This will make them carry light from the
outdoors and project it inside the room.
For the main light, we’ll create the VRay Sun and Sky setup aimed through the windows. It
is a simple drag and drop operation for the sun and sky will be automatically applied. Lower
the Sun intensity if you wish and increase the Sun disk size to 4 for softer shadows.

Material Creation

Right now, the objects in the scene don’t have any materials or UV mapping applied to
them. Add a simple box type UVW Map modifier for all the geometry. For the material
creation process, we’ll cover that in an advanced course later. In this training, I’ve used a
readymade material library and simply dragged the materials for wall, floor and ceiling onto
the objects in the viewport.
If any material has not been applied to an object, then it will render with its wire color
applied over it.

Rendering

For rendering the scene, switch your view to the camera and open the Render Dialog from
the main toolbar or F10 key. Set VRay Adv 3.6 as the main renderer. For quick drafts use the
following settings:

1. Turn off Hidden Lights in Global switches rollout.


2. Set the sampling engine to Bucket with 1/24 for min/max subdivs with 0.01 noise
threshold, and bucket size of 12.
3. Use exponential mapping with gamma 2.2 in Color Mapping settings and 35/15 for
Subdivs/Interp. samples.
4. For the GI calculation, set Irradiance Map (Low) as primary and Light Cache (500) as
secondary.
5. Set the amount of memory available to VRay to as much as you can spare.

If you’d like to learn more advanced techniques and take your visualizations to the next
level, then join any one of the many workshops here at VRaySchool. Hope to see you there.

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom
In the meantime, share this post with your friends and post any queries in the comments
below.
These are the basics that every interior designer should master! If you want to show your
designs at its best – know how to position your lighting and setup the camera “white
balance” output.

“Develop all the creativity you have and make yourself meaningful”

immediately send your assignment: mkvmedia2019@gmail.com

And smartstudent

3D Animation/vray/mkv-lp3i/2020-Efendi, S.I.Kom

You might also like