Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

LightmapGI

Inherits: VisualInstance3D < Node3D < Node < Object

Computes and stores baked lightmaps for fast global illumination.

Description

The LightmapGI node is used to compute and store baked lightmaps. Lightmaps are used to provide high-quality indirect lighting with very little light leaking. LightmapGI can also provide rough reflections using spherical harmonics if directional is enabled. Dynamic objects can receive indirect lighting thanks to light probes, which can be automatically placed by setting generate_probes_subdiv to a value other than GENERATE_PROBES_DISABLED. Additional lightmap probes can also be added by creating LightmapProbe nodes. The downside is that lightmaps are fully static and cannot be baked in an exported project. Baking a LightmapGI node is also slower compared to VoxelGI.

Procedural generation: Lightmap baking functionality is only available in the editor. This means LightmapGI is not suited to procedurally generated or user-built levels. For procedurally generated or user-built levels, use VoxelGI or SDFGI instead (see Environment.sdfgi_enabled).

Performance: LightmapGI provides the best possible run-time performance for global illumination. It is suitable for low-end hardware including integrated graphics and mobile devices.

Note: Due to how lightmaps work, most properties only have a visible effect once lightmaps are baked again.

Note: Lightmap baking on CSGShape3Ds and PrimitiveMeshes is not supported, as these cannot store UV2 data required for baking.

Note: If no custom lightmappers are installed, LightmapGI can only be baked when using the Vulkan backend (Forward+ or Mobile), not OpenGL.

Tutorials

Properties

float

bias

0.0005

float

bounce_indirect_energy

1.0

int

bounces

3

CameraAttributes

camera_attributes

float

denoiser_strength

0.1

bool

directional

false

Color

environment_custom_color

float

environment_custom_energy

Sky

environment_custom_sky

EnvironmentMode

environment_mode

1

GenerateProbes

generate_probes_subdiv

2

bool

interior

false

LightmapGIData

light_data

int

max_texture_size

16384

BakeQuality

quality

1

bool

use_denoiser

true

bool

use_texture_for_bounces

true


Enumerations

enum BakeQuality:

BakeQuality BAKE_QUALITY_LOW = 0

Low bake quality (fastest bake times). The quality of this preset can be adjusted by changing ProjectSettings.rendering/lightmapping/bake_quality/low_quality_ray_count and ProjectSettings.rendering/lightmapping/bake_quality/low_quality_probe_ray_count.

BakeQuality BAKE_QUALITY_MEDIUM = 1

Medium bake quality (fast bake times). The quality of this preset can be adjusted by changing ProjectSettings.rendering/lightmapping/bake_quality/medium_quality_ray_count and ProjectSettings.rendering/lightmapping/bake_quality/medium_quality_probe_ray_count.

BakeQuality BAKE_QUALITY_HIGH = 2

High bake quality (slow bake times). The quality of this preset can be adjusted by changing ProjectSettings.rendering/lightmapping/bake_quality/high_quality_ray_count and ProjectSettings.rendering/lightmapping/bake_quality/high_quality_probe_ray_count.

BakeQuality BAKE_QUALITY_ULTRA = 3

Highest bake quality (slowest bake times). The quality of this preset can be adjusted by changing ProjectSettings.rendering/lightmapping/bake_quality/ultra_quality_ray_count and ProjectSettings.rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count.