With global illumination, each light path needs a certain amount of bounces to connect the light source to the camera. Some may require just two bounces, some may require thousands or even more. But most of the time, 99% of the energy has been distributed by the 'average bounces' paths, so the engine is spending countless CPU and GPU cycles to distribute an infinitely small and unnoticeable amount of energy in long paths.
That's why in Arion you have the ability to 'crop' paths by defining a limited number of global illumination bounces. In Arion v2.5.0 and up, you can do this on a per-feature basis which allows for very fine tuning of the quality vs. speed ratio. Sometimes the render time gain is so important and the visual impact is so negligible, that knowing how to use these features properly is of a crucial importance to deliver your projects in time.
For this case study, a nice kitchen scene kindly provided by Roman Vrbovsky will be our perfect test subject, as it features a bit of every kind of surface available in Arion (Specular, glossy, diffuse, refraction and scattering).
The Iowa kitchen with full global illumination. 4096 passes - 603 seconds
This render is using the maximum (512) GI bounces for every component, which ends up taking about 603 seconds to reach 4096 passes. The render is still a bit noisy but that is not relevant, what we're working on here is to cut down the render-time for the same number of passes.
The next step is to tune down all the GI bounces crops to their minimum value (1):
The Iowa kitchen rendered with just one (1) GI bounce for everything. 4096 passes - 192 seconds.
The render time is much lower (more than 3 times faster to reach 4096 passes) but we have lost many subtle details and fully lost the transparency of dielectric materials such as glasses.
The next step in this optimization is to activate the Exit color checkboxes one by one. The default flashy green color is what the engine will return when the bounce limit has been reached. It can be used to determine if the render is missing a lot of bounces to reach proper global illumination, or just a few. For example, with the Specular bounces limit and its corresponding Exit color, it's very evident the render is missing a lot of light as most of the render turns out green:
The Specular component with just one (1) GI bounce and a green Exit color.
This is obviously wrong as too much light has been killed by the bounces limit and replaced by the Exit color. But this information is very useful, by slowly raising the bounces limit for every component until the green color is visible but very fade or concentrated in corners, the acceptable amount of GI bounces to render an image that is almost identical to the original but faster can be found very easily. In the following chart are depicted each component with the chosen bounces limit:
Comparison between a too low number of bounces and an acceptable number of bounces.
This comparison chart should give you a good pointer in how to control your bounces limits in a reasonable range to keep the main features and cropping only the very little light that costs much bounces and adds very little to the final image.
And here is the comparison between a full global illumination render and a carefully set bounces limit on every component (no exit colors were used at this point):
A comparison between a full global illumination render and a finite sampling render.
The full GI render took 604 seconds, the finite sampling render took 388 seconds.
As you can see the results are very similar, and if there was nothing to compare the finite sampling render to, it could perfectly be considered totally correct. But we can improve the finite sampling render, at absolutely no cost in term of render time by using appropriately the Exit color parameters.
By compensating the loss of light induced by the cropping of GI bounces with an Exit color, we can artificially recover a render that is very close to the original. This is of course not physically-correct, but it's definitely a valid option to reduce your render-time and yet preserving a very high quality render. In the comparison below is shown the full global illumination render and a finite sampling render with Exit color:
By compensating the finite sampling slight darkening with a proper Exit color,
we recover a render very close to the original without any extra speed hit over raw finit sampling.
For this particular render, the Exit colors used were very simple:
|Component||Exit color (RGB)|
|Scattering||Local to the peppers materials,|
similar shade of red and green
used for the diffuse color with a value of 32
Exit colors can be specified globally for every component, excepts for the the Scattering that can be defined locally:
|Scattering||Global and/or local|
When the scattering exit color is set locally in the material's root, it will override the global exit color in engine's properties. If the scattering color is set globally and locally, the global exit color will apply to every sub-surface scattering material, except those with a local exit color set.
The following image has been rendered for 5000 passes and took 2416 seconds, using full global illumination:
The frog with full global illumination and sub-surface scattering rendered for 5000 passes (2412 seconds)
This render is very nice but took quite a lot of time, mostly because of the high level of bounces reached inside the SSS medium. The problem with Sub-surface scattering is that when using a low number of bounces, the render time is dramatically cut but unfortunately the image quality is also seriously damaged, as shown in this 4 bounces render that reached 5000 passes in 616 seconds:
The frog with only 4 scattering bounces rendered for 5000 passes in just 616 seconds.
The render time has indeed been immensely improved, but the image quality is very far from the original. That is simply because after 4 bounces have happened inside the object, the engine will kill the path and return the color black, which explains the darkening and lack of vivid color coming from inside the medium.
Fortunately, it's possible to restore a quality that is very close to the full global illumination image and keep that great render time without adding a single second to it. And since dielectrics and SSS materials are very likely to be several in a scene and need a different exit color for each, Arion provides an exit color parameter that is local to the material, available from the material's root settings. For the next image, an exit color using the RGB values 80-13-0 was used to mimic the full global illumination render:
The frog with only 4 scattering bounces and a custom exit color, rendered for 5000 passes is just 616 seconds.
This rendering is so close to the original that it was used for a blind test on RandomControl's Facebook page. But yet, it has the exact same render time as the 4 bounces one, which is a nice 4 times faster.
Bounces limits and exit color can be used to dramatically improve your render times when using dielectric and sub-surface scattering materials, sometimes by several orders of magnitude. We encourage you to learn to use these features and render complex materials in Arion, faster than ever!