
Imp ortance Driven Path Tracing using the Photon Map Henrik Wann Jensen Dept of Graphical Communication Technical University of Denmark Abstract This pap er presents a new imp ortance sampling strategy for Monte Carlo ray tracing in which a rough estimate of the irradiance based on the photon map is combined with the lo cal reection mo del to construct more ecient probabili ty density functions that can b e used in an imp ortance sampling scheme The algorithm gives unbiased results handles arbitrary reection mo dels and it is particularly ecient in scenes with highly nonuniform indirect illuminati on Initial results and comparisons with traditional imp ortance sampling strategies indicate a reduction in the noise level of more than Key Words Global Illumination Path Tracing Imp ortance Sampling Photon Map Intro duction Photorealistic rendering requires accurate simulation of global illumination and muchwork has b een done in this area in the last years The problem was actually solved in byKajiya using a metho d called path tracing This metho d is basically a brute force Monte Carlo simulation of lightinteraction with a given mo del Path tracing is very general and it can b e applied to ar bitrarilly complex mo dels It requires only small amounts of memory and it is very applicable to parallel computers The rendering time with path tracing is however so enormous that the metho d in spite of b eing general is not very attractive on current computers architectures Several pap ers have presented improvements to the path tracing metho d Ward et al did a very go o d job byintro ducing a caching scheme in h indirect illumination is stored and reused at ideal diuse surfaces This whic signicantly reduces the number of rays necessary in scenes with many at ideal diuse surfaces Shirley et al andWard reduce the numb er of shadow rays required to compute direct illumination in scenes with manylight sources Arvo et al describ ed a technique called Russian roulette that eliminates the email igkhwjunidhpuni cdk url httpwwwgkdtudkhomehwj innite reection of lightrays without intro ducing bias in the nal solution Se veral authors use imp ortance sampling where the reection characteristics of the surface are used to guide sampling rays into those directions from where the light will contribute mostly Another approach is adaptive sampling where samples are concentrated in the most interesting parts of the scene Lafortune et al constructs a d tree representing the overall ux in the scene and uses this tree in the selection of new sampling directions Adaptive sampling can however easily lead to biased solutions and it must b e used with great care Recently bidirectional path tracing was intro duced by Lafortune et al and Veachet al It is a mixture of path tracing from the eye and path tracing from the light sources and it is particularly ecient in scenes with highly nonuniform indirect illumination Currently the simulation of global illumination is obtained most eciently by the two pass metho ds in which a light pass ie radiosity pro duces a solution that is visualized with a simplied path tracing algorithm Another ecient metho d or collection of metho ds is presented in the Radiance rendering program byWard These two pass metho ds and the Radiance program do however degrade to pure path tracing in very complex environments where the surfaces are no longer ideal diuse or ideal sp ecular or where the ob jects are either to o complex or to o many to b e represented by p olygons Even though some of the two pass metho ds can let the light pass step work on simplied scenes they still haveto visualize the solution using path tracing in order to eliminate artifacts in the light pass step This path tracing step do es not utilize the fact that the mo del t and the imp ortance do es contain information on the distribution of the ligh sampling is therefore still only using the reection characteristics of the surface to guide new sampling rays This is particularly problematic in scenes with highly nonuniform indirect illumination These situation are handled more eciently using bidirectional path tracing but this metho d do es not use the irradiance stored within the mo del It would b e more appropriate to use the information created in the light pass to guide the path tracing algorithm This would also p ermit the use of the metho d in twopasstechniques where path tracing is used only for the rst reection seen bytheeye In this pap er we present an imp ortance sampling scheme in which the scene is prepro cessed and rough estimates of the incoming light are created everywhere in the mo del These rough estimates are used to generate sampling directions based on probability density functions that more closely ts the true light contribution as opp osed to standard imp ortance sampling metho ds which only use the lo cal reection mo del In this waywe concentrate the samples in the imp ortant parts of the scene This approachdoesnotgiveany bias on the nal solution as opp osed to some of the common adaptive strategies that also tries to put more samples into imp ortant parts of the scene Mathematical Background Given the integral Z n I g x dx x D R Wecanevaluate this integral using a Monte Carlo technique known as the samplemean metho d by representing the value of the integral as the ex p ected value of any sto chastic variable X with pdf px x D suchthat px when g x Z g x g x px dx E I px px An estimate of the integral is obtained by taking N random sample p oints x i distributed according to px N X g x i I N px i i The error on this estimate largely dep ends on the choice of px and the number p N of samples but as a general rule the standard deviation is prop ortional to That is in order to halve the error wehave to quadruple the numb er of samples Careful selection of pxcanhowever lower the error px should b e constructed so that more samples are put into those regions where g x has the highest absolute value It can b e shown that the optimal choice for pxis g x px I This choice gives a standard deviation of zero always Unfortunately it also requires knowledge of I whichisthevalue we are trying to compute But in general we can do b etter by using a pdf that lo oks like the function weare integrating instead of just using a uniform distribution The problem in global illumination is given in the rendering equation It expresses the radiance L reected from p osition x as r Z Z d x i i d f x f x L x cos d L x i r r i r r i i i i i r r dA d i all all i i where and are the direction of the reected resp ectively incoming ra r i dianceux f is the BRDF at x L is the incoming radiance and is the r i i incoming ux In order to solve this integral light is sampled from a numb er of discrete directions Just sampling from random directions is in most situations very i inecient for a sp ecular surface only light from a small solid angle is imp ortant and it would b e more ecient to sample within this small solid angle Most implementations of path tracing and similar Monte Carlo based algo rithms therefore use imp ortance sampling These implementations use the knowl edge of f to sample those direction from where incoming light will contribute r mostly to the reected radiance For sp ecular surface this approachisvery e cient since the choice of sampling direction is signicantly narrowed down This is not the case with diuse surfaces since the entire hemisphere can contribute to the reected radiance A pdf based on the ideal diuse BRDF is particularly inecient when the incoming radiance L is highly nonuniform ie the incom i ing radiance is concentrated in small solid angles In this situation it would b e b etter to use the optimal pdf px r i d i i px f x r i r r i dA d i Unfortunately this requires knowledge ab out the incoming ux whichisnot i available However even a crude estimate of can b e used to create a more i optimal pdf and in the following sections we will describ e a metho d in which the photon map is used to obtain this estimate The Photon Map The photon map represents a distribution of photons particles throughout the scene and it is created by emitting a large numb er of photons from each light source into the scene based up on the emissivecharacteristics of the light source The technique is similar to particle tracing with the exception that the intersection p oint of each particle is stored explicitly within the scene Each photon is traced through the scene using a strategy similar to path tracing The rst ob ject that the photon hits gives rise to twoevents Firstly if the surface of the ob ject is diuse the photon is stored at the intersection point and secondly Russian roulette is used to determine whether the photon is reected or absorb ed by the ob ject The new direction of a reected photon is computed using the BRDF of the surface We only store the photons representing indirect illumination ie photons that have b een reected at least once The light sources are separated in the sampling pro cess and they should not b e part of the irradiance estimate used to compute the pdf The photon represents a small packet of energy arriving at a surface from a given direction Since the numb er of photons can b e quite large wehavechosen a relatively compact representation that o ccupies only bytes struct photon long energy Packed energy RGB float position Photon position float thetaphi Photon direction char normal Surface normal char key kdtree parameter struct photon left right Rest of the
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages11 Page
-
File Size-