FREE Vray Tutorial - Global illumination.pdf

16
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. 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. Home V‐ray for 3ds Max Rhinoceros 3D Photoshop Home Tutorials V‐ray for 3ds Max tutorials Free ‐ Global Illumination methods in Vray HDRI Tutorials V‐ray Materials Textures

Transcript of FREE Vray Tutorial - Global illumination.pdf

Page 1: FREE Vray Tutorial - Global illumination.pdf

6/2/2015 FREE Vray Tutorial ­ Global illumination

http://www.aversis.be/tutorials/vray/vray­20­gi­methods.htm 1/16

 

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 differentversions and places on the net. Feel free to link to this page of course! (see also Terms of Use)

Before you startThis tutorial covers some basics about global illumination, and the differentalgorithms V‐ray provides to calculate it. We will not go into detail aboutevery setting, it's just a general guide.

This tutorial was created with Vray version 3.0, please do not email me withquestions 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 olderversion.

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

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

Home

V‐ray for 3ds Max Rhinoceros 3D Photoshop

Home Tutorials V‐ray for 3ds Max tutorials Free ‐ Global Illumination methods in Vray

HDRI Tutorials V‐ray Materials Textures

Page 2: FREE Vray Tutorial - Global illumination.pdf

6/2/2015 FREE Vray Tutorial ­ Global illumination

http://www.aversis.be/tutorials/vray/vray­20­gi­methods.htm 2/16

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

GI ‐ primary bounceIn reality, light keeps bouncing around until it loses all its energy. Each time a bounce occurs, the light loses a bit ofenergy, depending on the properties of the surface it hits ﴾it gets reflected more or less, gets absorbed more or lessdepending on the surface material properties﴿.

So after an infinite amount of bounces, the lights energy reaches zero. To calculate an infinite amount of light bounceswould be crazy, so Vray has some ways to optimize this. Also, the loss of energy has an exponential curve, so in fact thelight energy fades out pretty quickly after a few bounces. This means that the effect of the first bounce on the finallighting 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 interiorpart are not black anymore. There are still very dark places, this is where the primary light bounces almost don't reach.

Page 3: FREE Vray Tutorial - Global illumination.pdf

6/2/2015 FREE Vray Tutorial ­ Global illumination

http://www.aversis.be/tutorials/vray/vray­20­gi­methods.htm 3/16

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

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

Page 4: FREE Vray Tutorial - Global illumination.pdf

6/2/2015 FREE Vray Tutorial ­ Global illumination

http://www.aversis.be/tutorials/vray/vray­20­gi­methods.htm 4/16

Page 5: FREE Vray Tutorial - Global illumination.pdf

6/2/2015 FREE Vray Tutorial ­ Global illumination

http://www.aversis.be/tutorials/vray/vray­20­gi­methods.htm 5/16

Primary bounces ‐ Brute forceThe 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 bitlike 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 skylightperfect 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 secondarybounces are grayed out, since we disabled these for the tests. The subdivs value is the quality of the brute force GI. Somore subdivs result in more accurate calculations, a less noisy image and of course slower render speed. I included therender time in all the images to compare.

Page 6: FREE Vray Tutorial - Global illumination.pdf

6/2/2015 FREE Vray Tutorial ­ Global illumination

http://www.aversis.be/tutorials/vray/vray­20­gi­methods.htm 6/16

The second image is with brute force subdivs set to 16. You can clearly see the noise is a lot less now, but render timeswent from 29 to 68 seconds. Note that the subdivs value of 8 actually means 8*8=64, and 16 means 16*16=256. Sotake care when you want to increase quality! ﴾This is true for all subdivs values inside Vray by the way.﴿

The third image has subdivs=32. Notice how it's especially the noise inside the box that gets better now. Also notehow defined the shadows under the teapots and the sphere are. Even caustics are showing up underneath the glasssphere! Caustics appear when light gets bundled by reflective and/or refractive objects. Like in the old days when youused to burn ants with a magnifying glass from the bundled sunlight...

Page 7: FREE Vray Tutorial - Global illumination.pdf

6/2/2015 FREE Vray Tutorial ­ Global illumination

http://www.aversis.be/tutorials/vray/vray­20­gi­methods.htm 7/16

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

 

Primary bounces ‐ Irradiance mapThe irradiance map is Vray's answer to efficiently speed up GI calculations. Not all surfaces and regions in a scene havethe same GI detail ﴾=shadows﴿, for example on a flat plane without any objects, lighting will be very even in everypoint. But when the surface is very bumpy, and lots of small objects rest on it, the GI will be much more detailed: smallshadows 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 whichparts 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.

Page 8: FREE Vray Tutorial - Global illumination.pdf

6/2/2015 FREE Vray Tutorial ­ Global illumination

http://www.aversis.be/tutorials/vray/vray­20­gi­methods.htm 8/16

The result of the irradiance map calculations, is a collection of points on the surfaces in the scene. Each point has agiven value for its color ﴾=light﴿. Areas that are flat without much detail, will have points spaced far away from eachother because lighting doesn't vary much between two points close together. But in more detailed areas, points will beplaced 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 forceimage, but shadows are less detailed, and especially inside the box the shadows form 'splotches'. But on the otherhand the render times are a lot lower.

Page 9: FREE Vray Tutorial - Global illumination.pdf

6/2/2015 FREE Vray Tutorial ­ Global illumination

http://www.aversis.be/tutorials/vray/vray­20­gi­methods.htm 9/16

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

For the last image, very low IR map settings were used to better see the 'blurring' or loss of detail in the shadows. Nowall objects seem to be floating because of the lack of detailed shadowing underneath them.

Page 10: FREE Vray Tutorial - Global illumination.pdf

6/2/2015 FREE Vray Tutorial ­ Global illumination

http://www.aversis.be/tutorials/vray/vray­20­gi­methods.htm 10/16

Primary bounces ‐ Light cacheLight cache is another GI calculation method. It's a bit special as it computes 100 bounces by default. So if we put it inthe 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 dueto the extra bounces it computes.

Page 11: FREE Vray Tutorial - Global illumination.pdf

6/2/2015 FREE Vray Tutorial ­ Global illumination

http://www.aversis.be/tutorials/vray/vray­20­gi­methods.htm 11/16

To speed up calculations and to get some contrast back in the shadows, just lower the bounces. In the image below, 3bounces 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 secondimage is rendered with 2000 subdivs ﴾instead of 1000﴿. You can already see a big improvement in the GI detail andquality of the shadows.

Page 12: FREE Vray Tutorial - Global illumination.pdf

6/2/2015 FREE Vray Tutorial ­ Global illumination

http://www.aversis.be/tutorials/vray/vray­20­gi­methods.htm 12/16

If you turn on "show calc. phase" you will see the LC process being updated during calculation time. This is a veryeffective 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 LConly, it is mainly used for secondary bounces while you use IR map or brute force GI for the primary bounce.

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

Page 13: FREE Vray Tutorial - Global illumination.pdf

6/2/2015 FREE Vray Tutorial ­ Global illumination

http://www.aversis.be/tutorials/vray/vray­20­gi­methods.htm 13/16

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

primary = IR map and secondary = brute forceprimary = IR map and secondary = light cacheprimary = brute force and secondary = light cache

 

IR map and brute forceThis combination is used a lot for scenes without too much secondary light. For example product renderings areusually made in some kind of studio setup, where an object is placed on a flat plane, lit by some large area lightsand/or a skylight. Since most bounces fly off into the sky and therefore don't need further calculation, there are notmuch 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 secondarybounces are calculated by the exact brute force method. With some good IR map settings, this results in high qualityimages with fast render times.

The biggest effect on overall lighting in this scene even comes from direct lights, so even with some lower IR mapsettings 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!

IR map and Light cacheWhen the amount of bounced light gets more prominent in your scene, the ir map + brute force combo can becomequite 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 thecalculation 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 IRmap settings to extremes. Because then the IR map will become very slow too. So the IR map + LC is a good combo forrelatively flat interior scenes.

Page 14: FREE Vray Tutorial - Global illumination.pdf

6/2/2015 FREE Vray Tutorial ­ Global illumination

http://www.aversis.be/tutorials/vray/vray­20­gi­methods.htm 14/16

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

The IR map has many problems with moving objects, since it is an approximate method, so each frame will have aslightly varying lighting solution ﴾the sample points move from frame to frame﴿. This results in 'flickering' of the GI lightin your animation. By using an exact method like brute force, you can remove the flickering. However that requires alot of computing time. There are ways to remove flickering when using ir map or lightcache, depending on the type ofanimation 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 arecasting. It shows detail that was completely lost in the previous image.

Page 15: FREE Vray Tutorial - Global illumination.pdf

6/2/2015 FREE Vray Tutorial ­ Global illumination

http://www.aversis.be/tutorials/vray/vray­20­gi­methods.htm 15/16

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

Back to Vray tutorials page

AVERSIS 3D RESOURCES

• Home• Terms of use ‐ free stuff• Terms of use ‐ HDRI• Terms of use ‐ Tutorials• Terms of use ‐ Vray Materials • Terms of use ‐ Textures• Visit us on Facebook• Subscribe to our newsletter

AVERSIS SHOP

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

FREE STUFF

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

CONTACT

If you have any problems regarding theAversis shop, don't hesitate to contact usthrough email at info﴾at﴿aversis.be

©2015 | AVERSIS 3D RESOURCES

All rights reserved. No part of thiswebsite may be reproduced withoutwritten permission from Aversis 3DResources

Newsletter×Signup to the Aversis Newsletter for special offers and updates!

Email Address

First Name

Last Name

Subscribe

Page 16: FREE Vray Tutorial - Global illumination.pdf

6/2/2015 FREE Vray Tutorial ­ Global illumination

http://www.aversis.be/tutorials/vray/vray­20­gi­methods.htm 16/16