UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes

Voxel-Based GI

Voxel-Based Global Illumination is a static GI technique projecting a precalculated 3D lighting map into a box-shaped voxel volume. This approach uses spatial modulation, that is why there is no need in UV coordinates.

Voxel-based GI is provided by voxel probes.

Light baking is performed using the Bake Lighting Tool.

See Also#

Ambient Lighting#

The primary application of voxel probes is ambient lighting. When baked, a voxel probe illuminates everything within its volume with ambient lighting providing a decent simulation of global illumination including ambient occlusion, light bounces and diffuse interreflections.

In the case the scene contains dynamic objects, the Bake Internal Volume feature is highly useful for shading them. If there is no moving objects, it is resonable to set this option to Off.

Workflow#

To bake global illumination into a voxel probe, some preparations are needed.

Preparing The Content#

For a surface to contribute to static GI baking, it must have the Cast Global Illumination option enabled. It must be turned off for dynamic surfaces.

Notice
Lightmapped surfaces are not shaded by voxel probes.

Set up light sources in the scene:

  • For light sources that should contribute to global illumination, select the Static mode. Dynamic lights will be ignored. Only indirect lighting from lights is baked, so light sources are to be kept enabled to provide direct lighting and specular highlights.
  • For emissive surfaces (having Emission state in the material parameters enabled) also enable the Emission Bake GI option. Both direct and indirect (bounced) lighting from emissive materials is baked.

Creating Voxel Probes#

  1. Create and place one or several voxel probes at the places where the lighting remains relatively static (e.g. interiors, outdoor buldings, immovable objects).

    Notice
    Place voxel probes inside other voxel probes to create insets defining the areas that require higher detail. Note that voxel probes with the additive blending mode enabled cannot be used for this purpose, as they are blended instead of replacing each other.
  2. Set the Common Settings of probes, such as the Box Size and the Voxel Size. By configuring these parameters you define the resolution of the voxel grid and the video memory consumed by the probe.
    Warning
    Do not use the Scale transform parameter to change the probe size as it causes visual artifacts.
  3. Adjust the Baking Settings of probes.

Baking#

  1. Open the Bake Lighting window.
  2. Enable Bake Voxel Probes. Adjust the Voxel Size Multiplier, if needed.
  3. Adjust the Common settings:
    • Select the number of light ray bounces. Higher values will result in a brighter lighting since each voxel receives more photons.
    • Set the number of samples (voxels) calculated per frame. This parameter is available for adjustment during baking process.
  4. Start baking process by clicking Bake All and wait for it to finish. Live preview is available. Several iterations (one per bounce) will be simulated for each voxel probe.

    Notice
    You can stop the process at any moment by using the Stop button and you will be prompted if you want to keep the achieved result or restore the previous textures.
  5. Upon completion, generated lightmaps will be saved in the bake_lighting/voxel_probes folder and assigned to the corresponding voxel probes.

You can check the result by selecting the Indirect Lighting mode in the Rendering Debug.

If you are not satisfied with results on certain objects, you can select surfaces and/or nodes and perform partial re-bake using different settings by clicking Bake Selected.

Additional Features#

Diffuse Reflections#

As each voxel of a voxel probe stores light data, a voxel probe is capable of providing diffuse (blurred) reflections at every spatial point withing its volume provided Bake Internal Volume was enabled for baking. Control reflections by adjusting the Reflections Parameters.

Diffuse reflections provided by a voxel probe.

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 emissive light source and blend it with another voxel probe with lighting baked from the sky, having the ability to enable and disable them separately).

Additive blending of two voxel probes.

Using Sun Color#

A voxel probe is subject to multiplication by the sun light color if the Use Sun Color option is enabled for it.

Reflective Caustics#

Caustics calculation is available for voxel probes.

Last update: 2020-10-13