This is the documentation for Enlighten.

Baked lighting


What is lightmap baking?

The Enlighten lightmap baking interface allows you to bake out high-resolution lightmaps to replace lighting calculations during runtime with a single texture lookup. Baking can be mixed seamlessly with real-time lighting and/or real-time radiosity calculations. Baking is useful for scenes with many static lights, for example a night-time city scene with streetlights.

The baking output comprises three distinct components:

  • Direct lighting
  • Indirect lighting
  • Ambient occlusion (AO)

These three components are generally combined into a single lightmap using a compositor, in which the artist can configure the levels of the components.

Driving the baking

There are two ways of driving the baking API:

We recommend to use the High Level Build System unless you need complete control of the process.

Baking and UVs

Appropriate chart UVs must be supplied when baking a lightmap. The UVs need to be non-overlapping. The exception to this is when the packUVs baking parameter is used, in which case only the UVs in each chart need to be non-overlapping and the Enlighten packer will repack the charts in a lightmap to span the whole UV space of the lightmap.

Note that UVs generated using Automatic UV simplification are never used for baking. Baking requires lightmap charts that do not overlap in UV space, which is the exact opposite of simplified lightmap UVs. When baking using the HLBS tools, manually-authored UVs must be used as described above.

Baking of probes

Enlighten can bake the indirect lighting for manually placed probes. These output probe values can be retrieved using the IBakeOutputProbeSet class. In addition to the indirect lighting, Enlighten can also bake the direct light into probes. For the HLBS, the probe sets need to be assigned a light map type, which is only used for the quality settings.

Enlighten does not support baked direct lighting for automatically placed probes. These probes are placed with suitable resolution for indirect lighting, but the resolution is much too low for direct lighting.

Baked cubemaps

Enlighten's dynamic local reflection probes sacrifice quality for efficient runtime updates. When you use baked lighting, we recommend to render high resolution cubemaps using your own engine. Enlighten does not output baked lighting data for cubemaps. 

Baking in GeoRadiosity

Baking functionality is also integrated into the previewer tool GeoRadiosity. GeoRadiosity supports an efficient mixed baked and real-time radiosity and lighting workflow. The artist can interact with the lighting in real-time and then do a final bake when finished iterating on the lighting. This is the suggested workflow. For more information, see our GeoRadiosity tutorial.