Aversis logo   

FREE Vray Tutorial - Global illumination methods

 

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

Before you start

This tutorial covers some basics about global illumination, and the different algorithms V-ray provides to calculate it. We will not go into detail about every setting, it's just a general guide.

This tutorial was created with Vray version 3.0, please do not email me with questions about this tutorial if you are using a Vray version prior to V-ray 3.0, since the answer to your question is most likely that you're using a older version.

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

V-Ray jewelry rendering

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.

Free Vray 2.0 Tutorials | Global illumination methods in Vray

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.

Free Vray 2.0 Tutorials | Global illumination methods in Vray

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 for example the 63rd 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.

Free Vray 2.0 Tutorials | Global illumination methods in Vray

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.

Free Vray 2.0 Tutorials | Global illumination methods in Vray
Free Vray 2.0 Tutorials | Global illumination methods in Vray
Free Vray 2.0 Tutorials | Global illumination methods in Vray

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.

Free Vray 2.0 Tutorials | Global illumination methods in Vray
Free Vray 2.0 Tutorials | Global illumination methods in Vray

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

Free Vray 2.0 Tutorials | Global illumination methods in Vray

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

Free Vray 2.0 Tutorials | Global illumination methods in Vray

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.

 

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.

Here's a tutorial explaining all the irradiance map settings.

Free Vray 2.0 Tutorials | Global illumination methods in Vray

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

Free Vray 2.0 Tutorials | Global illumination methods in Vray

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.

Free Vray 2.0 Tutorials | Global illumination methods in Vray

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.

Free Vray 2.0 Tutorials | Global illumination methods in Vray

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.

Free Vray 2.0 Tutorials | Global illumination methods in Vray

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.

Free Vray 2.0 Tutorials | Global illumination methods in Vray

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.

Free Vray 2.0 Tutorials | Global illumination methods in Vray

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.

Free Vray 2.0 Tutorials | Global illumination methods in Vray

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.

Free Vray 2.0 Tutorials | Global illumination methods in Vray

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!

Free Vray 2.0 Tutorials | Global illumination methods in Vray

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.

Free Vray 2.0 Tutorials | Global illumination methods in Vray

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.

Free Vray 2.0 Tutorials | Global illumination methods in Vray

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. Here's a tutorial covering all the parameters in the IR map.

Back to Vray tutorials page
V-Ray irradiance map settings

AVERSIS 3D

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

• Visit us on Facebook
• Subscribe to our newsletter

AVERSIS SHOP

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

FREE STUFF

• HDRI maps
• Vray tutorials
• Rhinoceros tutorials
• Photoshop tutorials
• Vray Materials
• Textures

CONTACT

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

©2019 | AVERSIS 3D

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