bssrdf importance samplinglibrary.imageworks.com/pdfs/imageworks-library-bssrdf-sampling.pdf ·...

1
Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for third-party components of this work must be honored. For all other uses, contact the Owner/Author. SIGGRAPH 2013, July 21 – 25, 2013, Anaheim, California. 2013 Copyright held by the Owner/Author. ACM 978-1-4503-2261-4/13/07 BSSRDF Importance Sampling Alan King Solid Angle Christopher Kulla Sony Pictures Imageworks Alejandro Conty Sony Pictures Imageworks Marcos Fajardo Solid Angle (a) (b) (c) (d) Figure 1: Simple BSSRDF without (a) and with (b) axis MIS (25 spp). Complex BSSRDF without (c) and with (d) weight MIS (16 spp). Light propagation within translucent materials can be described by a BSSRDF [Jensen et al. 2001]. The main difficulty in integrating this effect lies in the generation of well-distributed samples on the surface within the support of the rapidly decaying BSSRDF profile. Jensen suggested that these points could be importance sampled but did not provide implementation details. More recently, Walter et al. [2012] and Christensen et al. [2012] proposed other sampling methods which can still suffer from excessive variance. P N Rm r P hit Figure 2: Geometric setup for Equation 1. Disk based sampling Our approach uses a disk distribution of samples which we project against the surface geometry using probe rays. We bound the radial term of the BSSRDF with a maximum distance Rm to define a bounding sphere around the shading point P. We cast probe rays against this sphere along an axis V perpendicular to the disk and compute the incoming irradiance at all intersection points we find inside the sphere. The contribution of each point is modulated by: R d (kP hit - Pk) pdf disk (r) 1 |V · N hit | (1) which accounts for the probability of generating the point, the change in differential area measure and the BSSRDF itself. We omit the view-dependent terms here for simplicity. We choose the pdf to be proportional to R d , as for flat surfaces this results in perfect importance sampling. We have developed equations for both cu- bic and gaussian profiles. For a single planar gaussian defined as R d (r) = (2πv) -1 e -r 2 /2v , we use the following normalized pdf and warping equation to get r [0,Rm) from a random sample ξ [0, 1): pdf disk (r) = R d (r) / 1 - e -R 2 m /2v r(ξ) = q -2v log ( 1 - ξ ( 1 - e -R 2 m /2v )) The angle around the disk is chosen uniformly. We found Rm = p v/12.46 to be a reasonable compromise between accuracy and speed. Axis and Weight Multiple Importance Sampling Equation 1 will lead to high variance in regions of high curvature, or around sharp corners, because the dot product in the denominator can be- come arbitrarily small. In fact areas perpendicular to the disk may not be hit at all! To compensate for this, we randomly choose the axis V among the three coordinate axes of the local shading frame: N, B, T. When computing the contribution of each hit point, we account for the probability of having found the same point along the two other axes by multiple importance sampling. Since the three axes form an orthonormal basis, the denominator can never become small which ensures more uniform variance over the surface. The resulting improvement is shown in Figure 1(b). For realistic material modelling, the BSSRDF is usually a weighted sum of multiple gaussians with unique variances and weights per color channel [D’Eon and Irving 2011]. In skin for example, red light scatters much further than in the other channels. We apply importance sampling to combine all gaussian distributions per color channel by their weight via Veach’s one-sample MIS model, which significantly reduces the noise of complex profiles. This improve- ment is shown in Figure 1(d). As our method is dominated by the cost of tracing the probe rays, the increased complexity of the weight calculation does not affect the overall speed. Discussion We implemented this technique in the Arnold ren- derer where it has replaced a much more complicated implementa- tion based around point clouds. The new algorithm is much easier to control for artists, has no memory overhead, is trivially parallelizable, and handles recursive effects without the need for multiple passes. Another benefit is that tight diffusion kernels can be used without penalty, while point cloud based methods must ensure a minimum spacing close to the mean-free path or suffer loss of detail. References CHRISTENSEN, P. H., HARKER, G., SHADE, J., SCHUBERT, B., AND BATALI , D. 2012. Multiresolution radiosity caching for global illumination in movies. SIGGRAPH 2012 Talks. D’EON, E., AND I RVING, G. 2011. A quantized-diffusion model for rendering translucent materials. SIGGRAPH 2011. J ENSEN, H. W., MARSCHNER, S. R., LEVOY, M., AND HANRA- HAN, P. 2001. A practical model for subsurface light transport. SIGGRAPH 2001. WALTER, B., KHUNGURN, P., AND BALA, K. 2012. Bidirectional lightcuts. SIGGRAPH 2012.

Upload: others

Post on 30-Sep-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: BSSRDF Importance Samplinglibrary.imageworks.com/pdfs/imageworks-library-BSSRDF-sampling.pdf · v=12:46 to be a reasonable compromise between accuracy and speed. Axis and Weight Multiple

Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for third-party components of this work must be honored. For all other uses, contact the Owner/Author. SIGGRAPH 2013, July 21 – 25, 2013, Anaheim, California. 2013 Copyright held by the Owner/Author. ACM 978-1-4503-2261-4/13/07

BSSRDF Importance Sampling

Alan KingSolid Angle

Christopher KullaSony Pictures Imageworks

Alejandro ContySony Pictures Imageworks

Marcos FajardoSolid Angle

(a) (b) (c) (d)

Figure 1: Simple BSSRDF without (a) and with (b) axis MIS (25 spp). Complex BSSRDF without (c) and with (d) weight MIS (16 spp).

Light propagation within translucent materials can be described bya BSSRDF [Jensen et al. 2001]. The main difficulty in integratingthis effect lies in the generation of well-distributed samples on thesurface within the support of the rapidly decaying BSSRDF profile.Jensen suggested that these points could be importance sampled butdid not provide implementation details. More recently, Walter etal. [2012] and Christensen et al. [2012] proposed other samplingmethods which can still suffer from excessive variance.

P

N

Rm

r

Phit

Figure 2: Geometric setup for Equation 1.

Disk based sampling Our approach uses a disk distribution ofsamples which we project against the surface geometry using proberays. We bound the radial term of the BSSRDF with a maximumdistanceRm to define a bounding sphere around the shading point P.We cast probe rays against this sphere along an axis V perpendicularto the disk and compute the incoming irradiance at all intersectionpoints we find inside the sphere. The contribution of each point ismodulated by:

Rd (‖Phit −P‖)pdfdisk (r)

1

|V ·Nhit|(1)

which accounts for the probability of generating the point, the changein differential area measure and the BSSRDF itself. We omit theview-dependent terms here for simplicity. We choose the pdf tobe proportional to Rd, as for flat surfaces this results in perfectimportance sampling. We have developed equations for both cu-bic and gaussian profiles. For a single planar gaussian defined asRd(r) = (2πv)−1 e−r2/2v , we use the following normalized pdfand warping equation to get r ∈ [0, Rm) from a random sampleξ ∈ [0, 1):

pdfdisk(r) = Rd (r) /(1− e−R2

m/2v)

r(ξ) =√−2v log

(1− ξ

(1− e−R2

m/2v))

The angle around the disk is chosen uniformly. We found Rm =√v/12.46 to be a reasonable compromise between accuracy and

speed.

Axis and Weight Multiple Importance Sampling Equation 1will lead to high variance in regions of high curvature, or aroundsharp corners, because the dot product in the denominator can be-come arbitrarily small. In fact areas perpendicular to the disk maynot be hit at all! To compensate for this, we randomly choose theaxis V among the three coordinate axes of the local shading frame:N,B,T. When computing the contribution of each hit point, weaccount for the probability of having found the same point along thetwo other axes by multiple importance sampling. Since the threeaxes form an orthonormal basis, the denominator can never becomesmall which ensures more uniform variance over the surface. Theresulting improvement is shown in Figure 1(b).

For realistic material modelling, the BSSRDF is usually a weightedsum of multiple gaussians with unique variances and weights percolor channel [D’Eon and Irving 2011]. In skin for example, redlight scatters much further than in the other channels. We applyimportance sampling to combine all gaussian distributions per colorchannel by their weight via Veach’s one-sample MIS model, whichsignificantly reduces the noise of complex profiles. This improve-ment is shown in Figure 1(d). As our method is dominated by thecost of tracing the probe rays, the increased complexity of the weightcalculation does not affect the overall speed.

Discussion We implemented this technique in the Arnold ren-derer where it has replaced a much more complicated implementa-tion based around point clouds. The new algorithm is much easier tocontrol for artists, has no memory overhead, is trivially parallelizable,and handles recursive effects without the need for multiple passes.Another benefit is that tight diffusion kernels can be used withoutpenalty, while point cloud based methods must ensure a minimumspacing close to the mean-free path or suffer loss of detail.

References

CHRISTENSEN, P. H., HARKER, G., SHADE, J., SCHUBERT, B.,AND BATALI, D. 2012. Multiresolution radiosity caching forglobal illumination in movies. SIGGRAPH 2012 Talks.

D’EON, E., AND IRVING, G. 2011. A quantized-diffusion modelfor rendering translucent materials. SIGGRAPH 2011.

JENSEN, H. W., MARSCHNER, S. R., LEVOY, M., AND HANRA-HAN, P. 2001. A practical model for subsurface light transport.SIGGRAPH 2001.

WALTER, B., KHUNGURN, P., AND BALA, K. 2012. Bidirectionallightcuts. SIGGRAPH 2012.