Tomasz Wyszołmirski of Dabarti Studio, is a beta tester for V-Ray for 3ds Max and has been testing a new option called Adaptive Lights which should be available in service pack 5 of V-Ray. He wrote a blog post about it on their site showing how much faster the Adaptive Lights option can be.
But what is Adaptive Light? While raytracing does provide us with the most compelling and realistic way to render the way light works, the algorithm presents us with many challenges. A common issue are scenes which have a lot of lights. When V-Ray 3.0 came out we introduced a simple way to deal with this called Probabilistic Lights. In the upcoming service pack 5 of V-Ray 3 we will introduce an improved method called Adaptive Lights.
To better understand this, let us break down all the different methods for evaluating light sources at any shading point.
This is the way we would deal with many lights prior to version 3. In this method, for every ray hit, we would evaluate every light source. In scenes with 5 or 10 lights, that is generally not a problem. But in scenes with 100s or 1000s of lights, this can drastically slow down your rendering.
In this method, for every ray hit we randomly pick a small fixed number of lights. The default is 16 lights, in our examples for illustrative purposes we will assume this number is 5. This drastically reduces the number of calculations for the shaded point. Since the next ray picks another 5 lights, and we generally fire millions of rays, on average all the lights tend to be accounted for. Generally speaking, this method can be faster compared to the old method which took into account every light at every ray hit. However one disadvantage is that it may introduce additional noise in the image and may need more samples to clean up. Additionally, some shading points may be taking into account lights that are not visible or don’t contribute illumination to that area.
This method builds on top of the probabilistic method but makes it smarter about the lights it selects for evaluation. It relies on the Light Cache pass. The Light Cache is generally used for Global Illumination, but it also gives V-Ray a good overview of what is actually happening in the scene. In the end, the result is such that instead of picking 5 random lights, we can pick 5 lights that are the most likely to affect the shaded point. This can help V-Ray achieve a cleaner solution faster.
To be clear, Probabilistic Lights was and may still be a more clever way to deal with a large number of lights in a raytraced render. In most of the cases where a large number of lights are used, it does very well. But by being a bit smarter about the selection of lights based on the Light Cache result, Adaptive Lights evaluation is generally better.
In the following example, we explore a large space with many dividers. We placed 168 lights in the scene. We compare Full, Probabilistic, and Adaptive light evaluation in 3 different conditions.
In the first test, we place the lights fairly low in the scene. Because of the walls in the scene, most of the lights have only an effect in the nearby area.
We then raise the lights at a mid height where they have a greater influence on the surrounding areas.
Lastly, we raise them to high enough that every light effects most of the scene.
All images are rendered to the same noise threshold so they have similar levels of noise. Here are the results of the test:
While the test is designed specifically to demonstrate the advantage of the newer Adaptive method, what it does show is that there are conditions where the Probabilistic method alone can in fact be a disadvantage due to the increased noise. At the same time, the Adaptive method consistently has good performance. Even in conditions where the Probabilistic method does well, the Adaptive method still improves the result and renders faster.
We urge you to visit Tomasz Wyszołmirski blog post for a look at his more comprehensive benchmark test of the Full vs Probabilistic vs Adaptive.