Thursday, January 22, 2015

BSSRDF Importance Sampling 1 - Kickoff

Recently I start to put in subsurface scattering into my personal side project, and there are some quite fun thoughts and learning experience during the research/implementation time. I decide to write it down as memo and documentation. The following few posts are most likely surround on this topic :)

Why subsurface scattering? Simply feel it looks really cool :P the warm and rich color tone rendered from light bouncing beneath the surface is really different from the regular BRDF material. Theoretically, all material in world is actually BSSRDF instead of BRDF, but BRDF do a good job on approximating those surface light didn't penetrate "deep enough". It would be cool, if I can start to render out some non metal/plastic material, something organic! that's pretty much the original motivation.

After some homework research (mainly the legendary Jensen 01, 02 and Donner's 06 thesis), question pop up: which way should I use? Both Pixar and DreamWorks seems using Jensen 02's point cloud approach from interview and paper release (and my personal working experience= =||), but thinking about managing point cloud and a pre-pass before rendering kinda give me a uncomfortable feeling. Part of my daily job is troubleshooting point cloud artifact and managing its gigantic space usage, and thinking about dealing with it at home after work just feel... not really good....Phar 00's Monte Carlo approach sounds like the most "righteous" method, but it also sounds brutally hardcore :| Jensen 01's Monte Carlo disc sampling sounds like the most straightforward method compare to the previous two...

How about Arnold? The most bad ass MCRT player in the industry at this moment, which method are they using? I googled "Arnold subsurface scattering", then this super awesome slide immediately pop into my eyes!@@ After reading the slides, I felt pretty excited: Cool! They are also using the Jensen 01 approach. Furthermore, the multiple importance sampling method they propose looks brilliant and doesn't seem to be really hard to implement. Alright! I am gonna do thing this way!

nothing relate to SSS in this video actually, but Arnold is kicking some serious ass with EPIC meal time and the awesome sandwich!


Now it's TODO list:

1. I need to have a BSSRDF class pack in relative texture info(absorb, scatter coefficient, refraction index and phase coefficient for single scattering), it should also encapsulate the BSSRDF dipole approximation evaluation.

2. I need one separate BSSRDF integration since the current BRDF integration is apparently doesn't fit with BSSRDF (For direct lighting, BSSRDF needs four dimensional integration on surface area and half sphere solid angle for irradiance, while BRDF only evaluate the later part since all things happen in one intersection point)

3. I need to do importance sampling in 2D with exponential falloff, which is what Jensen01 mentioned and sounds right (it does look like the dominant factor in that dipole equation) and 1D exponential falloff (for single scattering part, this should be pretty straightforward)

4. Figure out the Rmax probe radius that Solid Angle mentioned in above SIGGRAPH13 talk, randomly pick up the probe axis with N:U:V = 2:1:1 ratio they suggested.

5. Implement the multiple scattering part with dipole diffusion approximation (ingredients are listed in the first 4 steps), then combine the sample with multiple importance sampling

6. Implement single scattering part based on Jensen01, Hery03 offered some pseudo code for this, should be straightforward.

And here's the paper references:

BSSRDF Importance Sampling : really brilliant MIS approach for variance noise on complex geometry

A Practical Model For Subsurface Light Transport : the basic implementation I did is a step by step go through on this paper

Implement a Skin BSSRDF (or several) : very throughout tutorial with pseudo code, clarify lots of my unclear thoughts on Jensen01

Towards Realistic Image Synthesis of Scattering Materials : this one got a full derivation of dipole diffusion approximation, and ya....it has some really intense math...

A Rapid Hierarchical Rendering For Translucent Material : the classic point cloud approach that Pixar and DreamWorks use (I believe)

Physically Based Rendering : the ultimate offline rendering strategy guide, though the method in the codebase is based on Jensen 02 approach

Monte Carlo Evaluation on Non-Linear Scattering Equations for Subsurface Reflection : just a really brief and quick pass, but this should be the most physically accurate method (and the slowest...)



No comments:

Post a Comment