Randomized Coherent Sampling for Reducing Perceptual ...hachisuka/rcs.pdf · integration, pixel...

1
Randomized Coherent Sampling for Reducing Perceptual Rendering Error Lasse Staal Toshiya Hachisuka Aarhus University Figure 1: Left: Reference image of the killeroo model. Center top: Close-ups of the image after 8 minutes of rendering using our sampling method (RMSE 573.115). Center bottom: Equal-time comparison with random sampling (RMSE 618.509). Right: Graph of the perceptual difference of the image compared to the reference using pdiff [Yee 2004] with default settings. 1 Introduction Realistic image synthesis using path tracing needs many samples to achieve noise-free images. The noise is due to the use of Monte Carlo integration in path tracing. Since Monte Carlo integration evaluates each pixel using random sampling, we obtain noisy pixels at low sample counts. Due to the random nature of Monte Carlo integration, pixel values with finite numbers of samples can be significantly different, even if their correct solutions to the rendering equation are the same. We propose a novel sampling method which exploits the coherency among integrals of pixels without filtering. Our method does not aim to reduce RMS error of rendered images. Instead, our method makes pixels with similar integrals converge towards the correct solutions with similar trend of error. In other words, our method makes the distribution of error coherent. Figure 1 demonstrates our results. If integrals are completely the same, the image rendered by our method would be just a constant scaling from the reference solution. As the human visual system is not sensitive to absolute differences [2004], our method yields perceptually better images compared to tradiditional random sampling. The graph shows the perceptual error of our method compared to stratified sampling. 2 Main Idea Instead of sampling every pixel individually, we use the same se- quences of random numbers for pixels with similar integrals. This technique has already been proposed by Sadeghi et al. in coherent path tracing (CPT) [2009]. However, their main focus is to increase performance by utilizing the coherence of rays to do packet tracing. CPT suffers from structured noise in regions where the integral of the rendering equation is changing. Sadeghi et al. proposed one heuristic solution to this issue by introducing a small tile of different random number sequences over neighboring pixels. We formalize this heuristic by incorporating differences among integrals of pixels into the sampling procedure. The key difference is that we aim at ren- dering images with reduced perceptual error, rather than improving performance of ray tracing. Our method generates two images; Image R and Image C . Image R is generated by using regular random sampling. Using the same nota- tion of Sadeghi et al., random sampling can be seen as use of a dif- ferent random number sequence ~u =(u1,...,un) per pixel[2009]. The vector ~u i,k is used to render the kth sample for pixel xi . CPT uses the same vector ~u k for every pixel xi and sample k. Our method also uses the same vector over the image, but offsets it by another weighted random number sequence for each sample. The weight indicates how different the current pixel is from its neighbors. The addition of another random number sequence reduces structured noise in regions with varying pixel integrals. The map w, containing the weights, is constructed from Image R , by filtering the input image of path tracing. After filtering, the current pixel is compared to its neighbors in order to determine how different its pixel value is from the neighbors. The final vector used to generate the second image Image C is: ~ uc i,k =(~u k + wi~u i,k ) mod 1, (1) where ~ uc i,k is the random sequence for the kth sample for pixel xi and wi is the weight associated with pixel xi . If the pixel is similar to its neighbors, wi will be 0, and ~ uc i,k reduces to the coherent sequence ~u k . However, if the pixel is completely different from its neighbors, the resulting sequence will be incoherent from the neigh- boring pixels since the incoherent random number sequence, ~u i,k , will dominate the resulting random number sequence by Equation 1. 3 Algorithm Our method is a two pass algorithm. In the first pass, we render Image R using incoherent random number sequences. We then gen- erate map w as described in the previous section. In the second pass, we utilize the resulting map to render Image C using the vector ~ uc i,k in Equation 1. The two images are combined either by addition, or a weighted function based on w, which interpolates the two images according to the differences of the integrals. One interesting feature of our method is that the method remains unbiased since it is non-adaptive uniform sampling. This feature is in contrast to existing adaptive sampling methods where unbiasedness is usually not guaranteed due to their adaptation to previous samples. Currently the method is only explored for direct lighting. However, since we use random numbers as the basis of our method, the same approach can potentially be used for other rendering techniques such as final gathering in photon mapping. As the error of similar pixels is the same, at low sample counts, our method may still introduce structured noise. However, we see consistent reduction in perceptual error at a reasonable amount of samples. References SADEGHI , I., CHEN, B., AND J ENSEN, H. W. 2009. Coherent path tracing. journal of graphics, gpu, and game tools 14, 2, 33–43. YEE, H. 2004. A perceptual metric for production testing. journal of graphics, gpu, and game tools 9, 4, 33–40.

Transcript of Randomized Coherent Sampling for Reducing Perceptual ...hachisuka/rcs.pdf · integration, pixel...

Page 1: Randomized Coherent Sampling for Reducing Perceptual ...hachisuka/rcs.pdf · integration, pixel values with finite numbers of samples can be significantly different, even if their

Randomized Coherent Sampling for Reducing Perceptual Rendering Error

Lasse Staal Toshiya HachisukaAarhus University

Figure 1: Left: Reference image of the killeroo model. Center top: Close-ups of the image after 8 minutes of rendering using our samplingmethod (RMSE 573.115). Center bottom: Equal-time comparison with random sampling (RMSE 618.509). Right: Graph of the perceptualdifference of the image compared to the reference using pdiff [Yee 2004] with default settings.

1 IntroductionRealistic image synthesis using path tracing needs many samplesto achieve noise-free images. The noise is due to the use of MonteCarlo integration in path tracing. Since Monte Carlo integrationevaluates each pixel using random sampling, we obtain noisy pixelsat low sample counts. Due to the random nature of Monte Carlointegration, pixel values with finite numbers of samples can besignificantly different, even if their correct solutions to the renderingequation are the same.

We propose a novel sampling method which exploits the coherencyamong integrals of pixels without filtering. Our method does notaim to reduce RMS error of rendered images. Instead, our methodmakes pixels with similar integrals converge towards the correctsolutions with similar trend of error. In other words, our methodmakes the distribution of error coherent. Figure 1 demonstrates ourresults. If integrals are completely the same, the image renderedby our method would be just a constant scaling from the referencesolution. As the human visual system is not sensitive to absolutedifferences [2004], our method yields perceptually better imagescompared to tradiditional random sampling. The graph shows theperceptual error of our method compared to stratified sampling.

2 Main IdeaInstead of sampling every pixel individually, we use the same se-quences of random numbers for pixels with similar integrals. Thistechnique has already been proposed by Sadeghi et al. in coherentpath tracing (CPT) [2009]. However, their main focus is to increaseperformance by utilizing the coherence of rays to do packet tracing.CPT suffers from structured noise in regions where the integral ofthe rendering equation is changing. Sadeghi et al. proposed oneheuristic solution to this issue by introducing a small tile of differentrandom number sequences over neighboring pixels. We formalizethis heuristic by incorporating differences among integrals of pixelsinto the sampling procedure. The key difference is that we aim at ren-dering images with reduced perceptual error, rather than improvingperformance of ray tracing.

Our method generates two images; ImageR and ImageC . ImageR isgenerated by using regular random sampling. Using the same nota-tion of Sadeghi et al., random sampling can be seen as use of a dif-ferent random number sequence ~u = (u1, . . . , un) per pixel[2009].The vector ~ui,k is used to render the kth sample for pixel xi. CPTuses the same vector ~uk for every pixel xi and sample k. Our methodalso uses the same vector over the image, but offsets it by another

weighted random number sequence for each sample. The weightindicates how different the current pixel is from its neighbors. Theaddition of another random number sequence reduces structurednoise in regions with varying pixel integrals. The map w, containingthe weights, is constructed from ImageR, by filtering the input imageof path tracing. After filtering, the current pixel is compared to itsneighbors in order to determine how different its pixel value is fromthe neighbors. The final vector used to generate the second imageImageC is:

~uci,k = (~uk + wi~ui,k) mod 1, (1)

where ~uci,k is the random sequence for the kth sample for pixel xi

and wi is the weight associated with pixel xi. If the pixel is similarto its neighbors, wi will be 0, and ~uci,k reduces to the coherentsequence ~uk. However, if the pixel is completely different from itsneighbors, the resulting sequence will be incoherent from the neigh-boring pixels since the incoherent random number sequence, ~ui,k,will dominate the resulting random number sequence by Equation 1.

3 AlgorithmOur method is a two pass algorithm. In the first pass, we renderImageR using incoherent random number sequences. We then gen-erate map w as described in the previous section. In the second pass,we utilize the resulting map to render ImageC using the vector ~uci,kin Equation 1. The two images are combined either by addition, or aweighted function based on w, which interpolates the two imagesaccording to the differences of the integrals.

One interesting feature of our method is that the method remainsunbiased since it is non-adaptive uniform sampling. This feature is incontrast to existing adaptive sampling methods where unbiasednessis usually not guaranteed due to their adaptation to previous samples.Currently the method is only explored for direct lighting. However,since we use random numbers as the basis of our method, the sameapproach can potentially be used for other rendering techniques suchas final gathering in photon mapping. As the error of similar pixelsis the same, at low sample counts, our method may still introducestructured noise. However, we see consistent reduction in perceptualerror at a reasonable amount of samples.

ReferencesSADEGHI, I., CHEN, B., AND JENSEN, H. W. 2009. Coherent path

tracing. journal of graphics, gpu, and game tools 14, 2, 33–43.

YEE, H. 2004. A perceptual metric for production testing. journalof graphics, gpu, and game tools 9, 4, 33–40.