570 likes | 699 Views
A Practical Analytic Single Scattering Model for Real Time Rendering. Bo Sun Columbia University Ravi Ramamoorthi Columbia University Srinivasa Narasimhan Carnegie Mellon University Shree Nayar Columbia University.
E N D
A Practical Analytic Single Scattering Model for Real Time Rendering Bo Sun Columbia University Ravi Ramamoorthi Columbia University Srinivasa Narasimhan Carnegie Mellon University Shree Nayar Columbia University Sponsors: ONR, NSF
Scattering in Participating Media Loss of contrast
Scattering in Participating Media Dimming and blur Loss of contrast
Scattering in Participating Media Glows Dimming and blur Lost of contrast
Direct Transmission Light Transport in Clear Day Point Source Viewer Surface Point
Scattered (glows) Direct Transmission Light Transport in Scattering Media Point Source Viewer Surface Point Clear Day Foggy Day Clear Day Foggy Day
Complexity of Rendering Scattering Media Objects Virtual Viewpoint Virtual Screen
Complexity of Rendering Scattering Media Objects Virtual Viewpoint Virtual Screen
Complexity of Rendering Scattering Media Objects Virtual Viewpoint Virtual Screen
Complexity of Rendering Scattering Media Objects Virtual Viewpoint Virtual Screen 640 x 480 (image) x 4 (lights) x [ 50 (steps) + 100 ( directions ) x 50 (steps)] x 30 (intersect) = ? 1.9 Trillion Calculations 3.0 GHz CPU?
Previous Work • Monte Carlo Ray Tracing Methods [Kajiya and Herzen 1984], [Max et al. 1994]… - Impressive effects, but slow Accuracy Speed
Previous Work • Monte Carlo Ray Tracing Methods [Kajiya and Herzen 1984], [Max et al. 1994]… - Impressive effects, but slow • Hardware-accelerated Numerical Methods [ Dobashi et al. 2002 ], [ Riley et al. 2004 ] …. - Specialized for skies or clouds and Expensive precomputation • - No effects of scattering on surface radiance Accuracy Speed
Previous Work • Monte Carlo Ray Tracing Methods [Kajiya and Herzen 1984], [Max et al. 1994]… - Impressive effects, but slow • Hardware-accelerated Numerical Methods [ Dobashi et al. 2002 ], [ Riley et al. 2004 ] …. - Specialized for skies or clouds and Expensive precomputation • - No effects of scattering on surface radiance • Glows around point sources [ Max et al. 1986 ], [ Biri et al. 2004 ]… • - Approximations which are not feasible in many cases • - Not extendable to surface radiance and complex lighting Accuracy Speed
Our Technical Contributions • Explicit compact Airlight formula • Explicit Surface Radiance formula - Accurate - Simple fragment shader - Fully interactive Assumptions: • Isotropic point light sources • Homogenous media • Single scattering • No volumetric shadows
The Airlight Integral Point Source, s : scattering coefficient of the medium Surface Point, p Viewer, v
The Airlight Integral Point Source, s : scattering coefficient of the medium Surface Point, p Viewer, v
The Airlight Integral Point Source, s : scattering coefficient of the medium Surface Point, p Viewer, v
The Airlight Integral Point Source, s : scattering coefficient of the medium Surface Point, p Viewer, v
The Airlight Integral Point Source, s : scattering coefficient of the medium Surface Point, p Viewer, v
The Airlight Integral Point Source, s : scattering coefficient of the medium Surface Point, p Viewer, v
The Airlight Integral Point Source, s : scattering coefficient of the medium Surface Point, p Viewer, v
The Airlight Integral 4D: We want: - Low dimensional tabulation and cheap evaluation - Interactively change physical parameters
- combine and - combine and The Airlight Model-Solution 4D:
- combine and - combine and The Airlight Model-Solution 4D:
- combine and - combine and The Airlight Model-Solution 4D: 2D
Special Function F • Well behaved and purely numerical 2D function. • Independent of the scene. • Evaluate once for all and stored as a 2D texture.
Our Compact Airlight Formula 2D: • Compact 2D representation. • Real time cheap evaluation. • Arbitrarily change physical parameters. • Fully interactive
Our Compact Airlight Formula 2D: • Compact 2D representation. • Real time cheap evaluation. • Arbitrarily change physical parameters. • Fully interactive
Our Compact Airlight Formula 2D: • Compact 2D representation. • Real time cheap evaluation. • Arbitrarily change physical parameters. • Fully interactive
Our Compact Airlight Formula 2D: • Compact 2D representation. • Real time cheap evaluation. • Arbitrarily change physical parameters. • Fully interactive
Comparison with Monte Carlo simulation Low RMS error shows our model is physically accurate
Video: Glows Video clip 1
BRDF Light Transport Revisited Point Source, s Viewer, v Surface Point, p
Lambertian and Phong Spheres Clear Day Lambertian Phong=10 Phong=20 Foggy Day
: , 2D 1D function on : Lambertian, Phong 2D: The Surface Radiance Model Point Source, s BRDF Viewer, v Surface Point, p
Video: Diffuse and Glossy Shading Video clip 2
2 Lookups and 2 Lookups The Complete Model Surface Radiance Model Airlight Model
2 Lookups and 2 Lookups 15 Million VS 1.9 Trillion Image size Lights Terms to approximate the phase function = 5 Million = 10 Million The Complete Model Surface Radiance Model Airlight Model Texture lookups Analytic expression
Snap Shot of Shader Code float AirLight( ) { float u = A1(beta, Dsv, gammasv); float v1 = 0.25*PI+0.5*atan((DvpDsv*cos(gammasv))/(Dsv*sin(gammasv))); float v2 = 0.5*gammasv; float4 f_1=texRECT(F, v1, u); float4 f_2=texRECT(F, v2, u); return A0(lightIntensity, beta, Dsv, gammasv)*(f_1.x-f_2.x); } float SurfaceRadiance( ) { float4 G = texRECT(G_20, Tsp, thetas); return Ks*Io*beta/(2*Dsp*PI)*G; }
Video: Complex Geometry Video clip 3
For Live Demo, please visit sketch at 10:30am, Patree Hall A.
BRDF Complex Lighting and Materials • Rendering time is linear in the number of lights. Viewer, v Surface Point, p
Intensity Angles Point Spread Function • Equidistant point sources • Scattering is essentially Point Spread Function (PSF). [Narasimhan and Nayar 2003], [Premoze et al. 2004]… Input Output PSF
Intensity Angles Complex Materials Effective BRDF with Scattering BRDF PSF Clear Day Foggy Day
Intensity Angles Environment Maps Lighting Foggy Lighting PSF Clear Day Foggy Day
PSF for Complex Lighting and Material Video clip 4 and 5