This is the documentation for Enlighten.

Indirect lighting resolution


As described in How Enlighten works, Enlighten:

  • computes radiosity by dividing the scene into chunks called clusters
  • samples diffuse indirect lighting from lightmaps and probes

The size of a cluster defines the radiosity resolution, while the size of a lightmap pixel and the spacing between probes define the output resolution. In practice, the two resolutions vary directly with a fixed ratio. Together, they define the indirect lighting resolution.

Radiosity resolutionOutput resolutionSampled lighting

Quality vs cost

The quality of indirect lighting depends on both the radiosity resolution and output resolution you choose for the scene. 

  • The effect of bright light reflected or emitted by a surface smaller than the radiosity resolution is lost.
  • Indirect shadow details smaller than the output resolution are lost.

As the lighting resolution increases, so does the number of clusters, lightmap pixels and probes required. This results in a longer precompute, larger Enlighten data and increased latency in the runtime lighting updates. To minimize cost without sacrificing lighting quality, make sure you choose the lighting resolution carefully.

Choosing resolution

The ideal lighting resolution is just enough to capture the important features, such as:

  • yellow light reflected from a brightly colored wall
  • the soft indirect shadow produced by a window frame occluding light from the sky

For a typical human-scale indoor scene, the following resolutions give a good balance between accuracy and cost:

  • Radiosity resolution: 2 meters
  • Output resolution: 1 meter

In a small scene such as a single house or street, it may be practical to use this resolution for the entire scene. In a larger world, it's necessary to limit the resolution in some areas to ensure a reasonable precompute time.

Open outdoor areas typically contain fewer occluding objects, so you can lower the resolution in these areas without a visible loss of quality. For areas of the world that aren't seen up close, the indirect lighting resolution should be significantly lower.

Enlighten is developed and tested with scenes using a ratio between radiosity and output resolution of around 2:1.

Controlling resolution

To make it easier to manage lighting resolution for scenes with many meshes, Enlighten workflows should provide presets such as high/medium/low quality, for which the radiosity and output resolution are defined centrally. You can save time by assigning a quality preset to a predefined group of meshes rather than each one separately. To provide full control, the artist should be able to override the output resolution for each mesh in the scene.

For static meshes lit using lightmaps, the output resolution determines the target lightmap pixel size. For static meshes lit using probes, the output resolution determines the minimum spacing for probes to be automatically placed around the mesh.

Enlighten can save the artist time by automatically placing probes to provide lighting for static meshes and other objects whose position is known in advance.

Probe sampling resolution

The accuracy of the lighting result depends on both the Enlighten output resolution and the way the shader samples from the Enlighten output.

For a mesh lit using lightmaps, a typical renderer samples the lightmap texture at each screen pixel. In this case the accuracy of the final lighting depends only on the resolution of the lightmap.

For a mesh lit using probes, the same renderer might sample from nearby probes only once, and use the same sample across the entire mesh. When the mesh is large, this can result in obviously incorrect lighting.

Enlighten provides ways to sample probe lighting either per pixel or per mesh. Each method has benefits and drawbacks.

Sampling per mesh

(tick)  One sample provides acceptable lighting accuracy for a small mesh

(tick)  Inexpensive when there are only a few meshes

(tick)  Light leaks caused by sampling from nearby probes behind a wall can be eliminated

(error)  Larger meshes require multiple samples for adequate lighting quality

(error)  Higher cost per sample can be a problem when there are many meshes or many samples per mesh

Sampling per pixel

(tick)  No limit to the number of meshes lit using probes

(tick)  Provides full lighting accuracy for meshes of any size

(error)  Slightly higher GPU cost per screen pixel using probes

(error)  More likely to suffer from light leaks caused by sampling from nearby probes behind a wall