Rationale for the Choice of GI Engines in V-Ray 1.5

Nov 16, 2020 Update
Illustration for Tutorial on advantages & drawbacks of GI engines in V-Ray. Explains how to deal with GI artifacts.

Introduction

Hello everyone!

This tutorial is a summary of the previous three tutorials on indirect illumination (GI) in V-Ray. Here you will find an explanation of why the choice was made in favor of Irradiance Map as Primary bounces and Light Cache as Secondary bounces GI Engine's. The actual choice has already been made in the section Practical GI Setup of the first tutorial on global illumination. So, if you are looking for specific setting values, you can skip this justification and look at the screenshot of the V-Ray:: Indirect illumination (GI) rollout setups there. But if you're wondering why one GI engine works best for the primary and another for the secondary diffuse reflection bounces simulation, with problems you may face with those engines, and how to solve them, welcome to read this tutorial further!

GI Engines Choice

Despite the variety of GI engines in V-Ray, the real choice is quite limited and mostly predefined. We have an outdated Photon map, accurate but noisy and very slow Brute force and what's left. So it is a "voluntary-coercive" choice, and we actually follow it.

But, let's get everything in order.

Photon map we immediately cut off for the reasons we described earlier. Obsolete, cannot generate GI from the environment, eager for memory, many artifacts. Don't use it, period.

The most versatile, capable of solving any problem, if you don't care about rendering time, it is, of course, the Brute Forceengine. However, the lack of built-in adaptability and the terrible usage of computing resources, as a consequence, simply do not leave the BF a chance to be the default solution. This is especially noticeable if you have a real commercial project and a real deadline. So to get the job done on time, you can't rely on BF, because with it you can easily break any realistic term. This is especially true for interior visualization, where visualization with BF can go on indefinitely.

Sometimes a tenfold increase in computation time with the same visual quality that can be achieved by smartly tuned adaptive engines is simply unacceptable in almost every sense. Only in very exceptional situations, when optimized engines simply do not cope with artifacts that are essentially related to their optimization, the use of "Brute force" may be reasonable.

And now our choice is simply narrowed down by the two remaining engines, the Irradiance map and Light cache.

Comparing IM with LC, based on what we already know from previous tutorials, it is easy to understand that the quality of GI maps obtained by IM is much higher than the quality of GI maps obtained with LC. This is mainly due to the determination of important details of the scene based on pre-passes and the high interpolation of IM samples. LC "cells", in turn, are poorly interpolated with each other. They also do not concentrate on detailed areas, but instead are evenly distributed on the geometry of the scene, not paying attention to detail at all. Thus, the GI produced by LC is coarser, and the pattern of its "cells" is quite obvious on a final rendering.

Of course, we can significantly increase the number of LC Sudivs to bombard a scene with myriads of GI "rays" in order to get a result comparable with IM. But, in this case, the computing time and resource that the LC consume will increase tremendously, and it will make no sense to use it instead of the exact BF.

Irradiance map algorithm is slightly slower, but generates a smoother GI compared to LC. The final rendering with IM comes out less disturbed, without visible noise in the GI component.

Another thing we also learned is that the first diffuse reflections or Primary bounces in the real world are the most energy-intensive. Subsequent reflected rays lose energy and, as a result, are less bright. That is, Secondary bounces have less effect on overall lighting, so they are less important. That's why V-Ray developers single out the first diffuse light rebound as "primary" among all, calling all the others "secondary", ie not very important.

Thus, a more accurate Irradiance map is more suitable as a Primary bounces GI engine. Plus, technically it can't be used as a secondary engine, remember? The Light cache is less accurate, but faster, and it is the only one left, so it naturally fits as the GI engine for Secondary bounces.

But that's not all, the real advantage of this couple is that the LC contains a flexible ray-tracing algorithm, and despite the fact that it is used as a secondary engine, it fires first, before IM. Upon receiving the ray tracing information, LC can share it with IM, so the IM can use it too. This way, the LC essentially can speeds up the calculation of the IM. The second huge advantage is that the LC provides a preview of much better quality than the IM. So, this connection works together, almost as a whole.

Complementarity and good speed with satisfactory quality are the reasons why we recommend this configuration of GI engines, as the default choice, suitable for most cases.

Common GI Issues

As you can guess, rendering time shortening by using an approximate computing GI engines comes at a price. Because IM + LC is a trade-off (compared to BF + BF), it has its drawbacks, or, say, visualization artifacts that we must be prepared to deal with.

Now that we have finished choosing the right V-Ray's GI engines, it is time to understand what problems we may get with our choice and how to solve them.

In general, global illumination has two major problems, or the two common types of artifacts. They are noise and "dirt". Dirt can also be called "smudges", "flakes" or "blotches", but these are all aliases of one type of thing - chaotic abnormal dark spots, especially densely concentrated on the small details of the scene.

Noise

The source of noise is quite trivial, it is the lack of GI samples. The HSph. subdivs: in Irradiance map and Subdivs in Brute Force and Light cache are responsible for this. Increasing the values ​​of these parameters will reduce the amount of noise on the GI maps and, consequently, on the final render.

Dirt

Black, gray, and even excessively bright spots are mainly caused by mixing the Irradiance map component, rendered at low resolution, with the final visualization of higher resolution.

Look at the image on a left. The problem is instantly noticeable. This is a fairly familiar picture for any professional 3D interior visualization artist. Especially clearly these artifacts appear in places where is no direct light and in highly-detailed scene areas, illuminated only by the indirect illumination. For example, they are often on the quaint white ceiling cornices, which are in deep recesses of the ceiling.

Lack of understanding of this problem nature, has led to appearing of extraordinary ways to fight it. The simplest of them is a blind rising up the HSph. subdivs: for IM, Subdivs for LC, changing units, sampling sizes, and just sky-high increase of Subdivs parameter for key light sources in the scene. More targeted was a significant overstatement of interpolation in order to blur the GI. However, the most convoluted methods consist in the following. The camera, intended for the final rendering was cloned and moved across the scene for have several frames of the object, which has the described artifacts. Further, using the scripts, which were actually made for other purposes, created one additional camera and its position was animated. This camera exactly repeated the position the primary and secondary cameras with each new animation frame. The result came out something like fly-through animation, in which the camera flied round the problem objects. Next, were rendered the primary and secondary GI bounces maps for each frame of animation, and simultaneously merged into two maps that are general for each type of bounces. Thus, more detailed and dense GI maps were obtained. After that, these maps were used for the calculation of the only final frame from the first original camera view.

Of course, such specific approaches may eliminate in some sense the problems with the GI, but they are just boring in their implementation and they take the lion's share of the scene setup time, while being inelegant and hasty solutions. It makes no sense to bore ourselves with agonizing adjustment and experimentation for each new scene, achieving a desired result. Understanding the essence of the problem, it is very elementary to fix such problems at similar or even lower computing time cost.

To realize the nature of the problem, we should return to the principle of IM. In particular, to its way of probing the geometry of the scene at lower resolutions. In most cases, as well as in the universal starting V-Ray configuration, undersampling is used even in the final IM prepass. That is, the color samples of IM are taken from a much lower resolution than the final one. After that, they are interpolated to the desired resolution, while also filling not sampled areas. In the example above, both images were rendered at a resolution of 400 by 500 pixels. The left image was calculated with the value of Max rate: equal to -4. This means that the final prepass of IM was made in 400 by 500 resolution, divided by 2, divided by 2, divided by 2 and again divided by 2. That is, in the resolution of 25 by 31 pixels.

Here is the same render, calculated in 25x31 pixels and then interpolated in Photoshop up to 400x500 pixels.

Gray rectangle to the left is not interpolated render in the resolution of 25x31 pixels. Even with very high values of the interpolation and information about the geometry of the scene, get the small details from such low resolution is simply unrealistic. If two or even three white partitions of our grid at a resolution of 25x31, are marked with one black pixel, and the dark spaces between them all, for example, with one white, then no matter how we interpolate these pixels, after the interpolation they any way will look like blurry smudges. These spots produce those mentioned flakes on the fine details of the scene.

Now you surely understand that to obtain detailed IM and get rid of the stains in the corners, we need to increase the resolution of the last IM prepass. This was done in the previous example in the image on the right. IM was calculated with Max rate: equal to 0, i.e., on the final rendering resolution. The right example has no visible artifacts as well it has much more clearly visible shadows, which not blurred by low-resolution irradiance map interpolation.

If there are such artifacts in any part of the scene, most likely, there is no need to re-render the entire frame using more detailed IM. This will unreasonably take many extra hours of computation, giving essentially the same result in all areas where there are no problems. In order not to waste computing resources, it makes sense to use Region render and re-render only those parts of the image whose quality is not good enough.

Conclusion

We hope that we have finally put an end to the question of choosing suitable GI engines in V-Ray, as well as gained knowledge on how to deal with noise and dirt on the render.

We wish you a fast and realistic 3D renderings without artifacts!

See you in the next chapters of this tutorials series!

Comments
Joc
Feb 20, 2011
Again, simple and clear. 3 thumbs up!

It's obvious that in any CG image, illumination is the "unf" factor that brings one's work to life. As a humble CG artist (since the days of 3D Studio - anyone still remebers it?), I must say that I learned a lot, in terms of understanding how vray does the job and how to make my workflow more efficient.

Those 4 tutorials are simply and plainly excellently written and are must to read.

What would be my wish? I think the next step in the creation process would be the DMC and all the implications and correlations it has on materials, light, final quality, etc..

Anyway, thanks for sharing your knowledge and making me a smarter man. Cheers till next time.

Joc

RenderStuff
Feb 20, 2011
Hi Jock,

The following tutorials will be on the 'Settings' tab. Of course, the DMC sampler as the main quality / speed control as well as the known problem of RAM overflow will also be explained. But writing will take some time.

We are sincerely glad that our explanation was clear enough to help you improve your skills.

Thank you for your interest!

Maksvel
Feb 20, 2011
Cool, all in great detail! I understand that in the next tutorial we will focus on settings tab, and then there will be lessons on VRayMtl and VRayLight? Another thing I would like to learn is the specifics of animation rendering.
RenderStuff
Feb 20, 2011
Hi, Maksvel.

We heard you. Of course, we will do our best on all subjects you mentioned, but you need to be patient, because we also do a real work for our clients and write these lessons only in our free time.

Rookie
Feb 20, 2011
I read all of the lessons, all very nice and clear, but in practice it does not turn out the way you say in your tutorials. I had a following problem.In those 'unimportant' areas of irradiance map, I don't have a `dirt` you mentioned, but a little noise. I tried everything. I tried to increase the number of subdivs, tried to render IM at higher resolution passes, but it did not help. The scene is very simple, like yours. In any case, I liked your articles in general, it is immediately obvious that you are well versed in the subject, I count on your help!
Hudruk
Feb 20, 2011
Thanks again, everything is clear, it remains only to try and experiment.
RenderStuff
Feb 20, 2011
Hey Rookie, It can be anything, why are you so sure there is a GI problem? Noise may be due to materials or shadows quality. But before that, try to copy all the settings, as we showed in all previous tutorials. Also increase the number of subdivs for all lights (shadows) and materials in a scene to eliminate factors other than the GI engine itself.
xt13r
Feb 21, 2011
Thanks for a such full and exhaustively tutors! i'm looking forward for the next tutor)
Singlebit
Feb 22, 2011
The best tutorials on vray in the Internet! Thank you very much! I will recommend them to friends.
Ivan
Feb 23, 2011
Hello, RenderStuff! Very informative tutorials, thank you very much for them. I noticed that in your tutorials you always emphasize on universality of Vray settings, but is this settings are greate for the final rendering?Respect!
RenderStuff
Feb 24, 2011
Hello, Ivan. You've correctly noticed, these are universal settings, but as a default starting point. Not as a settings for absolutely any occasion. Regarding the final rendering settings, the best advice, apart from using these settings and dealing with the problem only when you see it, is to perform the final rendering in the highest possible resolution.
Ivan
Feb 24, 2011
Thanks for the repl. Looking forward to your following publications.
Bob
Mar 8, 2011
Just great!
Alex
Mar 24, 2011
Good time of day, RenderStuff. I have the following question: everything is done according to your tutorials, and before the final image rendering there is some additional unexpected prerass is happened. When I rrender objects separately, everything happens as expected, but when I render a whole scene, this prepass will reappears. Thanks in advance! Your tutorials are great, look forward to the next one!
RenderStuff
Mar 24, 2011
This usually happens because VRayMtl materials can use IM to calculate glossy effects. One of the materials may have the 'Use interpolation' property enabled. The 'Reflect interpolation' and 'Refract interpolation' rollouts have the settings you need. Reducing the number of passes there or simply not using interpolation in materials, and the additional pass caused by the material will not be repeated again.
Alex
Mar 24, 2011
Thank you very much for the answer.
Provisuals
Mar 28, 2011
What an excellent set of tutorials. It helped me to understand the Vray Parameters a lot better and without being intimidated by them. Looking forward to your next Tutorial. Thanks
Andrey
Aug 8, 2011
Many thanks ! It exhaustively explained
Marcos de Oliveira
May 11, 2012
How can I avoid artifacts in animated objects using VRay? Even rendering frame-by-frame, the objects changes it colors, causing a strange effect. Please help, thanks.
Konstantin
Feb 11, 2018
Still relevant in 2018, it helps me a lot, thank you!
This discussion has been closed.