This page has been translated automatically.
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
FAQ
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and 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
Rendering-Related Classes
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Bake Lighting Tool

Bake Lighting is a tool for baking shadows and indirect lighting from light sources in static mode. It is used to:

  • Calculate static voxel lighting inside Voxel Probes and put it into generated 3D lighting maps.
  • Calculate reflection cubemaps for Environment Probes in static mode.
  • Calculate shadow maps for Omni and Projected light sources in static mode.

The Bake Lighting tool enables you to improve performance by dropping the most of light and shadow computations.

Notice
To open the Bake Lighting tool, choose Tools -> Bake Lighting in the Menu Bar.

Bake Lighting Tool

See Also#

Light Baking#

Light Baking 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 to significantly improve the realistic look of the scene.

The following comparison shows the use of different lighting in the scene containing two light sources: a red OmniLight and a WorldLight (with the Sun Shafts camera effect enabled). The left image contains the scene illuminated with direct light only, so that unlit areas look like silhouettes 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.


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.

Workflow#

In terms of UNIGINE, light baking is available if there is at least one voxel or non-dynamic environment probe in the scene. To get the lighting baked, perform the following steps:

  1. Prepare the scene: set up lighting and emissive geometry, choose the light baking mode, hide or exclude unnecessary and dynamic objects from calculations via masking and/or adjusting surface flags.
  2. Create and place voxel probes at the places where the lighting remains relatively static (e.g. interiors, outdoor buildings, and 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.
  3. Create non-dynamic environment probes and cover the areas which require appropriate reflections on reflective materials.
    Notice
    Disable the Grab by Bake Lighting parameter for probes, the cubemap texture of which should not be modified by the Bake Lighting tool. This is applicable for cases when you do not want to modify your assets and are going to generate new ones.
  4. Adjust the Baking Settings of probes and the settings of the Bake Lighting tool.
  5. Click Bake to begin light baking for all enabled light sources (or Bake selected lights to affect only selected light sources) and wait for the process to complete.

    At this stage, the Bake Lighting tool performs the following:

    Notice
    You can stop the process at any moment, the achieved result will be maintained.
  6. Enable post and camera effects.

Bake Lighting Settings#

Bake Lighting Settings

Number of Bounces Number of light ray bounces.
Voxel Size Multiplier Multiplier for the Voxel Size parameter for each voxel probe.
Voxels per Frame Number of voxels computed and visualized per single frame.
Notice
The parameter is available for changing during the baking process. Higher values cause longer user interface response but accelerate the calculations.

Progress Bars

Notice
The following progress bars are shown during the process of light baking.
Light Node Progress of light baking for the current light node at the moment.
Bounce Progress of calculating the current bounce.
Overall Overall progress of light baking for all light nodes in the scene.

Buttons#

Bake selected lights Starts baking for selected lights regardless of whether they are enabled or not.
Bake/Stop Starts baking for all enabled lights in the scene.

Modes of Light Sources#

Omni, Projected, and World light sources have the Mode parameter that defines their contribution to the light baking process and determines if shadows are to be baked.

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 mode. The light source is enabled.
    Dynamic mode. The light source is 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. This option can cause a lack of physical accuracy registered by the eye. Shadows for Omni, Proj, and World lights are baked.
    Static mode. The light source is enabled.
    Static mode. The light source is disabled.

Baking Shadows from Light Sources#

In addition to baking information about indirect lighting and reflections into voxel and environment probes, the Bake Lighting tool also bakes shadows into shadow map textures for Omni, Proj, and World light sources, if their light source mode is set to static.

If any light source is moved by the manipulator in the Editor or its shadow map resolution is changed, the shadow map is rebaked automatically.

Notice
If you manipulate objects in the scene or change shadow modes of their surfaces you'll have to rebake shadows manually by clicking the corresponding button.

The settings of the Bake Lighting tool do not affect baked shadow maps.

Last update: 2019-12-25
Build: ()