shown in other instead.
Global Illumination (GI) is a set of techniques intended to simulate realistic light propagation in a virtual environment.
The left image shows the scene illuminated with direct light only, so that we see only silhouettes of unlit objects and a large number of details is hidden in the darkness.
The right image shows the scene with both direct and indirect light, which makes it look way more realistic and consistent.
UNIGINE provides both realtime and precomputed solutions for GI simulation.
Static Global Illumination is mainly applicable to static unchanging environments and implies baking of lighting in order to drop expensive calculations and keep the performance high.
The computation of indirect lighting is a very expensive task for the processing unit, so it is usually performed once at the development stage (lighting is baked) and the results are used later for static lighting at run time.
Baking of lighting is the way of precomputing and storing data that describes how light rays bounce around static geometry causing indirect lighting. Adding indirect lighting to modelling helps significantly improve the realistic look of the scene.
The following approaches are available:
You can combine these techniques to achieve the best results.
Having configured the light sources and objects, you can start light baking by pressing the corresponding button on the top toolbar. Click the gear icon to open the Bake Lighting window.
The Bake Lighting window provides the interface to light baking settings in UnigineEditor.
Modes of Light Sources#
The following modes are available:
Dynamic. The light source provides direct realtime lighting only. It is considered disabled while light baking is being calculated, that is why the scene remains unlit when the light is turned off after light baking. No shadows are baked.
Dynamic light source enabled. No GI is baked.Dynamic light source disabled.
Static. The light source contributes to light baking and remains enabled all the time providing direct realtime lighting while the indirect light is being baked. When lighting is baked, such light sources are not to be moved and modified. Changing them can make lighting inconsistent and require re-baking. Shadows for Omni, Proj, and World lights are baked.
Static light source enabled.Static light source disabled. Indirect light is baked into a Voxel Probe.
Use the Lighting Mode parameter to define how a surface contributes to lighting. The following modes are available:
The Static mode is optimized for use in static global illumination, reflections and shadows.
Surfaces in the Static lighting mode block and reflect light when baking lighting to Voxel Probes and lightmaps, visible for static reflections provided by Environment Probes and cast cached shadows, lightmapping is available for them. This option is best suitable for immovable objects of static environment.
The Dynamic mode excludes the surface from use in static lighting and is suitable for dynamic shadows. Use this option for dynamic objects.
- The Advanced mode enables manual adjustment of all lighting-related settings:
Combining Lightmaps with Probes#
Voxel probes and lightmaps serve for the same purpose — static baked global illumination. Each technique has its pros and cons:
- Lightmaps provide the best available lighting quality and applicable only to static meshes.
- The quality of lighting provided by voxel probes highly depends on the voxel size, higher values require much more video memory. However, a voxel probe has internal volume baked and enables to shade dynamic objects within its bounds.
Voxel and environment probes do not affect lightmapped surfaces, therefore you can freely combine global illumination provided by these techniques.
For scenes that have moving light sources and changing environment, baking of lighting is inappropriate. The following realtime approaches of GI simulation are provided in UNIGINE:
- Ambient lighting from dynamic environment probes.
- The SSRTGI (Screen-Space Ray-Traced Global Illumination) technology is a set of screen-space ray tracing techniques for GI simulation with the real-time performance level. It incorporates Screen-Space Ambient Occlusion, Screen-Space Global Illumination and Bent Normals features. The technology doesn't require light baking, so every object and light source can be freely moved.