Adding global illumination
The global illumination (GI) is all the lighting that doesn't come directly by the sun or a light. It gives a more realistic aspect to the geometry by simulating indirect lighting. Ambient occlusion (AO) is another method to improve the realism. It darkens the geometry corners and narrow spaces where light should be low.
NDunes allows to compute GI and AO that are totally dynamic and change according to the position of the sun. There are two methods for computing these data: in what we call an external GI cache, or by vertex. The second one is lighter but requires that the geometry has suitable vertices.
There is a unique button to compute these in the geometry toolbar:
The GI and AO properties panel
Before generating GI and AO, some properties need to be set.
The first set of properties shows whether we use the GI/AO cache mode or the vertex GI/AO mode and the associated files locations.
Then we have a checkbox to set dynamic / static sun cache. In case of a static sun cache, a button resets the sun position where it was during the GI computation.
The following properties are several data related to the ground where the geometry is located. they allow to "anchor" the geometry in the landscape by adding ground data in the GI process: Ground color, Ground AO and Ground altitude.
Before generating a GI cache, it is mandatory to compute filtering positions. They are all the positions from which the indirect lighting is computed. The four buttons roles are:
- generating positions automatically base on the current camera position. The Filtering position spacing property is used to evaluate the distance between the samples;
- adding the current camera position as a filtering position;
- deleting all the filtering positions;
- viewing the filtering positions in the viewport containing the geometry.
Illumination can be slightly different whereas it is outdoor or indoor. This is why the filtering positions are split into two spaces. This is not mandatory to fill both properties.
Next are several properties ruling the cache calculation:
- Cache samples count: number of samples that'll be calculated. Increasing the value will make finer caches that take a longer time to be processed.
- Cache lights sampling rate: number of samples to be taken while sampling scene lights.
- Cache hemi sampling rate: square root of the actual number of samples taken to estimate the global illumination at a given location during the global illumination cache computation.
- Cache smoothness: influences the smoothness of the rendered indirect illumination. The bigger the smoothness count is, the smoother the result will be (meaning that small details will be lost).
- Estimator sampling rate: the squared root of the total number of rays that will be traced to compute the indirect illumination estimator (first GI pass). You can increase this value for a better estimator convergence but the default value will be good most of the time.
- Estimator smoothness: once built, the estimator is intensively used to get a rough approximation of the indirect lighting anywhere into the scene. To compute such an approximation, the estimator smoothes together up to "smoothness" values. Increasing that value will tend to get smoother (but also less reliable) estimations. Inversely, by decreasing that value, the user will get sharpen estimations.
When compute indoor GI cache, sky light portals can be specified to improve the lighting calculations. Portals are meshes that can be added in the source graph and that will cover all the doors and windows where the sky light may enter the geometry. The name (id) of such meshes can be set in the Skylight portals name property.
In the same way, splitter meshes may be used to separate the indoor from the outdoor when computing GI cache for both spaces. This is the Indoor/Outdoor splitter name property.
The Border shrink property is used when merging indoor and outdoor GI caches. Samples closer to walls and to occluding objects have their size shrinked using this value.
The Cache intensity multiplier allows to boost the indirect lighting intensity.
An option named GI samples spread can be found in the Settings panel of the current scene. It allows to globally set the radius of the GI cache samples.
Vertex GI and AO
The GI cache method can be quite long to compute and can consume a lot of memory. A lighter method can be used where GI and AO are stored in the vertices of the geometry. This require that the meshes are well modeled to handle this.
Defining a geometry | Decal linked to the geometry |