In this chapter, we review previous works on importance sampling and visibility sampling. As mentioned before, importance sampling is a popular approach to improve the performance of Monte-Carlo methods. The major concept of importance sampling is to concentrate the sampling efforts on important regions. If important samples are generated more frequently, the variance can be greatly reduced even with fewer samples. Ideally, the number of samples should be proportional to the rendering equation: between the incident light and surface, and finally n is the surface normal at x . Combing with Monte-Carlo estimator and considering the importance functionPr
(
ωi,n|x,ωo)
, the equation becomes:The major difficulty in importance sampling is to estimate the integral of the triple product ofL ,i B, and V as soon as possible in run time. For performance reason, previous importance sampling algorithms usually transform the BRDF data and environment maps into different basis such as spherical harmonics, wavelets, or
7
spherical radial basis functions. The bases are then used to evaluate the value of importance function Pr
(
ωi,n|x,ωo)
in run time. BRDF importance sampling methods distribute samples according to the BRDF distribution; Environment map importance sampling techniques concentrate samples at regions having large value in incident radiance function; Product importance sampling approaches evaluate the product of BRDF and illumination in run time and determine sampling density according to the value of product. However, considering visibility during sampling would encounter problems discussed in the next paragraph.The simplest idea is to combine the visibility estimation V~
into the importance function and calculate importance by evaluating the triple product L~iB~V~
. However, this approach requires V~ ≠0 wherever V ≠0 because V~ ≠0 will stop the exploration directly and lead to bias. Moreover, visibility could only be determined in run time. This means that the estimation is hard to be generated. For these reasons, the visibility term is usually ignored in the importance sampling algorithms. To solve this problem, we present a novel approach to consider visibility during drawing samples.
2.1 Importance Sampling
Pioneered by Ward [31], the research of importance sampling starts from considering one of the term B or L . In the research of BRDF importance sampling, i Lafortune [15] used multiple cosine-lobes for representing the BRDF. Lalonde [16]
used wavelets to represent the measured BRDF. Matusik [18] also used wavelets to represent BRDF and presented a numerical sampling method based on reparameterizing the BRDF by using half-angle. Weng and Shih [32] fit the measured
8
SRBF data into scattered SRBFs and estimated the probability distribution for importance sampling. In the research of environment map importance sampling [22]
[23], the environment maps were transformed into finite basis function such as wavelets or spherical harmonics.
Recently several researches have worked on drawing samples from the product distribution of the incident radiance function and the BRDF. For general scenes, these approaches produce high-quality images with small number of samples. Burke et al.
[2] introduced a bidirectional sampling technique based on sampling-importance re-sampling (SIR). Clarberg et al. [3] used a hierarchical wavelet representation to estimate the product distribution of BRDF and illumination, later they [4] modified their algorithm by fast quad-tree product in run-time. Tsai et al. [27] proposed a product importance sampling algorithm using SRBF representation. Although these researches work well in general scenes, the lack of considering visibility makes them produces large variance in the scenes like Figure 1.1. Rosusselle et al. [24] proposed a visibility approximation method in their product importance sampling algorithm.
However, their approximation needed the simplification of meshes and a hierarchical structure of each function. Huang et al. [9] considered visibility by using more samples for partial-occluded regions. They do not take visibility into importance function.
2.2 Visibility Coherence
Recently more and more research tries to consider the visibility in importance
9
sampling. Ghosh et al. [7] presented a two-stage importance sampling algorithm to reduce the noise along the shadowed regions. They first used product importance sampling to create a visibility mask for marking the partially occluded pixels, then they use metropolis sampling to exploit the visibility coherence in image space. Their work successfully reduced the variance along the shadowed regions for general scenes.
However, if most directions are invisible, the image-space coherence is hard to exploit and unreliable.
Donikian et al. [6] used an adaptive importance sampling approach to iteratively refine the importance function, the image is divided into 8 x 8 blocks and refined iteratively. Hart et al. [8] used a lazy visibility evaluation to compute direct illumination, spatial visibility coherence was exploited by a flood-fill algorithm.
Clarberg et al [5] analyzed the visibility coherence and used control variate to reformulate the rendering equation. They placed visibility records in the scene, and then used linear interpolation of records to estimate the visibility based on normal difference and distance. Compared to two-stage importance sampling, their work reduced the noise of the entire image. Although they used control variate to exploit the visibility coherence in three-dimensional space, they did not combine the visibility into importance function during sampling. Moreover, their approach needs lots of visibility records in complex scene, becoming memory-consuming and time-consuming for the computation of records.
2.3 Visibility Sampling
Wonka et al. [30] proposed a visibility sampling for ray tracing. Although it is
10
not an importance sampling algorithm, their algorithm has many ideas similar to our work. Their strategy was to cast rays which are likely to sample new triangles in the ray-space and thus improving the sampling efficiency. Our algorithm also uses this concept in importance sampling. We avoid redrawing samples which are likely to be invisible.
11