Global Illumination
In addition to lightmaps, UNIGINE has a static GI method — voxel-based global illumination. Essentially, it projects a precalculated 3D lightmap onto parts of surfaces into a box-shaped voxel volume. This approach uses spatial modulation, so UV coordinates are not required. Voxel GI is based on the use of multiple Voxel Probe sources, which opens up many possibilities. You can combine low-detail voxels with high-detail voxels (insets), you can turn them on and off one by one, mix them as you see fit in order to achieve the desired result. Voxel Probe is mainly applied in ambient lighting. When baked, Voxel Probe illuminates everything inside its volume with ambient light, providing a pretty good simulation of global illumination, including ambient occlusion, light bounces, and diffuse reflections. Of course, voxels will never be as realistic as lightmaps, nor can they provide the same density due to a number of factors, but voxel-based GI is suitable for any high-polygon and low-polygon geometry, does not require UV maps, and can be used for dynamic objects (which is clearly beyond lightmapping). The great thing is that these two techniques can be combined, and you can choose any of them depending on the requirements of a particular project (for example, lightmaps are the best option for high-quality lighting in a static scene, but if you need dynamics, you can just add voxels where needed).
Global Illumination is baked using the same Bake Lighting tool. Before baking, you need to pre-configure objects and lighting sources as we did for lightmaps: turn on Cast Global Illumination for static surfaces (turn it off for dynamic ones).
Select the Static mode for the sources to be baked, and enable the Emission Bake GI option for surfaces with emission.
Create and place one or more Voxel Probes in areas where illumination is relatively static (e.g. interiors, street buildings, immovable objects).
Set the general Voxel Probe settings, such as Box Size and Voxel Size, which define the resolution of the voxel grid and the video memory consumed.
Baking Process#
- Enable the Lightmap buffer (Rendering → Buffers → Lightmap).
- Open the Bake Lighting window.
-
Enable Bake Voxel Probes and adjust Voxel Size Multiplier, if necessary:
- Configure Baking Viewport Masks to select the light sources and surfaces that should be baked.
- Set the baking Quality: Draft is suitable for quick iterations, and Ultra provides the maximum quality.
- Adjust Far Clipping Distance for clipping the light rays.
- Set the number of light ray bounces (higher values will result in a brighter lighting).
-
Start baking process for all objects by clicking Bake All Lighting and wait for it to finish. Live preview of the process is available (the number of samples counted per frame can be adjusted during the baking process).
- The generated lightmaps are saved to the bake_lighting/voxel_probes folder and applied to the corresponding Voxel Probes.
- To improve the quality, you can also enable Lightmap Cubic Filtering in the material settings of the surfaces with the light map.
- The result can be checked by selecting the Indirect Lighting mode in the Rendering Debug menu.
Additive Blending#
More flexibility in lighting control is available with the Additive Blending mode. You can use it to blend lighting of several Voxel Probes together and control them separately (e.g. make a separate Voxel Probe for an indoor lamp and blend it with another Voxel Probe with lighting baked from the sky, having the ability to enable and disable them separately).