Area-Preserving Parameterizations for Spherical Ellipses
Total Page:16
File Type:pdf, Size:1020Kb
Eurographics Symposium on Rendering 2017 Volume 36 (2017), Number 4 P. Sander and M. Zwicker (Guest Editors) Area-Preserving Parameterizations for Spherical Ellipses Ibón Guillén1;2 Carlos Ureña3 Alan King4 Marcos Fajardo4 Iliyan Georgiev4 Jorge López-Moreno2 Adrian Jarabo1 1Universidad de Zaragoza, I3A 2Universidad Rey Juan Carlos 3Universidad de Granada 4Solid Angle Abstract We present new methods for uniformly sampling the solid angle subtended by a disk. To achieve this, we devise two novel area-preserving mappings from the unit square [0;1]2 to a spherical ellipse (i.e. the projection of the disk onto the unit sphere). These mappings allow for low-variance stratified sampling of direct illumination from disk-shaped light sources. We discuss how to efficiently incorporate our methods into a production renderer and demonstrate the quality of our maps, showing significantly lower variance than previous work. CCS Concepts •Computing methodologies ! Rendering; Ray tracing; Visibility; 1. Introduction SHD15]. So far, the only practical method for uniformly sampling the solid angle of disk lights is the work by Gamito [Gam16], who Illumination from area light sources is among the most impor- proposed a rejection sampling approach that generates candidates tant lighting effects in realistic rendering, due to the ubiquity of using spherical quad sampling [UFK13]. Unfortunately, achieving such sources in real-world scenes. Monte Carlo integration is the good sample stratification with this method requires special care. standard method for computing the illumination from such lumi- naires [SWZ96]. This method is general and robust, supports arbi- In this paper we present a set of methods for uniformly sam- trary reflectance models and geometry, and predictively converges pling the solid angle subtended by an oriented disk. We exploit the to the actual solution as the number of samples increases. Accu- fact that a disk, as seen from a point, is bounded by an elliptical rately sampling the illumination from area light sources is crucial cone [Ebe99] and thus its solid angle defines a spherical ellipse for minimizing the amount of noise in rendered images. whose properties have been analyzed in depth [Boo44]. This allows us to define two different exact area-preserving mappings that can be Estimating the direct illumination at a point requires sampling used to transform stratified unit-square sample patterns to stratified the radiance contribution from directions inside the solid an- directions on the subtended spherical ellipse. We describe how to gle subtended by the given luminaire. A sensible strategy is to efficiently implement these mappings in practice and demonstrate distribute those directions uniformly. This, however, is hard to the lower variance they achieve compared to previous work. achieve for an arbitrary-shaped luminaire, as it involves first com- puting and then uniformly sampling its subtended solid angle. 2. Problem Statement and Previous Work Specialized methods have been proposed for spherical [Wan92], triangular [Arv95, Ure00], rectangular [UFK13], and polygonal Our goal is to compute the radiance Ls scattered at a point o in lights [Arv01]. These elaborate solid angle sampling techniques are direction wbo due to irradiance from a disk-shaped luminaire D. This more computationally expensive than naïve methods that uniformly can be written as an integral over the solid angle WD subtended by sample the surface area of the luminaire. However, in most non- the luminaire: trivial scenes, where the sample contribution evaluation is orders Z Ls(o;wo) = f (o;x ;wo;w)dµ(w); (1) b owb b b b of magnitude more costly than the sample generation, their lower WD variance improves overall efficiency. where x is the first visible point from o in direction w, µ is the owb b Few papers have focused on sampling oriented disk-shaped light solid angle measure, and the contribution function f is sources. Disk lights are important in practice, both for their artistic ( Le(x;−wb) fs(o;wbo;wb)jwb · nboj; if o is on a surface, expressiveness and their use in a number of real-world scenarios, f (o;x;wo;w)= b b L (x;−w)r(o;w ;w)T(o;x); if o is in a medium, generally including man-made light sources such as in architectural e b bo b lighting, film and photography. Moreover, disk lights form the base with fs, nbo, and r being respectively the BSDF, surface normal, for some approximate global illumination algorithms [HKWB09, and medium phase function (times the scattering coefficient) at o. c 2017 The Author(s) Computer Graphics Forum c 2017 The Eurographics Association and John Wiley & Sons Ltd. Published by John Wiley & Sons Ltd. Guillén et al. / Area-preserving parameterizations for spherical ellipses (a) Area sampling [SC97] (b) Gamito [Gam16] (c) Our parallel mapping (d) Our radial mapping (e) Our ld-radial mapping Figure 1: A stratified unit-square sample pattern transformed onto the surface of a disk using existing techniques and our proposed maps (with solid angle projections on the bottom row). The points are colored according to their canonical [0;1]2 coordinates to illustrate the continuity of the maps. Gamito’s rejection sampling does not allow for direct stratification, so we show the candidate low-discrepancy pattern for that case. Le(x; −wb) is the luminaire emission radiance at x in direction −wb Area-preserving solid angle maps have been developed for trian- and T(o;x) is the medium transmitance between o and x. gles [Arv95] and rectangles [UFK13]. For sampling the solid angles of disks, Gamito [Gam16] proposed to use a rectangle map [UFK13] Solid angle sampling. Monte Carlo estimation of Equation (1) followed by rejection sampling. This technique cannot be used with using N randomly sampled directions wbi has the following form: fixed-size canonical point sets, and needs a low-discrepancy se- N f (o;x ;w ;w ) quence capable of progressively generating stratified sample candi- 1 owi bo bi Ls(o;wo) ≈ b ; (2) dates. The rejection sampling also makes it very difficult to achieve b N ∑ p(w ) i=1 bi good high-dimensional stratification in the presence of other dis- where p(wb) is the pdf for sampling wb. The choice of sampling tributed effects, e.g. volumetric scattering, where the coordination density p is important, since a lower variation of f =p makes the of the sample patterns of different effects is desired. In this paper we estimator more efficient [SWZ96]. For disk lights the traditional focus on area-preserving maps for disks that do not require rejection choice is uniform density over the luminaire surface D. This area sampling and work with any canonical sample pattern. Figure1 sampling technique is easy to implement and its resulting solid compares our proposed maps against existing techniques. angle pdf is p(w) = ko−x k=(A(D)jw · nx j), where A(D) is the b owb b b owb For surface scattering points o, an even better strategy is to im- area of D. This pdf can lead to very high variance in the radiance portance sample the term jwb · nboj in the contribution f . Such uni- estimator (2), especially when the point o is close to the luminaire. form sampling of the projected solid angle has been described by Our goal in this paper is to devise uniform solid angle sampling Arvo [Arv01] for polygonal lights. Extending our approach to pro- techniques that generate directions wb with constant density p(wb) = jected solid angle sampling is an interesting avenue for future work. 1=jWDj, yielding estimators with significantly lower variance than uniform area sampling. 3. Solid Angle Sampling of an Oriented Disk Area-preserving mapping. Sample stratification can greatly im- We base our sampling techniques on the key observation that the prove the efficiency of Monte Carlo estimators [Shi91, SK13, projected area of any ellipse, including a disk, forms a spherical ∗ PSC 15]. Most existing stratification techniques generate samples ellipse on the unit sphere around the shading point (Figure2). Thus, 2 in the canonical unit square [0;1] , however our goal is to sample in order to sample the solid angle subtended at point o by an oriented directions inside the solid angle WD. Therefore, in order to take disk with center c, normal nb, and radius r, we will uniformly sample advantage of these techniques, we need to find a mapping M from a point q on the spherical ellipse and then backproject it to the disk. 2 2 [0;1] to WD such that for any two regions R1;R2 ⊆ [0;1] : A(R ) µ(M(R )) Spherical ellipse. To compute the subtended spherical ellipse, we 1 = 1 ; first define a local reference frame for the disk Rd = (xd;yd;zd): A(R2) µ(M(R2)) b b b c − o A µ where is the area measure, and is the solid angle measure as bzd = −nb; ybd = bzd × ; xbd = ybd ×bzd: (3) in Equation (1). We call such maps area-preserving maps. This kc − ok key property makes it possible to generate stratified samples in WD, We then take the boundary disk coordinates y0 and y1 w.r.t. the ybd because stratification is far more easily achieved in [0;1]2. axis and project them onto the sphere (Figure2, left). From the c 2017 The Author(s) Computer Graphics Forum c 2017 The Eurographics Association and John Wiley & Sons Ltd. Guillén et al. / Area-preserving parameterizations for spherical ellipses y1 ybd 0 ye ze y1 b b c 0 b a yh 0 y0 ze yh b 0 0 z0 a z zh 1 xd b 00 b o yd x 0 zd x1 b 1 b b at y0 x0 t xbd x0 xe bzd o b ybe Figure 2: Left: The disk’s local reference system Rd = (xbd;ybd;bzd) and the local coordinates required to characterize its solid angle projection.