skip to content

What does an irradiance light probe store, and how does a moving character use nearby probes to pick up bounced light?

level: juniorimportance: should knowfreq 45%

answer

  1. movers have no lightmap of their own
  2. low-order spherical harmonics
  3. cosine lobe smooths diffuse light
  4. blend the surrounding probes
  5. evaluate at the surface normal

basics

~20 s

An irradiance light probe stores incoming light at one point from all directions, compressed into a few spherical-harmonic coefficients per colour. A moving object blends nearby probes and evaluates the blend at each surface normal for diffuse bounced light.

solid answer

~50 s

Lightmaps only cover static surfaces that have their own texture space, so anything that moves needs another source of indirect light. A **light probe** is a point in the level where incoming radiance was captured over the whole sphere and projected onto low-order **spherical harmonics (SH)**: keeping bands 0 and 1 gives 4 coefficients per colour channel, keeping bands 0 to 2 gives 9, so 27 numbers for RGB. Diffuse shading integrates radiance against a cosine lobe, which removes fine detail, so those few coefficients reproduce irradiance closely. At run time the character finds the probes around it, the 8 corners of its grid cell (trilinear weights) or the 4 corners of a tetrahedron (barycentric weights), blends their coefficients, and each pixel evaluates the blend at its normal. Probes carry low-frequency light only: no sharp shadows and no mirror reflections.

go deeper

for a junior

Recall what a light probe is for: bounced light for objects that move, stored at points in space and read back by blending the nearest probes at the surface normal.

for a middle

Explain spherical harmonics as a cheap low-frequency encoding: 4 or 9 coefficients per channel, why the cosine lobe makes that enough, and how grid and tetrahedral lookups weight neighbours.

for a senior

Show production judgment: per-object versus per-pixel sampling, ringing from bright sources, probe density against memory, and how probe light meets lightmapped surfaces without a visible seam.

for a principal

Frame probes as one layer of the indirect-light plan: what they can and cannot carry, what memory and authoring they cost, and which other layer covers reflections and fine detail.

## Why moving objects need light probes In a raster frame, **indirect light**, meaning light that has bounced off at least one surface before reaching the one being shaded, is expensive to compute per pixel. For static geometry a common answer is to precompute it into lightmaps, textures laid over each static surface. A character, a swinging door or a dropped crate has no lightmap of its own: it moves, and the light it should receive depends on where it is. A **light probe** fills that gap. It is a sample point placed in the level where the incoming light was measured over the whole sphere of directions, so any object near that point can ask how much bounced light arrives there from each direction. In the scenario, a character walks from a sunlit courtyard into a dim timber hall lit only by bounced light. It should darken and pick up the warm tint of light bouncing off wooden walls. Probes placed through the hall carry that tint; as the character moves, it blends the probes around it and its shading changes smoothly. ## What a probe stores A full environment image per probe would cost far too much memory for thousands of probes. An **irradiance** probe only needs what a diffuse surface sees, and that is very smooth: a diffuse surface integrates incoming radiance against a cosine lobe around its normal, which filters out fine detail. So probes store the incoming radiance projected onto low-order **spherical harmonics (SH)**, basis functions on the sphere ordered by frequency, much like a Fourier series for directions. | Bands kept | Coefficients per channel | Numbers for RGB | What it captures | |---|---|---|---| | band 0 only | 1 | 3 | average light, no direction | | bands 0-1 ("L1") | 4 | 12 | average plus one dominant direction | | bands 0-2 ("L2") | 9 | 27 | average, direction and a broader shape, such as a bright window and a bright floor | Band `l` adds `2l + 1` coefficients, which is why the totals run 1, 4, 9. ## Projecting and evaluating irradiance 1. **Capture**: gather the incoming radiance around the probe position, for example into a small cube map. 2. **Project**: for each basis function `Y_lm`, sum the radiance from every direction times `Y_lm` of that direction times the solid angle it covers. The sums are the coefficients `L_lm`. 3. **Store**: keep the 4 or 9 coefficients per colour channel, often at half precision. 4. **Evaluate**: irradiance for a normal `n` is `E(n) = sum over l, m of A_l * L_lm * Y_lm(n)`, with cosine-lobe factors `A_0 = pi`, `A_1 = 2*pi/3` and `A_2 = pi/4`. A Lambertian surface then reflects `albedo / pi * E(n)`. Evaluation is a few dozen multiply-adds per pixel, which is why probes are cheap enough to sample everywhere. ## Finding the probes around a point - **Regular grid**: probes sit at the corners of uniform cells. A point finds its cell, takes the 8 corner probes and blends them with **trilinear** weights. Lookup is a simple index and the data maps naturally onto a 3D texture, but probes land wherever the grid falls, including inside walls. - **Tetrahedral placement**: probes are placed where the light changes and a tetrahedral mesh is built over them. A point finds the tetrahedron containing it, often by walking from the one it used last frame, and blends its 4 probes with **barycentric** weights. Density follows the lighting, but the lookup is a search rather than an index. - **Blending coefficients is valid** because projection onto SH is linear: blending the coefficients and evaluating once equals evaluating each probe and blending the results. - **Per-object or per-pixel**: many renderers sample once per object at its bounds centre, which is cheap but lights a long object with one value; sampling per pixel from a volume texture costs more and removes that compromise. ## What probes cannot do - They hold **low-frequency** light only; a sharp shadow edge or a bright slit of light is smoothed away. - They are **not reflections**: polished surfaces need reflection probes or screen-space reflections. - **Ringing**: a very bright, small source projected into L2 can produce negative lobes that darken the opposite side; windowing the coefficients trades a little sharpness for removing it. - Interpolation ignores walls, so probes on the wrong side of a thin wall can **leak** light; that is a placement and weighting problem of its own. ## Memory, as the scenario's example For a grid of 64 x 32 x 64 probes (131,072 probes) storing L2 RGB at 2 bytes per number, the cost is 131,072 x 27 x 2 = 7,077,888 bytes, about 6.75 MiB. L1 cuts that to 12 numbers per probe, about 3 MiB, at the cost of shape.

  • Why is L2 often chosen over L1 for irradiance probes, and when is L1 enough?
    L1 keeps an average plus one dominant direction, which suits light that mostly comes from one side. L2's five extra coefficients per channel capture broader shapes, such as a bright floor and a bright window at once, and the cosine lobe's response is small above band 2, so higher bands add little to irradiance. L1 is enough when memory or bandwidth is tight and the lighting is simple: 12 numbers per probe instead of 27.
  • Why can probes be blended by blending their spherical-harmonic coefficients directly?
    Projection onto spherical harmonics is linear: the coefficients of a weighted sum of two lighting environments are the same weighted sum of their coefficients, and evaluation at a normal is linear too. Blending coefficients and evaluating once therefore gives the same irradiance as evaluating every probe and blending the results, with one evaluation per pixel instead of one per probe.

  • Each irradiance probe stores a full cube map for diffuse lighting.
  • Keeping bands 0 to 2 needs 27 coefficients per colour channel.
  • Light probes give characters sharp shadows from bounced light.
  • Irradiance probes also handle mirror reflections on polished floors.
  • Probes must be evaluated one by one because coefficients cannot be blended.