Indirect Illumination in V-Ray 1.5

Nov 5, 2020 Update

Introduction

Hello everyone!

We are pleased to share with you a new portion of 3d stuff. We continue to discuss the best settings for V-Ray renderer, in this and the following three tutorials, we consider a second important part of any photorealistic 3D renderer - Indirect illumination. Before moving on to certain parameter values, it is extremely important to understand the concept of indirect illumination and its role in realistic 3d.

Global illumination is one of the modern rendering engine algorithms, which adds to the final image an additional render element. For ease of understanding of the rendering engine, the simplest way to imagine forming of final image is as it obtained by superimposing separate render elements, such as shadow, color, light, information about transparency, etc. each over other according to certain rules (blending modes). That is to imagine the final rendering as a collection of separate images with different information combined together. Those who know Photoshop can compare this process with the overlaying of different layers with a specific blending mode. Indirect illumination is one of the render elements, which adds to the overall result the information about the indirect light present in scene. To understand more exactly, what is added to the final image with this element, let us learn what the global, secondary or indirect illumination is in principle.

Indirect illumination in Nature

Indirect illumination is the illumination of the objects by the diffusely reflected light only, without direct light from the actual light source.

If you put some object in front of directional light source, such as window, and bring to the dark side of this object a sheet of white paper, you may notice that this dark side will be much lighter.

Bring closer and move away the white sheet from the unlighted side of the object several times, and you may see the difference in the final illumination of the surface with and without light sheet. The effect of lighting by a piece of paper would be even more obvious, if there are no objects around, which are as light-coloured as this paper sheet.

Why is this happening? Why does one object become brighter, if it appears beside the other bright object?

This happens because the effect called diffuse reflection. Bright object simply reflect rays falling on it from the light source. Therefore, reflecting, they illuminate the dark side of another object. Because of its origin, due to the fact that these rays are reflected and come from other objects, rather than going directly from the light source, they are called indirect. Accordingly, the light that is created by these rays, called indirect, that is, Indirect illumination.

It is easy to guess that ray, reflected first time from an object, also are reflected an enormous amount of times from other nearby objects. This avalanche-like process happens with all illuminated objects, eventually creating a set of reflected and mutually-reflected rays in all directions. Each subsequent reflected light ray carries less energy than previous ones because it is partially absorbed by the object from which the ray is reflected. Consequently, the light ray is fully faded. Due to the fact that this reflected light significantly illuminates even those sites that are not illuminated directly from a light source, that is, illuminating the global environment, this lighting part is called Global illumination or shortly GI.

To avoid further misunderstandings, "GI" is a very popular term in computer graphics. This is an abbreviation and literally stands for Global Illumination. It will be mentioned many times later, so you should know about it.

Global Illumination in Computer Graphics

Of course, all the photorealistic render engines are capable to simulate the global illumination, in some way calculating the first and subsequent reflections of light from objects in the scene, taking into account not only the color of these objects, but also features of their materials, such as transparency and reflective properties.

Let us see how indirect lighting looks like in computer graphics on concrete examples.

For this example we have created a simple scene in 3ds Max.

The screenshot above shows that it is a rectangular room with a window opening into which the light source is set. Indoors near the window there is ChamferBox with little Fillet radius, and usual Sphere next to it. All materials in the scene are completely mat, without any reflections, even blurred. The materials of this scene have only the texture maps; the materials of cube and sphere are the standard materials with white color in the Diffuse slot.

This is the scene rendering. Note that only the direct rays from the light source illuminate it, without the use of GI. For clarity, one of the rays is shown schematically as a green arrow.

As can be seen on image, highlighted are only the areas of direct contact with the light rays. They are the floor and ceiling near the window opening, part of the wall near to the cube and the upper part of the wall opposite to the window opening where the arrow represents the light ray. Nevertheless, despite the presence of a bright source of light in the window and well-lit parts of the room, the scene still has a lot of unnatural dark areas. For example this is a wall with a window opening, visible to us the face of the cube, and the area right to it.

As seen from the screenshot of 3ds Max viewport, next to the cube is a completely white sphere. However, it absolutely is not visible.

Of course, in the real world, in such a situation it will be perfectly visible, even if it is not exposed to direct light rays.

This picture shows the same scene, same settings, the same source of light and materials, but it has a global illumination. You can clearly see that the scene is much brighter. A wall with a window opening has become lighter, as well as the visible face of the cube; in addition, now is clearly visible the white sphere, which on the previous rendering was in complete darkness.

To understand the effect of indirect lighting, look at the conventional Direct Light ray from the direct light source. As mentioned earlier, the indirect illumination is an effect of light rays reflection from all objects. The global illumination simulates exactly this effect in computer graphics. Ray of light comes from its source and hits the wall opposite to the window opening. Then, indirect illumination picks the baton so rays do not disappear, they are reflected, bouncing off the wall, falling onto the sphere. The red arrow conventionally represents it. Thus, the primary bounce happens from the scene object, and light falls on the sphere, of course, illuminating it. After that, the ray is reflected again, this time from the sphere and strikes the bottom of the wall behind it and, again, highlights it as well. This is shown schematically by blue arrow.

Number of secondary reflections of the ray is not limited to two bounces. They can be much more, depending on the settings the renderer. Also, it should be understood that each ray from the source of direct light upon reflection splits into many secondary rays of light. This amount also depends on the specific settings. In the above example the set of rays into which a ray of direct light breaks, not shown merely to simplify the scheme. More detail, the scheme of the diffuse reflection of the ray resembles turned over dandelion:

Original ray from the source of direct light, which shown with green color, hits the surface, then form secondary rays, shown in red. These secondary rays reflect from the surface diffusely, that is by scattering to the set of rays in all directions. In turn, these are already reflected rays, striking the other surfaces, in the same way, each again forms a set of rays, and so on and on. Global illumination ray can bounce many times, depending on the number of bounces, defined by the parameters of the renderer. Based on the image above, it is easy to imagine that they form a hemisphere, similar to a half of dandelion inflorescence. Vectors of the rays diverge in all 180 degrees in different directions, by the hemisphere from the point of reflection. That is how the rays behave in the GI engine, and because of the shape of the reflection, they are called Hemispheric Rays.

It should be noted that bounces of light rays of the global illumination in V-Ray is divided into Primary bounces (first reflection), and Secondary bounces (all subsequent ones). The first ray bounce from the object scene called the Primary bounce not without reason. The whole point is that the rendering engine that simulates the behavior of the real world sets the fading of the rays as they reflect. Therefore, as happens in the real world, the first bounce bears much of the reflected light energy. The energy of this first primary bounce is so significant that it much more than the light energy of all subsequent reflections together. It one affects the illumination of the scene greater than all subsequent ones. Conversely, in view of their lesser importance, all the bounces that follow the first primary one, called the secondary bounces.

Practical GI Setup

Well, it is time to figure out how to actually manage global illumination in the V-Ray.

Open the Render Scene dialog (F10 key) and go to the Indirect illumination tab.

In this tab, the general manager is the V-Ray:: Indirect Illumination (GI) rollout. It controls global illumination, rendering algorithms, the choice of primary and secondary bounces engines and general settings of GI.

First, to enable global illumination in a scene we should set tick in the checkbox named On. After this, we have available parameters of the V-Ray global illumination engine.

In first GI caustics area we can enable or disable the so-called Reflective and Refractive caustics for GI rays.

In short, caustic is the place where the reflected or refracted rays from the reflective and transparent curved surfaces are gathered, drawing a specific clearly visible light patterns. In other words, this is the effect of the curved lens, projecting the light rays on some surface, where the lenses are the reflective and transparent objects of the scene. The most obvious example of caustic is fancy light pattern on the table near the glass, on which the light shine from a side.

It is these effects simulates caustics photon map, situated in the V-Ray:: Caustics rollout. Despite the fact that current rollout is the last in the Indirect illumination tab and logical to write about it as the very last thing we would like to briefly write about it right now. The calculation of caustics in the V-Ray is accompanied by the appearance of a large number of artifacts, excessive consumption of memory and complex pre-configuration. All this is for the minimally noticeable, and often absent effect in most scenes. In the universal starting V-Ray configuration, rendering caustics should not be enabled.

However, it should be understood that the calculation of caustics and GI caustics are two different things. Caustics, created by the aforementioned photon map can be calculated only for direct rays of light. While GI caustics are calculated separately. The GI caustics configuration area in the V-Ray:: Indirect illumination (GI) rollout are responsible exactly for these caustics, which are originated from the global illumination. Moreover, GI caustics are called caustics only by a certain analogy with photon caustics, in fact, they are not.

Option Reflective allows us to enable rendering of reflective GI caustics for GI bounces, allowing GI-rays to take into account the reflective properties of materials and better reflect from reflective objects such as chrome, mirrors and other.

Given the lower energy of indirect bounced rays, compared with the rays from sources of direct light, the effect of reflective caustics on the overall scene illumination is negligible. In addition, since the need to render Reflective caustics by renderer, their inclusion will increase the render time of global illumination. Moreover, taking into account the complexity of this effect sampling, the appearing of unwanted noise in the GI is possible. Considering mentioned drawbacks, this option should be nominally left off in the universal starting V-Ray configuration.

Refractive option allows us to include rendering of refractive GI caustics for GI bounces. Despite the similar name to the caustic from the direct rays of light sources, where it simulated caustic lighting effects, Refractive caustics simply allows the passage of secondary illumination through the transparent surface. For example, this applies to the interior scene, which is illuminated by the indirect illumination from VRaySky / skylight / Skylight portal, located behind the window, and window openings are models of windows with glass. Lack of calculation of Refractive caustics in the scene will render all black, simply because the GI rays will not fall into the interior, because they not are able to pass even through the transparent glass window.

For most scenes, such behavior is unacceptable and therefore GI option Refractive in universal V-Ray settings should be activated by selecting the checkbox Refractive.

The next area of the V-Ray:: Indirect Illumination (GI) rollout is Post-processing, which contains three parameters.

Saturation is a very important parameter of GI, which is responsible for the color saturation of reflected light or, as practice shows, simply for the value of the so-called color bleeding effect.

This image is a rendering of used earlier scene, with the same light source, with the same material objects, with one exception, the material of the cube is red.

There is no need much time to look closely to the image, comparing it with previous ones to realize that not only the cube, but other scene objects got a reddish tinge. This effect is quite common for the real world, and actually is the phenomenon of color bleeding.

Its nature is quite simple. Red object is an object that absorbs the rays of all colors and reflects only the red color rays. It is this effect clearly imitated on this image. Direct rays of white color, which, as we know, bears all the colors of the visible spectrum, falling from a window on the surface of the cube, and then reflected. But they no longer reflected white, as they were originally. They are reflected red, as red material of a cube absorbed all the colors except red. Thus, the red cube lights nearby objects and paints them red.

Lowering a Saturation: value, will help to get rid of this effect. A lower value makes the color saturation of diffuse reflection paler, while the larger value makes it richer.

That is the same scene with the same red cube, but with a value of Saturation:, equal to zero:

This image is no longer has red walls, but it should be understood that this is a global setting that affects every diffuse reflectance in the scene, reducing the color saturation of all GI rays. In most cases, a strong understating or overstating of this parameter gives an unnatural result. Optimal for the vast majority of the scenes is the value of this parameter equal to 0.7. That it must be set in the universal starting V-Ray configuration.

If there is a need to correct the effect of color bleeding of any particular object or material, for local control of this aspect the VRayOverrideMtl should be used.

Contrast: and Contrast base: are the parameters that literally control the contrast of GI, which renderer uses in forming of the final image, similar to how Saturation is essentially just controls color saturation of GI. Contrast: parameter works in conjunction with the Contrast base:. Technically Contrast base is one of the variables of the algorithm that computes the contrast of GI render element, shifting the range of its values, thereby affecting its brightness. When Contrast base is zero, increasing the value of the Contrast: parameter brightens GI; at the Contrast base greater than zero, the overall brightness is increasing, and increasing of the Contrast parameter value leads to darkening of GI.

In practice, these parameters are easily viewed as an analogue of Brightness/Contrast tool from raster editor - Photoshop. In the vast majority of cases, there is no need to somehow change the contrast of the GI. Therefore, in starting V-Ray settings, their value should not be changed, leaving 1 for Contrast: and 0,5 for Contrast base:, as it is set by default.

The next area of V-Ray:: Indirect Illumination (GI) rollout is a zone of GI engines choice of for Primary bounces and Secondary bounces of the light rays.

The number of GI settings causes panic to many 3d visualization artists. In fact, in these settings everything is fairly logical. There are primary and secondary bounces of the ray. Both are computed with special GI engine algorithms. There are four GI rendering algorithms in V-Ray. Their choice can be compared with choosing of antialiasing algorithms. There is one uncompromising calculation algorithm of GI bounces called Brute force and three slightly more flexible algorithms: Global photon map, Irradiance map and Light cache.

In areas of Primary bounces and Secondary bounces, there are only two parameters, a numerical Multiplier: parameter and GI engine dropdown list.

Multiplier: is a value of the current light bounce GI render-element applying intensity in formation of the final image. Simply it is its brightness.

By default, to Primary and Secondary bounces Multiplier values are set equal to unity. But this is not the most successful value, because of the excess brightness of the GI rays compared to the direct light rays. The images with these values are noticeably overbrighted and have no contrast. Often, it affects shadows much, which become lighter, so on rendering it immediately causes the effect of "flying" objects, under which the familiar shadows are absent.

Look closely at this image. It is quite bright, but all details of the scene are slightly visible, they appear blurred and fuzzy. This occurs because the indirect light lights the shadows, and thus greatly reduces the detail of the scene, making it flat. In scenes that contain objects of saturated colors, the value of Color bleeding is also increased, owing to the greater color influence of GI-rays on the scene. Also, it is not very clear what is the source of light in this scene, because there is absolutely no contrast between the bright light from the window and just as bright indirect lighting. There is an illusion that somewhere inside the room is an additional source of light. Nevertheless, very different picture can be observed on the image with a successful global illumination multiplier value.

In this picture, the right balance between the intensity of the direct light from the light source and indirect lighting in a scene is chosen. Look at how clearly visible light background, there is no doubt that it is a source of light from the window, not the improvised indoor sources. There are also visible details much clearer; the scene becomes juicy and well worked out in detail. This approach significantly enhances the image contrast, making it more photorealistic. If the image seems not bright enough, this is elementary solved by raising the total Multiplier value in the V-Ray color mapping settings, located in the V-Ray: color mapping rollout of V-Ray tab in Render Scene window. More details about the global adjustment of final render brightness you can find in Replacement of VRayPhysicalCamera with Standard.

If you want only a minor refinement of overall rendering brightness, it is much smarter to alter it in 2d graphics editor. In addition, as mentioned in the first tutorial of the best V-Ray settings series, adaptive behavior of V-Ray render-engine is heavily dependent on the brightness of the image calculable. This means that calculation of the lighter GI inevitably lead to more time for rendering of the final image. For these reasons, we should choose the correct meaning of the brightness of GI. Rational and the most suitable for the vast majority of scenes and situations are the values of 0.85 for Primary bounces and 0.7 for Secondary bounces. These values should be used in the universal initial V-Ray configuration.

GI engine: are drop-down lists where we can choose one or another algorithm for rendering bouncing rays. In order to understand what algorithms should be used for Primary bounces and what for Secondary bounces, we need to become better acquainted with the each of them.

Conclusion

In this tutorial, we became more familiar with some important aspects of setting up the V-Ray renderer, in particular with the tools of V-Ray:: Indirect Illumination (GI) rollout, as well as with the theoretical basis of global illumination concept in CG and it nature in a real world.

Dear friends, we sincerely hope that after carefully reading this tutorial, you are much closer to understanding the essence of GI and the important role it plays in photorealistic computer graphics.

There will be more practice in the next tutorial. We will learn Brute Force and Irradiance Map GI engines and their practical application.

See you in the next chapters of this tutorials series!

Comments
pepo
Feb 11, 2011
Really interesting things, the whole theory related to GI and the general approach to V-Ray were very useful. You say that the number of secondary reflections of the ray is not limited to two bounces, that there can be many more, depending on the renderer settings. But how can this be controlled? I don't know any parameter that would allow me to control the third, fourth ... etc. secondary bounces. Thank you very much for the sharing!
RenderStuff
Feb 11, 2011
Hello, pepo!
We're glad you enjoyed this tutorial. The next tutorial of the series, which we will publish in just a few days, will answer this question in detail. However, if you want to know right now, Brute force as a Secondary bounces GI engine has a parameter called 'Secondary bounces' where you can set the desired number.
bricker-bes
Feb 11, 2011
Very smart and affordable! Even I think I started to understand something...
Dmitry
Feb 13, 2011
Who clearly thinks those who clearly speak! The best articles on V-Ray. Thank you for your work.Keep doing what you do!
Denys
Feb 17, 2011
Very accessible and well chewed ... really the best articles on vray ... thank you
FoksMalder
Feb 18, 2011
I may have missed it, sorry, but I think the original test scene may be useful to share here. In any case - thank you very much. Very useful material.
RenderStuff
Feb 18, 2011
Hi, FoksMalder.
I believe that anyone, who interested in VRay settings, will probably be able to easily recreate this scene. It's just a simple box with a hole, like a 'window' with a random wall texture, and basic 3ds Max primitives, that is chamfer-box and a sphere. So there is no need to share this, you better test these settings on some real project that you have done recently to compare the results. It would be much more interesting and useful.
And say hello to Agent DanaScully!
Hudruk
Feb 19, 2011
RenderStuff, thanks for the long-awaited sequel, the second part of the tutorial as readable as the first one. Everything I read here, I try to put into practice, but the result is not very good. Can I share my scene with you? I will be grateful for any help and advice.
RenderStuff
Feb 19, 2011
Hello, Hudruk!
If you are not an experienced V-Ray user, it is better to read all seven chapters of this tutorials series and only then draw conclusions about the final results. In any case, we will be happy to advise you as much as we can.
csabi
Feb 24, 2011
Hi! I just love your tutorials! Congratulations! Thanks!
berdo
Feb 24, 2011
excellent tutorial, thanks!!
max
Feb 27, 2011
nice sharing. very good tutorial thank you.
Fairesure
Mar 23, 2011
Thank you for the tutorial interesting and informative! We look forward to continuing.
rgyula
Apr 12, 2011
Very good and nice jobs (models, tutorials)
Thanks!
an_ka
May 22, 2011
RenderStuff you are a genius! Amazing tutorial. Simple and clear. Thank you very much dudes!)
Andrey
Jul 5, 2011
Hi, tell me about VRayOverrideMtl, are you planning a tutorial on this topic?
RenderStuff
Jul 6, 2011
Ew not planning anything related at the moment, but the 'trick' is pretty simple. VRayOverrideMtl ​​allows you to override GI behavior of the material. Official V-Ray docs provides a great example. I suggest you take a look.
KostYAn
Oct 14, 2011
Hello! And what if you leave a multipliers for Primary and Secondary bounces as 1, and then just add AO?
Anton (RenderStuff)
Oct 14, 2011
What for?
ismail
Nov 16, 2011
your approch is just so easy to understand. Thanks Sr. for the article, i enjoyed it. All the best, ismail
ffuffu
Mar 1, 2012
Hello! Thank you for the interesting article. Could you share your experience of the practical use of Ambient Occlusion? Thank you in advance
avex
Mar 15, 2012
Hi Renderstuff! Are you planning a tutorial with the same detailed explanations, but on caustics?
Anton (RenderStuff)
Mar 21, 2012
Hi avex, we plan a lot of tutorials on different subjects, but particularly on AO we not plan anything yet.
nayk
Mar 29, 2012
a wonderful lesson! thank you very much
Carlos Barbosa
Jun 20, 2012
AMAZING, SIMPLE AND EFFECTIVELY
Selvanathan
Aug 5, 2012
Thanks a lot a friends, i've been looking for this kind of stuff for a long time. Thank you again
mehdi
Sep 21, 2012
hi. your site is the best site about vray i have seen. thanks alot
Harys
Oct 9, 2012
thank you, a lot :)
Iliyan
Feb 22, 2013
Thanks for the nice tutorial. I have one comment. The claim that any GI multiplirr other than 1 makes render more photorealistic is, in my opinion, contradictory. I may be too picky here, which is due to my scientific background, but only a multiplier of 1 (as well as a constant contrast) gives a physically correct result. Everything else is just a hack, even if the image looks subjectively 'nic'. I know that artists are rarely strict about physical correctness, but I think it's worth noting.
Maks (RenderStuff)
Feb 25, 2013
Hi Ilian,

I do not want to disappoint you, but there is no such thing as 'physical correctness' in the 3d world and perhaps never will be.

Physical correctness of what? Ray-tracing algorithms that project (calculated by an approximate geometrical formulas) vectors / graphs from the camera to the object in scene and only then to the light source (this is the actual behavior of renderers, not vice versa as you may think) to determine colors? Colors of virtual entities, such as polygons in the scene. Do you think this can be 'physically correct' even in theory? Really?

As we mentioned in the tutorial, GI in CG is just one of many render elements that overlaps one on top of another like layers in Photoshop in different blending modes. The GI multiplier is just the amount or percentage of how much of this 'layer' should be added to the final image. It is just simple compositing. Can you say that the % of overlay between Photoshop layers can have an physically correct value?

I want you to understand correctly, I do not cross the boundaries of personality, I just want my explanations to be as eloquent as possible. I do not know what kind of background you are talking about, but even today science does not know for sure the nature of light. Some theories consider light as electromagnetic waves, some as rays or particles (photons) or as abstract energy matter. Do you really think that some 3d software dudes came up with a program that can describe or model the actual behavior of light?

How many 'rays' does one light bulb (wire filament) emit? A thousand, a million, a billion, an infinity? How many rebounds (bounces) of light occur until the rays spend all their energy on heating the objects they come in contact with? How many of them will be distorted or scattered by the sub-subsurface properties of real materials?

How many 'rays' does a modern 3D renderer 'probe' the scene with? A few hundred, ok, let it be a few thousand (depending on settings). How many secondary bounces does it simulates? Two, three, maybe five (depending on settings).

Do you believe that 3D visualization can even come close to modeling the actual behavior of light? We do not even discuss the accuracy of these calculations.

There are many more such questions. But I think that's enough to understand that photorealistic 3D visualization is nothing more than a technique (software and hardware) for generating images that are just imitations of real photos, just look like real photos. It's just a visual forgery, fake. It have nothing to do with reality and even more so with the simulation of real light behavior. This is simply not possible.

Then any 3D software marketing material says something about 'simulation' or 'physical correctness', they just manipulate words. Nothing more. Hope, my explanation will not be treated as rude. I just wanted to convey the essence with vivid examples. Hope I succeeded!

nikko
Jul 27, 2013
thank you very much! im learning a lot from your tutorials, it helped me to better understand vray.
Manish
Nov 20, 2013
Thanks Anton and Max, I had no idea about Indirect Illumination before this article and after reading it, i exactly know what it is and how the rendering things works!.. Need more of such a tutorials from you people. Thanks!..
ashii
Jun 8, 2014
easy to understand and very helpful...thank u so much for these tutorials.
Olivié C
Jun 11, 2014
Hey guys, thank you very much for spending the time and goodwill involved in sharing such very useful information. Always thought that the GI multiplier of 'Primary bounce' and the GI multiplier of 'Secondary bounce' should be left by default because it is too fancy to understand and because I thought people at ChaosGroup knew best... Well, now I understand how to increase the contrast of my renders, which I especially lacked in interior visualizations! Thanks again!
Ewea
Jul 4, 2014
Guys, thank you so much for your help! I'm definitely looking forward to new articles from you guys. For me, you just raised the curtain that hides the GI in Vray before, giving me a clearer idea of ​​things. You've served info in very EASILY absorbable way. Thanks once more!
This discussion has been closed.