BSSRDF

Duan gao

bssrdf
Bunny rendered by my own renderer Elegans.

BSSRDF aims to simulate volume scatterings using simplified assumption.

Separate BSSRDF

Split the BSSRDF into 3 parts: (Eq 11.7 in PRRT-v3)

About c (normalized factor),

And assume the is only related to :

 

And the render equation:

Next I will introduce of normalized diffusion BSSRDF model and how to important sampling this BSSRDF.

 

Normalized diffusion BSSRDF

The key idea is using Exp function to approximate (including single-scattering and multiple-scattering).

(define ):

[1] Christensen P H. An approximate reflectance profile for efficient subsurface scattering[C]//ACM SIGGRAPH 2015 Talks. ACM, 2015: 25.

https://graphics.pixar.com/library/ApproxBSSRDF/paper.pdf

[2] Jensen H W, Marschner S R, Levoy M, et al. A practical model for subsurface light transport[C]//Proceedings of the 28th annual conference on Computer graphics and interactive techniques. ACM, 2001: 511-518.

https://http://graphics.stanford.edu/papers/bssrdf/bssrdf.pdf

 

Importance Sampling BSSRDF

There are two main approaches to implement BSSRDF model in physically based renderer.

In the normalized diffusion BSSRDF model implementation, I use the second approach.

1. Sample BSSRDF and corresponding pdf

It is nontrivial to sample a neighborhood point of based on profile .

1.1 Basic disk-based BSSRDF sampling

In the disk based sampling strategy, we map the 1D profile to 3D point in the surface geometry.

The key idea is :

1.2 Axis and channels sampling

Using normal vector as the axis will lead to high variance in some sharp corners. (due to the dot product of and will be very small (close to zero)) :

1567512217208

The solution is picking z axis from randomly .

For the channels, each channels may have different profiles, so we can also randomly pick one channel from R,G,B.

Now the contribution of each sample is () :

For the axis and channel sampling, we use MIS to combine them (regarding each axis and channel as one sampling strategy):

Recall the MIS:

and .

=>

 

1.3 Sampling scheme (NormalizedDiffusionBSSRDF::Sample)

 

For , it is already considered in the BRDF (glass material). It is the pdf of transmit and only need to consider BSSRDF in this case.

 

For , it is considered in , which is called in NormalizedDiffusionAdaptor::Eval()

 

1.4 Pdf of above sampling (NormalizedDiffusionBSSRDF::Pdf_Sample)

For n sample strategies, the estimator is:

So the total pdf is (the pdf of all strategies).

For each , ( )

is trivial to evaluate, will be introduced in next part.

 

2. Sample and

How to sample from profile?

Recall Monte Carlo estimator for is ,

And the PDF should satisfies:

Inversion method to sample from :

  1. compute CDF:
  2. inverse of CDF:
  3. uniform random number

Recall :

satisfies: (integration in polar coordinates is always 1)

So the desired PDF is proportional to .

Assume ,

So the PDF is

And the CDF is:

However, the CDF is not analytically invertible.

 

There are too methods to solve this problem.

  1. We can use MIS to sample the 2 exp term separately:

    • Strategy 1(for first exp term)

      Assume the PDF is

      So the PDF is

      CDF is:

      :

    • Strategy 2 (for second exp term)

      Assume the PDF is

      So the PDF is

      CDF is:

      :

  2. Precompute the when , and multiply d in rendering.

    :

    Sample : (precompute )

    given random variable :

    • locate in array.
    • Linear interpolate two neighborhood.
    • multiply d.

    Pdf: just return .

 

[1] Christensen P H. An approximate reflectance profile for efficient subsurface scattering[C]//ACM SIGGRAPH 2015 Talks. ACM, 2015: 25.

https://graphics.pixar.com/library/ApproxBSSRDF/paper.pdf

[2]King A, Kulla C, Conty A, et al. BSSRDF importance sampling[C]//ACM SIGGRAPH 2013 Talks. ACM, 2013: 48.

http://www.aconty.com/pdf/bssrdf.pdf

[3] http://shihchinw.github.io/2015/10/bssrdf-importance-sampling-of-normalized-diffusion.html

 

Combining BSSRDF in path tracing

1567661953093

[1] https://github.com/mmp/pbrt-v3/issues/19