Progressive Photon Mapping

Toshiya Hachisuka Shinji Ogaki Henrik Wann Jensen UC San Diego The University of Nottingham UC San Diego

Path tracing Bidirectional Metropolis light transport Photon mapping Progressive photon mapping Figure 1: A glass lamp illuminates a wall and generates a complex caustics lighting pattern on the wall. This type of illumination is difficult to simulate with Monte Carlo methods such as path tracing, bidirectional path tracing, and Metropolis light transport. The lighting seen through the lamp is particularly difficult for these methods. Photon mapping is significantly better at capturing the caustics lighting seen through the lamp, but the final quality is limited by the memory available for the photon map and it lacks the fine detail in the illumination. Progressive photon mapping provides an image with substantially less noise in the same render time as the Monte Carlo ray tracing methods and the final quality is not limited by the available memory.

Abstract 1 Introduction

This paper introduces a simple and robust progressive global illu- Efficiently simulating is one of the classic prob- mination algorithm based on photon mapping. Progressive photon lems in . In the most general form it involves mapping is a multi-pass algorithm where the first pass is ray trac- solving for all types of light transport within a scene in order to pro- ing followed by any number of photon tracing passes. Each photon vide a full solution to the [Kajiya 1986]. Several tracing pass results in an increasingly accurate global illumination global illumination algorithms have been developed over the years solution that can be visualized in order to provide progressive feed- and a number of algorithms based on Monte Carlo ray tracing are back. Progressive photon mapping uses a new radiance estimate capable of solving the rendering equation without any approxima- that converges to the correct radiance value as more photons are tions [Dutre´ et al. 2006]. used. It is not necessary to store the full photon map, and unlike standard photon mapping it possible to compute a global illumina- Monte Carlo based methods can simulate both specular and diffuse tion solution with any desired accuracy using a limited amount of materials, but there is one combination of these materials that is memory. Compared with existing Monte Carlo ray tracing methods particularly problematic for most of the methods. This combina- progressive photon mapping provides an efficient and robust alter- tion involves light being transported along a specular to diffuse to native in the presence of complex light transport such as caustics specular path (SDS path) before being seen by the eye. An exam- and in particular reflections of caustics. ple of an SDS path is the shimmering light seen on the bottom of a swimming pool, or it could be any type of specular surface seen in a room illuminated by a light source enclosed in glass. Most artificial Keywords: Global Illumination, Photon Mapping, Sampling and lighting involves light sources embedded in glass (e.g. light bulbs, Reconstruction, Density Estimation and headlights of car), and this type of illumination is very com- mon. SDS paths are particularly challenging when the light source is small since the probability of sampling the light through the spec- ular material is low in unbiased Monte Carlo ray tracing methods such as path tracing, bidirectional path tracing, and Metropolis light transport. For example, this can be seen in Figure 1 where a glass lamp illuminates a room. Notice how the Monte Carlo ray trac- ing methods fail to capture the transmission of caustics through the lamp.

Photon mapping is a consistent algorithm which is good at simu- lating caustics and SDS paths. However, photon mapping becomes very costly for scenes dominated by caustics illumination since the caustics are simulated by directly visualizing the photon map. To an iterative importance sampling approach, and they demonstrated avoid noise it is necessary to use a large number of photons and the some improvement in efficiency over ERPT. accuracy is limited by the memory available for the photon map. The fourth image in Figure 1 shows the lamp scene rendered using In his PhD thesis, Veach formulated unbiased Monte Carlo render- 20 million photons, but this is not enough to capture details in the ing methods as an integration over path space [Veach 1998]. Path illumination and the rendered image exhibits low-frequency noise. space is the space of all possible light transport paths in a scene. He formulated unbiased Monte Carlo rendering methods as a Monte In this paper we present a progressive photon mapping algorithm Carlo sampling from this path space. He also pointed out several that makes it possible to robustly simulate global illumination in- limitations of unbiased path space based methods. One of the lim- cluding SDS paths with arbitrary accuracy without requiring infi- itations is that any path space based method cannot render perfect nite memory. Progressive photon mapping uses multiple photon specular reflections of caustics from a point light source viewed tracing steps to compute an accurate solution without maintaining through a pinhole camera. The reason for this is that the probabil- every photons from each iteration. We use a novel progressive ra- ity of generating a path that connects the eye with the light is zero. diance estimate that converges to the correct solution as more pho- Veach mentioned that changing the light source into a small area tons are added. The progressive radiance estimate uses the consis- light addresses this problem, but as our results demonstrates such tency of photon mapping to refine the estimate and ensure conver- small area lights are still difficult to sample and contribute consid- gence. Our results show that progressive photon mapping is more erable noise to the final image. Note that path tracing, BDPT, MLT, efficient and robust than path tracing, bidirectional path tracing and ERPT and PMC-ER are all unbiased path-space based methods. Metropolis light transport in scenes with SDS paths. Furthermore, progressive photon mapping can compute a noise free solution in Photon mapping is a two-pass global illumination algorithm devel- complex scenes where traditional photon mapping is limited by the oped by Jensen [1996]. The first pass is building a photon map memory available for the photons in the photon map. using photon tracing, and the second pass uses ray tracing to ren- der the image. In the ray tracing pass the photon map is used to 2 Related Work estimate the radiance at different locations within the scene. This is done by locating the nearest photons and performing a nearest neighbor density estimation. Since the density estimation process In his seminal paper on the rendering equation Kajiya [1986] in- can be considered as a way of loosely connecting paths from the troduced the path tracing algorithm. Path tracing is a Monte Carlo eye to the light, photon mapping is very effective at rendering SDS ray tracing algorithm, that computes global illumination in a given paths. The density estimation process effectively blurs the lighting scene by evaluating a large number of random ray paths. This ap- in the scene, and to represent sharp illumination details it is nec- proach works well in scenes with smooth illumination, but it be- essary to use a large number of photons. The main challenge is comes costly in the presence of caustics due to small light sources. scenes with lighting dominated by caustics. This type of lighting is This is caused by the low probability of generating random paths rendered using a direct visualization of the photon map, which can that are reflected by the specular surface towards the light source. require a large number of photons to resolve the details. Since the To render scenes with caustics more efficiently Dutre´ et al. [1993] photon map is stored in memory, the final quality is often limited used Monte Carlo light tracing from the light sources to the image by the maximum number of photons that can be stored in the pho- pixels. This approach renders caustics, but it cannot capture specu- ton map. We overcome this problem in photon mapping by using lar reflections seen by the observer. To address this issue Lafortune a sequence of smaller photon maps without the need of storing all et al. [1993] and Veach and Guibas [1995] introduced bidirectional the photons. path tracing (BDPT). BDPT traces light paths both from the light source and the eye, which makes it significantly more efficient at To improve the performance of photon mapping and final gather- rendering caustics. However, BDPT is very inefficient at render- ing Havran et al. introduced the concept of reverse photon map- ing mirror reflections and transmissions of caustics, since it cannot ping [Havran et al. 2005]. Reverse photon mapping uses ray trac- connect the light path and the eye path in this case. ing in the first pass and photon tracing in the second pass. The ray tracing step builds a kd-tree over the hit points and in the photon To address the shortcomings of BDPT Veach and Guibas [1997] tracing step this kd-tree is used to find the nearest hit points that a proposed the Metropolis light transport algorithm (MLT). In MLT, photon contributes to. The motivation for this approach is to reduce each path is generated based on the mutation (perturbation) of a the complexity and improve the performance of photon mapping previous path. MLT can render complex illumination effects and when a large number of rays are used in the ray tracing pass (e.g. as it is particularly good at handling strongly localized illumination part of final gathering). We use a concept similar to reverse photon effects, such as illumination coming through a slight opening of mapping, but our goal is to compute a highly accurate global illu- door. However, in the case of mirror reflections of caustics, even mination solution in scenes with complex lighting and to overcome MLT becomes inefficient because such paths are difficult to gen- the inherent limitation of the final image quality in standard photon erate by mutating existing paths. Veach and Guibas introduced a mapping. special caustics mutation for this case, but it is only effective in scenes with large light sources. Suykens and Willems [2000] proposed an adaptive image filtering algorithm that asymptotically converges to the correct solutions. Cline et al. proposed an improvement to MLT called Energy Re- They described several heuristics that reduces the width of filter- distribution Path Tracing (ERPT) [Cline et al. 2005]. ERPT is in ing kernel based on the number of samples. Our method also uses essence a stratification of MLT over pixels, and it is simpler to im- the number of photons to reduce the search radius of the radiance plement than MLT. Since ERPT still depends on mutations similar estimate, which asymptotically converges to the correct solutions to MLT, it shares the same weakness in the context of mirror re- similar to their method. The key difference is that our method uti- flections of caustics. To address this issue Cline et al. used image lizes the fact that photon mapping is a consistent method. Therefore filtering to reduce noise. Unfortunately, the filter introduces an ar- we can keep the robustness of photon mapping, while obtaining bitrary amount of error in the resulting image. Recently, Lai et al. asymptotically correct images. applied the Population Monte Carlo method to global illumination rendering (PMC-ER) [Lai et al. 2007]. They modified ERPT us- A number of papers have addressed the issues in the standard pho- ing Population Monte Carlo sampling. Their method is essentially ton mapping algorithm. Ray splatting [Herzog et al. 2007] removes boundary bias and topology bias [Schregle 2003] by using rays Each photon tracing pass improves the accuracy of the global illu- rather than photons to perform the radiance estimate. Proximity mination solution and the algorithm is progressive in nature. Fig- bias is not avoided as these methods still rely on nearest neighbor ure 2 summarizes our algorithm. density estimation. Fradin et al. [2005] presented an out of core photon mapping approach optimized for large buildings where only a small part of the photon map is used during rendering. Chris- tensen et al. [2004] introduced brick maps as a compact approxi- mate representation of the illumination represented by the photon map. With progressive photon mapping we can use an unlimited number of photons, since we do not need to store all the photons and we retain all the advantages of the standard photon mapping method such as being able to handle non-Lambertian surfaces. Ray Tracing Pass Photon Tracing Pass 3 Overview Figure 2: Progressive photon mapping uses ray tracing in the first Photon Mapping [Jensen 2001] is a two-pass algorithm. The first pass followed by one or more photon tracing passes. pass is photon tracing, which traces photons from the light sources into the scene and stores them in a photon map as they interact with the surfaces. The second pass is rendering in which the photon map is used to estimate the illumination in the scene. Given a photon Ray Tracing Pass: The ray tracing pass is similar to reverse pho- map, exitant radiance at any surface location x can be estimated as: ton shooting [Havran et al. 2005] without the use of gathering. It uses standard ray tracing to find all the surfaces in the scene visible n X fr(x, ~ω, ~ωp)φp(xp, ~ωp) through each pixel in the image (or a set of pixels). Note, that each L(x, ~ω) ≈ , (1) πr2 ray path includes all specular bounces until the first non-specular p=1 surface seen. In scenes with a large number of specular surfaces the length of the ray paths can be limited by using Russian Roulette. where n is the number of nearest photons used to estimate the in- For each ray path we store all hit points along the path where the coming radiance. φp is the flux of the pth photon, fr is the BRDF, surface has a non-specular component in the BRDF. With each hit ~ω and ~ωp are the outgoing and incoming directions. r is the radius point we store the hit location x, the ray direction ~ω, scaling factors of the sphere containing the n nearest photons. This estimate as- including BRDF and pixel filtering value, and the associated pixel sumes that the local set of photons represents incoming radiance at location. In addition we store extra data necessary for the progres- x, and that the surface is locally flat around x. sive radiance estimate including a radius, the intercepted flux, and the number of photons within the radius. We represent these values The radiance estimate in Equation 1 is the source of bias in pho- in the following structure: ton mapping. The photon tracing step is unbiased, but the resulting photon distribution is blurred as part of the radiance estimate. As the photon density increases the radiance estimate will converge to struct hitpoint { the correct solution, and this makes photon mapping a consistent position x Hit location algorithm. To ensure convergence to the correct solution it is nec- normal ~n Normal at x essary to use an infinite number of photons in the photon map and vector ~ω Ray direction in the radiance estimate. Furthermore, the radius should converge integer BRDF BRDF index to zero. We can satisfy these requirements by using N photons in float x,y Pixel location the photon map, but only N β with β ∈]0 : 1[ photons in the radi- color wgt Pixel weight float R Current photon radius ance estimate. As N becomes infinite both N and N β will become integer N Accumulated photon count infinite, but N β will be infinitely smaller than N, which ensures color τ Accumulated reflected flux that r will converge to zero. This can be written as [Jensen 2001]: }

bNβ c X fr(x, ~ω, ~ωp)φp(xp, ~ωp) We will describe how to compute the last three values in more detail L(x, ~ω) = lim , (2) N→∞ πr2 in the next section. p=1

In standard photon mapping this result is only of theoretical interest Photon Tracing Passes: The photon tracing step is used to accu- since all the photons are stored in memory. This makes it impos- mulate photon power at the hit points found in the ray tracing pass. sible to obtain a solution with arbitrary precision. In the following It can be divided into multiple passes where each pass consists of sections we describe a new radiance estimate that fulfills the re- tracing a given number of photons into the scene in order to build a quirements of Equation 2 without having to store all the photons in photon map. After each photon tracing pass we loop through all hit memory. points (from the ray tracing pass) and find the photons within the ra- dius of each hit point. We use the newly added photons to refine the 3.1 Progressive Photon Mapping estimate of the illumination within the hit point as described in the following section. Once the contribution of the photons have been The main idea in progressive photon mapping is to reorganize the recorded they are no longer needed, and we can discard all photons standard photon mapping algorithm based on the conditions of con- and proceed with a new photon tracing pass. This continues until sistency, in order to compute a global illumination solution with enough photons have been accumulated and the final image quality arbitrary accuracy without storing the full photon map in memory. is sufficient. Note that we can render an image after each photon Progressive photon mapping is a multi-pass algorithm in which the tracing pass. As more photons are accumulated the quality of the first pass is ray tracing and all subsequent passes use photon tracing. image will progressively improve toward the final result. 4 Progressive Radiance Estimate

The traditional photon map radiance estimate as given in Equation 1 relies on an estimate of the local density of photons. The estimate of the local density d(x) is: n Radius: R(x) Radius: R(x) Radius: R(x) - dR(x) d(x) = . (3) Photons: N(x) Photons: N(x) + M(x) Photons: N(x) + αM(x) πr2 Figure 3: Each hit point in the ray tracing pass is stored in a global This estimate is based on locating the n nearest photons within a data structure with an associated radius and accumulated photon sphere of radius r, assuming that the surface is locally flat such power. After each photon tracing pass we find the new photons that the photons are located within a disc. If we generate another within the radius of each hit point, and we reduce the radius based photon map and use it to compute the density at x we might find on the newly added photons. The progressive radiance estimate n0 photons within the same disc, which may results in a different ensures that the final value at each hit point will converge to the density estimate d0(x): correct radiance value. n0 d0(x) = . (4) πr2 To satisfy the consistency condition in Equation 2, there has to be a Note that we are using the same radius as Equation 3. By averag- gain in the total number of photons at every iteration (i.e. Nˆ(x) > 0 ing d(x) and d (x) we can obtain a more accurate estimate of the N(x)). For simplicity, we use a parameter α = (0, 1) to control the density within the disc of radius r. This approach was proposed by fraction of photons to keep after every iteration. Therefore, Nˆ(x) Christensen [Jensen et al. 2004], and it will lead to a smoother ra- can be computed as: diance estimate, but the final result does not have more detail than each individual photon map. Furthermore, the averaging procedure Nˆ(x) = N(x) + αM(x) , (7) is not consistent and the method will not converge to the exact value at x. Instead it computes the average value within a constant radius which states that we would like to add αM(x) new photons at each r. As a result, it cannot resolve small details within the radius r, and iteration. We can compute the actual reduction of the radius dR(x) the accuracy is effectively limited by the total number of photons in by combining Equations 5, 6 and 7: each individual photon map. 2 ˆ ˆ The progressive radiance estimate combines the result from several π(R(x) − dR(x)) d(x) = N(x) photon maps in such a way that the final estimate will converge to N(x) + M(x) ⇔ π(R(x) − dR(x))2 = N(x) + αM(x) the correct solution. It is able to resolve details in the illumination πR(x)2 that is not captured by the individual photon maps. The key in- s sight that makes this possible is a new technique for reducing the N(x) + αM(x) ⇔ dR(x) = R(x) − R(x) . (8) radius in the radiance estimate at each hit point, while increasing N(x) + M(x) the number of accumulated photons. This effectively ensures that the photon density becomes infinite in the limit in accordance with Finally, the reduced radius Rˆ(x) is computed as: Equation 2. In the following sections we describe how the pho- ton density is progressively increased. We perform the radiance s N(x) + αM(x) estimate computation at each hit point generated in the ray tracing Rˆ(x) = R(x) − dR(x) = R(x) . (9) pass. Initially, the radius, R(x), at x is set to a non-zero value such N(x) + M(x) as the footprint of the pixel. It is also possible to estimate the ra- dius after the first photon tracing pass by using the photon map to Note that this equation is solved independently for each hit point. estimate the radius around each hit point. 4.2 Flux Correction 4.1 Radius Reduction When a hit point receives M(x) photons we need to accumulate the Each hit point has a radius, R(x). Our goal is to reduce this radius flux carried by those photons. In addition we need to adjust this flux while increasing the number of photons accumulated within this ra- to take into account the radius reduction described in the previous dius, N(x). The density d(x) at a hit point x is computed using section. Each hit point stores the unnormalized total flux received Equation 3. Assume that a number of photon tracing steps have premultiplied by the BRDF. We call this quantity τ(x, ~ω), and for been performed and that N(x) photons have been accumulated at the N(x) photons it is computed as: x. If we perform one additional photon tracing step and find M(x) photons within the radius R(x) then we can add these M(x) pho- N(x) X 0 tons to x, which results in a new photon density dˆ(x): τN (x, ~ω) = fr(x, ~ω, ~ωp)φp(xp, ~ωp) , (10) p=1 N(x) + M(x) dˆ(x) = . 2 (5) where ~ω is the direction of the incident ray at the hit point, ~ωp is the πR(x) 0 direction of the incident photon, and φp(xp, ~ωp) is unnormalized The next step of the algorithm is reducing the radius R(x) by flux carried by the photon p. Note, that the flux at this stage is not dR(x). If we assume that the photon density is constant within divided by the number of emitted photons as in standard photon mapping. Similarly, the M(x) new photons give: R(x), we can compute the new total number of photons Nˆ(x) ˆ within a disc of radius R(x) = R(x) − dR(x) as: M(x) X 0 τ (x, ~ω) = f (x, ~ω, ~ω )φ (x , ~ω ) . (11) ˆ ˆ 2 ˆ 2 ˆ M r p p p p N(x) = πR(x) d(x) = π(R(x) − dR(x)) d(x) . (6) p=1 (a) Number of photons used for radiance esimate (b) Radius of the sphere containing N(x) photons

8000 If the radius was constant we could simply add τ (x, ~ω) to 0.25 M Point A 8000 Point B 0.25 Point A Point C Point B Point A Point APoint C τN (x, ~ω), but since the radius is reduced we need to account for Point B Point B

6000 Point C Point C the photons that fall outside the reduced radius (see Figure 3). One 6000 0.1250.125 ) ) x method for finding those photons would be to keep a list of all pho- x ( ( 4000 4000 0.06250.0625 R tons within the disc and remove those that are not within the re- N

2000 duced radius disc. However, this method is not practical as it would 2000 0.031250.03125 require too much memory for the photon lists. Instead, we assume

0 0 0 500 1000 1500 2000 0.0156250.015625 that the illumination and the photon density within the disc is con- 0 500 1000 1500 2000 11 1010 100100 10001000 stant, which results in the following adjustment: Number of Iterations Number of Iterations πRˆ(x)2 (c) Difference of radiance from the reference value (d) Measurement points used for the graphs 0.06 0.06 Point A τ (x, ~ω) = (τ (x, ~ω) + τ (x, ~ω)) Point B Nˆ N M 2 Point A Point C C πR(x) 0.040.04 Point B Point C

2 e q c 0.020.02 “ N(x)+αM(x) ” n e π R(x) r

e B

N(x)+M(x) f 0

f 0 = τ (x, ~ω) i N+M 2 D πR(x) -0.02-0.02

-0.04-0.04 N(x) + αM(x) A = τN+M (x, ~ω) , (12) -0.06-0.06 N(x) + M(x) 00 500500 10001000 15001500 20002000 Number of Iterations where τN+M (x, ~ω) = τN (x, ~ω) + τM (x, ~ω), and τNˆ (x, ~ω) is the reduced value for the reduced radius disc corresponding to Nˆ(x) Figure 4: Statistics at the hit points as a function of the number photons. The assumption that the photon density and thereby the of iterations. The three hit points A, B, and C are indicated in (d). illumination is constant within the disc may not be correct initially, Each iteration is using 100000 photons. Note that the graph of but it becomes increasingly true as the radius becomes smaller ex- R(x) uses log scale for both axes. cept for points exactly at illumination discontinuities. This is not an issue, since the illumination at discontinuities is undefined and the probability of having a hit point exactly at a discontinuity is zero. parisons we have implemented path tracing (PT) with explicit di- rect light source sampling, bidirectional path tracing (BDPT) with 4.3 Radiance Evaluation multiple importance sampling [Veach and Guibas 1995], Metropo- lis light transport [Veach and Guibas 1997] based on the primary After each photon tracing pass we can evaluate the radiance at the sample space [Kelemen et al. 2002] (MLT), and photon mapping hit points. Recall that the quantities stored include the current ra- (PM) [Jensen 2001]. The algorithms have been implemented in dius and the current intercepted flux multiplied by the BRDF. The Pascal (Delphi), and all our examples have been rendered on a PC evaluated radiance is multiplied by the pixel weight and added to with 1GB of memory and a 2.4GHz Intel Core 2 Q6600 using one the pixel associated with the hit point. To evaluate the radiance we core. The rendered images have a width of 640 pixels. We used α = 0.7 further need to know the total number of emitted photons Nemitted 100000 photons per photon shooting pass and . We lim- in order to normalize τ(x, ~ω). The radiance is evaluated as follows: ited the standard photon mapping results to 20 million photons due to memory constraints on the machine we used for rendering. We Z 0 0 0 0 used 500-1500 photons in the radiance estimate for our results. The L(x, ~ω) = fr(x, ~ω, ~ω )L(x, ~ω )(~n · ~ω ) dω 2π exact number was picked to reduce low-frequency noise in the fi- n nal image. All results are equal time comparisons except for photon 1 X ≈ f (x, ~ω, ~ω )∆φ (x , ~ω ) mapping, where the rendering time is shorter since the total number ∆A r p p p p p=1 of photons is limited by the available memory. Table 1 summarizes the computational effort for the different scenes. 1 τ(x, ~ω) = 2 . (13) πR(x) Nemitted Figure 1 shows a glass lamp illuminating a wall. The images have been rendered using PT, BDPT, MLT, PM, and PPM. The image Similar to the normal photon mapping, this formulation is not re- was rendered in 22 hours. Note, how the illumination seen in the stricted to Lambertian materials as we premultiply the flux with the glass lamp is very noisy in all the Monte Carlo ray tracing meth- BRDF and store it as τ(x, ~ω). Note that the radius R(x) will not ods, while the photon mapping result exhibit low frequency noise be reduced if the disc defined by R(x) is within an unlit region even with 20 million photons. With progressive photon mapping (i.e., M(x) = 0). Although this situation seemingly breaks the we used 165 million photons, which captures the sharp features in conditions of consistency, it still converges to the correct solution the illumination without the high frequency noise seen in the Monte L(x, ~ω) = 0, since τ(x, ~ω) will not increase and L(x, ~ω) → 0 Carlo ray tracing images. as Nemitted → ∞. Although the formal analysis of convergence The test scene shown in Figure 6 is a box with two mirror balls properties of R(x) and N(x) has not been done yet, the graphs in and a smaller glass ball. One of the mirror balls is faceted to cause Figure 4 indicate that the progressive radiance estimate converges interesting caustics pattern. The scene is illuminated by two light- to the correct radiance value L(x), while the radius R(x) is reduced ing fixtures, where each lighting fixture is a spherical light source to zero, and the number of photons N(x) grows to infinity. The pro- behind a spherical lens inside the metal cylinders at the ceiling. gressive radiance estimate ensures that the photon density at each This type of caustics illumination results in numerous SDS paths hit point increases at each iteration and it is therefore consistent in within the model. Note, how the reflections in the mirror ball are accordance with Equation 2. very noisy in both BDPT and MLT. Normal photon mapping re- sults in a slightly blurry result. With progressive photon mapping 5 Results and Discussion we can increase the number of photons to 213 million, which makes it possible to capture the detailed illumination within the scene with In this section we present results based on our implementation considerable less noise than the Monte Carlo ray tracing methods. of the progressive photon mapping algorithm (PPM). For com- The Monte Carlo ray tracing images and the progressive photon 0.1M photons 0.4M photons 1.6M photons 6.4M photons 25.6M photons 102.4M photons

Figure 5: Sequence of images with increasing number of photons. The images show a direct visualization the progressive radiance estimate after 1, 16, 64, 256, and 1024 photon tracing passes. Note, how the illumination is quite good already after 0.1 million photons. Adding more photons makes the image sharper and reduces low frequency noise.

PT BDPT MLT PPM Time be effective in the progressive photon mapping framework since we Samples Samples Mutations Iterations Hours know precisely how much each photon path contributes to the final Lamp 840 80 82 1651 22 image. It could also interesting to utilize statistics from the accu- Box 1428 155 132 2134 4 mulated photons to determine optimal values for the parameters, Torus 1050 550 359 520 2 such as α and the initial radius. Bathroom 675 66 66 6126 16 Acknowledgments Table 1: Rendering statistics for the different scenes. The samples and mutations numbers are the average number per pixel. PPM This work was supported in part by NSF grant CPA 0701992. The uses 100000 photons per iteration. glass lamp and bathroom models are courtesy of Youichi Kimura (Studio Azurite). The box scene is inspired by a similar scene used by WinOSi (http://www.winosi.onlinehome.de/). mapping image were rendered in 4 hours, while the normal photon mapping image was rendered in 1 hour. The progressive nature of our method is demonstrated on the box scene in Figure 5 where the References intermediate results have been visualized. CHRISTENSEN, P. H., AND BATALI, D. 2004. An irradiance atlas Figure 7 demonstrates the illumination on a torus embedded in a for global illumination in complex production scenes. In Pro- glass cube (inspired by a similar scene by Cline et al. [2005]). All ceedings of Eurographics Symposium on Rendering 2004, 133– the Monte Carlo ray tracing methods have trouble rendering the 141. lighting on the torus, while progressive photon mapping renders a smooth noise free result in the same time (2 hours). The reference CLINE,D.,TALBOT,J., AND EGBERT, P. 2005. Energy redistribu- image rendered using path tracing still exhibit noise even after using tion path tracing. ACM Trans. Graph. (SIGGRAPH Proceedings) 51500 samples per pixel and 91 hours of rendering time. 24, 3, 1186–1195. The bathroom scene in Figure 8 is an example of complex ge- DUTRE´, P., LAFORTUNE,E., AND WILLEMS, Y. 1993. Monte ometry and illumination. The illumination in this scene is due to carlo light tracing with direct computation of pixel intensities. two small spherical area light sources enclosed within bumpy glass In Proceedings of Compugraphics ’93, 128–137. tubes. This type of illumination is common in real world lighting. DUTRE´, P., BEKAERT, P., AND BALA, K. 2006. Advanced Global Both BDPT and MLT fail to properly sample the reflection in the Illumination (2nd edition). A K Peters. mirror and on the chrome pipes as well as the lighting behind the glass door. Our method robustly handles all of these illumination FRADIN,D.,MENEVEAUX,D., AND HORNA, S. 2005. Out of paths robustly. Normal photon mapping is also fairly robust in this core photon-mapping for large buildings. In Proceedings of Eu- scene, but it is not possible to render a noise free image using 20 rographics Symposium on Rendering 2005, Eurographics. million photons. HAVRAN, V., HERZOG,R., AND SEIDEL, H.-P. 2005. Fast fi- nal gathering via reverse photon mapping. Computer Graphics 6 Conclusion and Future Work Forum (Proceedings of Eurographics 2005) 24, 3 (September). HERZOG,R.,HAVRAN, V., KINUWAKI,S.,MYSZKOWSKI,K., We have presented a progressive refinement extension to photon AND SEIDEL, H.-P. 2007. Global illumination using photon ray mapping that makes it possible to compute solutions with arbitrary splatting. In Eurographics 2007, Blackwell, vol. 26 of Computer accuracy in scenes with complex illumination. Our results show Graphics Forum, 503–513. that progressive photon mapping is particularly robust in scenes with complex caustics illumination, and it is more efficient than JENSEN, H. W., SUYKENS, F., CHRISTENSEN, P., AND KATO, T. methods based on Monte Carlo ray tracing such as bidirectional 2004. A practical guide to global illumination using ray tracing path tracing and Metropolis light transport. The primary contribu- and photon mapping. In SIGGRAPH ’04: ACM SIGGRAPH tion is a new progressive radiance estimate that converges to the 2004 Course Notes, ACM, New York, NY, USA, 20. correct solution as more photons are added. JENSEN, H. W. 1996. Global illumination using photon maps. In We believe progressive photon mapping opens several opportuni- Proceedings of the Eurographics Workshop on Rendering Tech- ties for future research. First, we would like to develop a stopping niques ’96, Springer-Verlag, London, UK, 21–30. criteria and an error estimate based on the local statistics of the JENSEN, H. W. 2001. Realistic Image Synthesis Using Photon photon map around each hit point. This would address one of the Mapping. A. K. Peters, Ltd., Natick, MA. outstanding problems in photon mapping, which is how to deter- mine the number of photons required in a given scene. We would KAJIYA, J. T. 1986. The rendering equation. Computer Graphics also like to explore adaptive photon tracing techniques, which could (SIGGRAPH Proceedings) 20, 4, 143–150. KELEMEN,C.,SZIRMAY-KALOS,L.,ANTAL,G., AND CSONKA, F. 2002. A simple and robust mutation strategy for the metropolis light transport algorithm. Computer Graphics Forum (Eurographics) 21, 3, 531–540.

LAFORTUNE, E. P., AND WILLEMS, Y. D. 1993. Bi-directional path tracing. In Proceedings of Third International Conference on Computational Graphics and Visualization Techniques (Com- pugraphics ’93), H. P. Santo, Ed., 145–153.

LAI, Y.-C., FAN,S.H.,CHENNEY,S., AND DYER, C. 2007. Photorealistic image rendering with population monte carlo en- ergy redistribution. In Proceedings of the Rendering Techniques (EGSR), Eurographics Association, Grenoble, France, 287–295.

SCHREGLE, R. 2003. Bias compensation for photon maps. In Computer Graphics Forum 22, 4 (2003), C792-C742.

SUYKENS, F., AND WILLEMS, Y. D. 2000. Adaptive filtering for progressive monte carlo image rendering. In Eighth Inter- national Conference in Central Europe on Computer Graphics, Visualization and Interactive Digital Media (WSCG 2000).

VEACH,E., AND GUIBAS, L. J. 1995. Optimally combining sam- pling techniques for monte carlo rendering. In Computer Graph- ics (SIGGRAPH Proceedings), 419–428.

VEACH,E., AND GUIBAS, L. J. 1997. Metropolis light transport. In Computer Graphics (SIGGRAPH Proceedings), 65–76.

VEACH, E. 1998. Robust monte carlo methods for light transport simulation. PhD thesis, Stanford, CA, USA. Adviser-Leonidas J. Guibas. Progressive photon mapping PT BDPT MLT PM PPM

Figure 6: A box scene illuminated by a lighting fixture. The lighting fixture is behind glass and the illumination in the scene is dominated by caustics. The specular reflections and refractions have significant noise even with Metropolis light transport. Standard photon mapping cannot resolve the sharp illumination details in the scene with the maximum 20 million photons in the photon map. With progressive photon mapping we could use 213 million photons, which resolves all the details in the scene and provides a noise free image in the same rendering time as the Monte Carlo ray tracing methods.

PT BDPT MLT PPM Reference Figure 7: Torus embedded in a glass cube. The reference image on the far right have been rendered using path tracing with 51500 samples per pixel. The Monte Carlo ray tracing methods fail to capture the lighting within the glass cube, while progressive photon mapping provides a smooth result using the same rendering time.

Progressive photon mapping PT BDPT MLT PM PPM

Figure 8: Lighting simulation in a bathroom. The scene is illuminated by a small lighting fixture consisting of a light source embedded in glass. The illumination in the mirror cannot be resolved using Monte Carlo ray tracing. Photon mapping with 20 million photons results in a noisy and blurry image, while progressive photon mapping is able to resolve the details in the mirror and in the illumination without noise.