GI Engines

Table Of Contents


Introduction

In real life, light photons originate from light sources, they bounce off a number of surfaces, have their colors modified by these surfaces and eventually reach our eyes. In computer graphics, Global Illumination (GI) attempts to simulate those photon bouncing interactions. This simulation adds realism to lighting and helps achieve more life-like images.

GI can have a profound effect even on extremely simple scenes, as shown below:


Without GI With GI. Notice the color bleeding.


Light that reaches object surfaces without any bounces is referred to as direct lighting. Once light has bounced off one or more surfaces it is referred to as indirect lighting. So what GI essentially computes is indirect lighting.

When a photon hits a rough surface, it gets scattered around randomly. This is called Diffuse Global Illumination. When a photon hits a strongly reflective or refractive surface (like mirror or glass), it tends to have a more predictable bounce direction. Because of this, photons bouncing off reflective/refractive surfaces tend to get 'clumped' together and form interesting lighting patterns. These patterns are called Caustics. Global Illumination, in general, refers to both of these effects: Diffuse GI and Caustics

The image shown above is lit using Diffuse GI, while the image below uses Caustics.


Caustics


Redshift treats Diffuse GI and Caustics separately.

Diffuse Global Illumination can be achieved with a combination of the following techniques:



Caustics, on the other hand, can only be achieved with

In Redshift, all of these techniques are called "GI Engines". Each GI Engine has its pros and cons. These are listed further down in this document.


Primary And Secondary GI Engines

Among the techniques mentioned above, photon mapping is the only one that works similar to how lighting works in real-life, i.e. it shoots photons from the lights. All the other techniques work the reverse way: they shoot rays out of the camera, bounce them around and eventually hit a light.

When these camera rays hit an object, the primary GI Engine is used. If GI requires multiple bounces, the secondary GI Engine is used for these bounces. The figures below show how this happens when you enable "brute force" for both primary and secondary GI engines.


Zero GI Bounces. Camera shoots a ray and hits wall (point "A"). The primary GI engine is used and shoots another ray of which is shown in red. This way, direct lighting on the floor (point "B") affects point "A".


One GI Bounce. The processing now goes a bit further. Point "B" uses the secondary GI engine to gather illumination from the sphere by shooting a single ray (shown in blue). This way, the direct lighting of the floor (point "B") and the sphere (point "C") affects point "A".


Shooting photons from the lights or shooting rays from our eyes are, in some ways, equivalent. If you flip the direction of all the arrows above it's as if lighting came from the light source, bounced off the sphere, floor, wall and then reached the camera!

So why have separate primary and secondary GI engines? The results of primary GI lighting are directly visible to the camera so needs to be as high-quality as possible. Secondary GI lighting, on the other hand, often represents a smallest part of the final lighting so it can afford to be of somewhat lower quality (think "blurrier" or "noisier") without introducing significant visual artifacts. Approximating secondary GI like that has significant performance and, sometimes, quality advantages!

Please note that the examples above only show what happens with "brute force". Other GI engines do different things for points A, B, C. These are described in more detail under each technique's documentation.


Main Global Illumination Settings



GI Engines and Number of Bounces

The starting point for enabling GI is selecting the primary and secondary GI Engines and specifying the number of GI bounces.

Introducing more GI bounces in your scene will often make your lighting brighter - and the rendering slower. It also tends to "wash out" the lighting a bit, too. For these reasons users sometimes choose to limit the number of bounces.

The scene shown below contains a few vertical tiles, one of which is lit with a strong spotlight. The biggest visual difference (for this particular scene) is between 0 and 1 GI bounces. Note that these images were rendered using Irradiance Caching for the primary GI engine and Irradiance Point Cloud for the secondary GI engine.


Zero GI Bounces. The right tiles are lit by the direct
lighting on the center illuminated tile.

One GI Bounce. The indirect lighting on the right tiles is
now bouncing off once and illuminating the left tiles. The
ground below the right tiles now also receives extra
illumination.

Two GI Bounces. The indirect lighting of the left tiles is
now affecting the ground below them. The effect is
definitely more subtle compared to the difference
between zero and one GI bounce.


Conserve Reflections Energy

Redshift does not currently support reflection ray sampling during Global Illumination calculation, which can lead to a loss of energy. Checking the 'Conserve Reflections Energy' option enables a cheap trick which adds the reflection energy that would be lost (i.e. the reflection color tint) to the diffuse color tint of materials during GI calculation. This gives the illusion of reflection ray bounces contributing to GI, which can be particularly noticeable with strong or colored material reflections.


After you've selected your primary and secondary GI engines and specified the number of GI bounces, you'll need to configure them. Please refer to the topics listed below for more information:

Photon Mapping

Brute Force

Irradiance Caching

Irradiance Point Cloud


Recommended Settings

Sometimes users are overwhelmed by the multitude of choices and ask for the best settings.

While different scenes will have different requirements, we've found that a good starting point is this:

As a rule of thumb, try to remember the following points regarding GI quality:


Pros and Cons of the Different Techniques

For more information of how the individual techniques work, please look at their respective pages


Photon Mapping

This technique works similarly to how light behaves in real life. In one stage, it shoots photons from light sources, bounces them around the scene and stores them on surfaces. Then, on a second stage, the renderer uses these photons to render the final image.

Pros

Cons


Brute-Force

Brute force works the opposite way to photon mapping. Instead of shooting photons from the light, it shoots a number of rays from each surface and bounces the rays around.

Pros

Cons


Irradiance Caching

Global Illumination often changes slowly over surfaces. This means that several pixels next to each other could 'share' the same value which, in turn, means that we don't need to compute a separate GI value for each pixel! Irradiance caching takes advantage of this fact and computes GI similar to Brute-Force but at sparse points around the image, which means that the computation takes much less time.

Pros

Cons


Irradiance Point Cloud

The Irradiance Point Cloud can only be used as a secondary GI engine. Its purpose is to provide faster and cleaner secondary lighting to the primary GI engine. You might have seen similar techniques on other renderers called "Importons", "Irradiance Particles" or "Light Cache". While Redshift's Irradiance Point Cloud works differently to these techniques, it serves the same purpose which is to improve the quality and efficiency of multiple-bounce GI.

Pros

Cons