Link Search Menu Expand Document

Environment Light Importance Sampling

A pixel with coordinate subtends an area on the unit sphere (where and the angles subtended by each pixel – as determined by the resolution of the texture). Thus, the flux through a pixel is proportional to . (We only care about the relative flux through each pixel to create a distribution.)

Summing the fluxes for all pixels, then normalizing the values so that they sum to one, yields a discrete probability distribution for picking a pixel based on flux through its corresponding solid angle on the sphere.

The question is now how to sample from this 2D discrete probability distribution. We recommend the following process which reduces the problem to drawing samples from two 1D distributions, each time using the inversion method discussed in class:

  • Given the probability distribution for all pixels, compute the marginal probability distribution for selecting a value from each row of pixels.

  • Given for any pixel, compute the conditional probability .

Given the marginal distribution for and the conditional distributions for environment map rows, it is easy to select a pixel as follows:

  1. Use the inversion method to first select a “row” of the environment map according to .
  2. Given this row, use the inversion method to select a pixel in the row according to .