We present a technique for sampling light probe images using variance minimization. The technique modifies the median cut algorithm for light probe sampling [Debevec 2005] so that the variance within each region is minimized. Figure 1 shows 4, 16, 64 and 256 lights sampled from the Grace Cathedral lighting environment using the proposed variance minimization algorithm. The median cut algorithm tends to compute partitions which cut right through the brightest light sources, so these sampled lights are not placed in the optimal positions. Figure 2 shows a simple case highlighting how the variance minimization technique improves on the median cut approach.
The algorithm recursively divides the entire light probe image into 2^n regions as follows:
The variance of each region r can be calculated from the following equation:
Where Lp is the light energy weighting factor of p, and dp is the distance from p to the centroid of r. The calculation of the variance of each region is accelerated using summed area tables.
Figure 3 illustrates the differences in sample placement between the Median Cut algorithm and the proposed Variance Minimization algorithm. Figure 4 shows a scene rendered with 64 sampled lights from the Grace Cathedral light probe which is a close match to the ground truth Monte-Carlo solution.