Fifth Hungarian Conference on Computer Graphics and Geometry, Budapest, 2010 Adaptive Sampling with Error Control László Szécsi 1 , László Szirmay-Kalos 1 , and Murat Kurt 2 1 : BME IIT, Hungary, 2 : International Computer Institute, Ege University, Turkey Abstract This paper proposes a multi-dimensional adaptive sampling algorithm for rendering applications. Unlike impor- tance sampling, adaptive sampling does not try to mimic the integrand with analytically integrable and invertible densities, but approximates the integrand with analytically integrable functions, thus it is more appropriate for complex integrands, which correspond to difficult lighting conditions and sophisticated BRDF models. We develop an adaptation scheme that is based on ray-differentials and does not require neighbor finding and complex data structures in higher dimensions. As a side result of the adaptation criterion, the algorithm also provides error estimates, which are essential in predictive rendering applications. 1. Introduction Rendering is mathematically equivalent to the evaluation of high-dimensional integrals. In order to avoid the curse of dimensionality, Monte Carlo or quasi-Monte Carlo quadra- tures are applied, which take discrete samples and approxi- mate the integral as the weighted sum of the integrand values in these samples. The challenge of these methods is to find a sampling strategy that generates a small number of samples providing an accurate quadrature. Importance sampling would mimic the integrand with the density of the samples. However, finding a proper density function and generating samples with its distribution are non-trivial tasks. There are two fundamentally different ap- proaches to generating samples with a probability density. The inversion method maps uniformly distributed samples with the inverse of the cumulative probability distribution of the desired density. However, this requires that the density is integrable and its integral is analytically invertible. The integrand of the rendering equation is a product of BRDFs and cosine factors of multiple reflections, and of the incident radiance at the end of a path. Due to the imposed require- ments, importance sampling can take into account only a sin- gle factor of this product form integral, and even the single factor is just approximately mimicked except for some very simple BRDF models. Rejection sampling based techniques, on the other hand, do not impose such requirements on the density. However, rejection sampling may ignore many, al- ready generated samples, which may lead to unpredictable performance degradation. Rejection sampling inspired many sampling methods 5, 28, 1, 20, 22, 27 . We note that in the con- text of Metropolis sampling there have been proposals to exploit even the rejected samples having re-weighted them 30, 10, 17, 13 . Hierarchical sampling strategies attack product form integrands by mimicking just one factor initially, then improving the sample distribution in the second step either by making the sampling distribution more proportional to the integrand 5, 28, 6, 7, 22 or by making the empirical distribution of the samples closer to the continuous sample distribution 1, 20, 27 . An alternative method of finding samples for integral quadratures is adaptive sampling that uses the samples to de- fine an approximation of the integrand, which is then analyt- ically integrated. Adaptation is guided by the statistical anal- ysis of the samples in the sub-domains. Should the variance of the integrand in a sub-domain be high, the sub-domain is broken down to smaller sub-domains. Adaptive sampling does not pay attention to the placement of the samples in the sub-domains. However, placing samples in a sub-domain without considering the distribution of samples in neighbor- ing sub-domains will result in very uneven distribution in higher dimensional spaces. On the other hand, variance cal- culation needs neighbors finding, which gets also more dif- ficult in higher dimensions. Thus, adaptive sampling usually suffers from the curse of dimensionality. The VEGAS method 18 is an adaptive Monte-Carlo tech- nique that generates a probability density for importance