Today Rendering Algorithms: Participating Media and Subsurface Scattering Introduction Rendering participating media Rendering subsurface scattering Spring 2009 Matthias Zwicker Participating media Participating media So far: light reflection on surfaces, BRDFs What about interaction of light with volumetric media? Also called scattering media Participating media Applications Clouds, smoke, water, fire, Paint, skin, Scientific/medical volume visualization (CT, MRI, etc.) 1
Participating media Before: Radiance along straight rays through volume is constant Participating media: volumetric media influence radiance along rays What are types of interaction between media and light rays? Participating media Topics Absorption, out-scattering, in-scattering, emission Phase functions Volume rendering equation Ray tracing volumes Absorption/emission Single scattering Absorption Out-scattering Absorption coefficient Material property Also called absorption cross section Rate of absorption Probability per unit length that photon is absorbed Scattering coefficient (or cross section) Rate of being scattered Probability per unit length that photon is scattered into different direction Extinction Extinction Extinction: sum of absorption and outscattering Extinction coefficient [Pharr, Humphreys] 2
Transmittance Fraction of light transported over a certain distance along a ray Transmittance Multiplicative property Homogeneous media Optical thickness Transmittance Beer s law In-scattering Incoming light from all directions that is scattered into one given direction Phase functions Phase function is probability that incoming light from direction is scattered into direction Phase function Expressed using phase angle Isotropic Phase functions: examples Blue sky, red sunset Rayleigh scattering: scattering from particles smaller than wavelength of light For example, molecules in atmosphere Details see, e.g., wikipedia Mie (Lorenz-Mie) theory: scattering by spherical particles (Mie scattering) [Greenler] 3
Henyey-Greenstein phase function Empirical phase function Useful for many phenomena (water, clouds, skin, stone) Phase functions: properties Unitless Reciprocity Average phase angle, asymmetry parameter Energy conservation Backward scattering Forward scattering Amount of scattering is controlled by The volume rendering equation Integro-differential form Describes change of raradiance along a ray Integro-integral form Describes radiance arriving at a point along a ray The volume rendering equation Full solution is very expensive to compute, intractable for complicated scenes Rendering with simplified models Most common approximations Emission/absorption only Single scattering Extinction (absorption, out-scattering) Source (emission, in-scattering) Absorption/emission only No in-scattering Ray marching Approximation of integral Volume emission Remember transmittance Uniformly distributed samples 4
Ray marching Incremental computation of transmittance Ray marching T = 1 L = 0 ds = (s_out s_in) / N for( s = s_ in; s <= s_ out; s += ds ) { L = L + T * L_ve T = T * ( 1 sigma_t(s) * ds) } L = L * ds Absorption/emission only Volume visualization [Pharr, Humphreys] Visualize scalar data on volumetric grid CT, MRI scans, Scalar data represents some physical property of a material il Medical/industrial applications Transfer function assigns color/opacity value to each scalar value Volume visualization Volume rendering: ray marching/ray casting as described before Single scattering Include in-scattering of incident radiance due to direct illumination In-scattering, Direct illumination from light sources Phase function Scattering coefficient 5
Single scattering Direct illumination needs to be attenuated Shoot shadow rays Shadow rays T = 1 dt = t_out t_in / N for( t = t_in; t <= t_out; t += dt ) { T = T * ( 1 sigma _ t(t) ) * dt } L_d = T * L_s // L_s: light source S = sigma_s * p * L_d // p: phase function Single scattering Beams of light [Greenler] [Pharr, Humphreys] [Minneart] Multiple scattering Path tracing, very slow Photon mapping Efficient Simulation of Light Transport in Scenes with Participating Media using Photon Maps, Jensen, Christensen Realistic Image Synthesis using Photon Mapping, Jensen Photon mapping Volume caustics [Jensen] 6
Same physical phenomon as before Different approximation for specific materials Highly scattering Different rendering algorithms Could render using brute force Monte Carlo path tracing Very expensive Idea: describe scattering properties of material using an extension of BRDFs So far: BRDFs, light scatters exactly at the same point where it hits the surface : light enters the material, bounces around, leaves at a different place BSSRDF: bidirectional surface scattering reflectance distribution function BRDF BSSRDF BSSRDF has 8 degrees of freedom (2 positions, 2 orientations) Hard to capture in the general case Impractical to store in a table Diffusion approximation Light distribution in highly scattering media tends to become isotropic Define a simple, analytic diffuse BSSRDF that approximates subsurface scattering Express scattering as function of distance between entry and exit points Diffusion approximation Approximation known as dipole model [Jensen et al.] Diffusion profile 7
BSSRDF BRDF BRDF BSSRDF Monte Carlo simulation [Jensen et al.] [Jensen et al.] Efficient rendering A Rapid Hierarchical Rendering Technique for Translucent Materials, Jensen, Buhler http://graphics.ucsd.edu/~henrik/papers/fast_bssrdf/fast_bssrdf.pdf Two pass approach First, compute irradiance at a set of surface points Second, evaluate diffuse BSSRDF by gathering irradiance samples Use efficient hierarchical scheme Efficient rendering Irradiance gathering using the diffuse BSSRDF Irradiance sample Reflected radiance Efficient rendering Irradiance samples Efficient rendering Global illumination and subsurface scattering Final image [Jensen, Buhler] [Jensen, Buhler] 8
Next time Camera models and tone mapping 9