This is the documentation for Enlighten.

Input lighting


Overview

To compute radiosity, the low level runtime API needs to know the amount of light incoming to surfaces in a radiosity system. This is known as input lighting.

Radiosity assumes that all bounces from surfaces are completely diffuse (this is what makes it "radiosity" rather than "full global illumination"). This means that when computing the input for Enlighten we can ignore complicated view-dependent shading (normal maps, specular highlights and so on).

We provide some general overview of how input lighting works in Enlighten in this section. More information about implementing input lighting is given in Input lighting concepts and Providing input lighting in the per-frame walkthrough. For API details, see the Input Lighting module section in the API reference documentation.

Input lighting information

Enlighten represents the input lighting in two ways:

  • Cluster lighting: The lighting at a set of discrete input sample points (dusters) for each system.
  • Environment lighting: light from the distant environment surrounding the scene, e.g. the sky lighting.

Input sample points for each system

One output of the Enlighten precompute is groups (aka "clusters") of input sample points (aka "dusters") for each radiosity system.

Dusters are sample points which lie on the surface of a mesh that is included in the radiosity computation. They are used in the runtime to sample lighting, shadows and albedo data. A cluster represents a local collection of dusters. It is used to calculate the incoming light reaching the surface. This calculation does not need to be done on a per duster basis, so performance is improved by using clusters.

At runtime, the data describing these dusters is assembled into an "input workspace" (see Input lighting concepts). The raw data for these sample points consists primarily of a position and a surface normal for each point.

Emissive environments

Each of the Enlighten tasks for generating lighting can also take an Emissive Environment object as input. An emissive environment is a block of data representing the distant emissive lighting in a scene, for instance from a sky box. It is represented as a cube map with each face having between 1 x 1 and 64 x 64 values. During the precompute, Enlighten computes accurate visibility information to this cube map; therefore, even with no other lighting input, a suitable emissive environment produces interesting lighting gradients in the output.

The SetEnvironmentLightValues function defines the InputLightingBuffer object that represents an emissive environment, and which is passed as input to the Enlighten solving functions.

For more information, see Providing input lighting. For API details, see the Emissive Environments module documentation.

In cases where the emissive environment is a major factor in the lighting setup, it can be sensible to choose a higher resolution, even if the environment itself doesn't require this resolution. In rare cases when using lower resolutions for an emissive environment, especially with axis aligned geometry, noise can be visible in the lighting from an emissive environment. A resolution of at least 8 x 8 per face eliminates the noise.