Hello everyone, today we present you the first part of "the tech behind Wolcen". A series of articles presenting the technical syde of the game.
Today's subject is Sparse Voxel Octree Total Illumination. It is the name of Crytek's system to simulate global illumination.So what's that, and what does it do?
First we need to explain what Global Illumination (GI) is.
Gi is also known as Indirect illumination. Basically, in computer graphics, GI simulates the bounces of the light on or through surfaces. In real life, light bounces around any surface an infinite number of time until it lost its energy. Light will be (almost) perfectly reflected on a mirror, it will disperse on a matte surface and takes its color, or pass through transparent surfaces.
On raytraced renderers, used to create special effects in movies by example, the GI is calculated by sending millions or billions of rays around the scene. This technique is very realistic but also very expensive in computer time (could be several hours for one frame). In video games, we need a maximum of frames per second, so we need to approximate all those calculations, using different methods.
Sparse Voxel Octree
An SVO is basically a simplication of the scene using cubes (voxels), arranged in a very efficient way. Every voxel stores color and opacity information.
Our indirect lighting process will operates in this simplificated scene, using raymarching and raytracing, and then be applied in the final rendered scene.
In real time, different techniques are possible to do Global Illumination. The most common is to bake it into a lightmap texture. This will allow a precise and high quality GI, but static. In Wolcen, who feature a time of day cycle and an open world, this was not possible. Luckily, the guys at Crytek worked on this amazing feature, that is fully dynamic, and extremely efficient.
In this screenshot comparison (on/off), we can clearly see the bounce of the sun light. From the floor to the walls and barrels, through the vegetation etc. The light is subtly coloring the scene.
In this example, we use only ambient light. The trees are nicely creating shadows, on their own foliage, and under them. This soft occlusion brings more depth to the scene, and more realism.
Here the temple is in the shadows, but the sun bounce is softly lighting it from the right. We can also see the light scattering through the foliage.
Another example of the light scattering through foliage. This give a better understanding of the environment, as the image looks less "flat".
In this temple, we can observe the shadows created in the windows, and the colored orange light bouncing around, creating a better directionnal lighting.
As a lighting artist, I think SVOTI is absolutely awesome. It works in every situation, brings subtleties and realism, is easy to setup and is very efficient.
For the moment, the feature is disabled by default, but you can activate it in the Advanced Graphics settings > Global Illumination quality.Medium will activate the occlusion only, while high and very high will bring the sun bounce.
The performance depends on the hardware, but we observed a 3-5% impact on medium settings, and about 6-8% in high settings.
This was an overview of the feature and its possibilities. If you have questions, don't hesitate.
Let us know if this kind of article interests you, if yes, we will do more ;)
Simon
If you want to know more about GI and SVOGI, here some few (technical) links:
GI Wikipedia page
Official Crytek documentation about SVOTI
Here is two free demos I did at the time to experience the feature:
Baron Haussmann demo
Sponza demo
And very technical links:
A great blog post about a similar technology
A research publication about a similar technology (PDF)
Cyril Crassin presenting his research about a similar technology (Nvidia, PDF)
Images used in the article
