840 likes | 856 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
Glows Scattering in Participating Media
Direct Transmission Light Transport in Clear Day Point Source Viewer Surface Point
Scattered (glows) Light Transport in Scattering Media Point Source Direct Transmission Viewer Surface Point Clear Day Foggy Day Clear Day Foggy Day
Hard to Render Scattering Media Objects Virtual Viewpoint Virtual Screen
Hard to Render Scattering Media Objects Virtual Viewpoint Virtual Screen
Hard to Render Scattering Media Objects Virtual Viewpoint Virtual Screen
Hard to Render 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-Numerical • Monte Carlo Ray Tracing Methods [Kajiya and Herzen 1984], [Max 1994], [Jensen 2001]… Impressive effects, but slow
Our Practical Contributions • Explicit compact airlight and surface radiance formula • Simple fragment shader • Need only specify one parameter-fog density • Fully interactive
Hard to Render Scattering Media Objects Virtual Viewpoint Virtual Screen
Previous Work-Numerical • Hardware-accelerated Numerical Methods [ Dobashi et al. 2002 ], [ Riley et al. 2004 ], [ Harris and Lastra 2001] …. - Specialized for skies or clouds - Expensive pre-computation for each scene • - Quality limited by sampling plane • - Does not handle effects of scattering on surface radiance
Inside Media Previous Work-Analytical • Subsurface scattering, airlight with directional light [ Stam 1995 ], [ Jensen et al. 2001], [ Hanrahan et al. 1993] Quite different problems…
Previous Work-Analytical • Subsurface scattering, airlight with directional light [ Stam 1995 ], [ Jensen et al. 2001], [ Hanrahan et al. 1993] Quite different problems… • Glows around point sources [ Max 1986 ], [ Biri 2004 ], [ Narasimhan and Nayar 2003]… • - Not extendable to surface radiance and complex lighting • - Severe approximations which are not feasible in many cases.
Assumptions Assumptions: • Isotropic point light sources • Homogenous media (need only specify the density of the media) • Single scattering • No volumetric shadows
: scattering coefficient of the medium The Airlight Integral Point Source, s Surface Point, p Viewer, v The Airlight Integral:
: scattering coefficient of the medium The Airlight Integral Point Source, s Surface Point, p Viewer, v The Airlight Integral:
: scattering coefficient of the medium The Airlight Integral Point Source, s Surface Point, p Viewer, v The Airlight Integral:
: scattering coefficient of the medium The Airlight Integral Point Source, s Surface Point, p Viewer, v The Airlight Integral:
: scattering coefficient of the medium The Airlight Integral Point Source, s Surface Point, p Viewer, v The Airlight Integral:
: scattering coefficient of the medium The Airlight Integral Point Source, s Surface Point, p Viewer, v The Airlight Integral:
The Airlight Model-Solution 4D: -> - combine dependence on and 3D: -> - combine dependence on and
The Airlight Model-Solution 4D: -> - combine dependence on and 3D: -> - combine dependence on and 2D
Special Function F • Well behaved and purely numerical 2D function. • Pre-computed once for a life time and stored as a 2D texture. (downloadable from website) • Full Interactivity (lights, view, geometry, medium)
Point Source, s Originally 4D: , , , Surface Point, p Viewer, v The Airlight Model
Point Source, s Originally 4D: , , , Surface Point, p Viewer, v The Airlight Model
Point Source, s Originally 4D: , , , Surface Point, p Viewer, v The Airlight Model
Video: Glows Video clip 1
Point Source, s BRDF Viewer, v Surface Point, p Light Transport Revisited
Lambertian and Phong Spheres Clear Day Lambertian Phong=10 Phong=20 Foggy Day
2D: Lambertian 2D: 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
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 2 Lookups and 2 Lookups Texture lookups Analytic expression
Video: Complex Geometry Video clip 3
BRDF Complex Lighting and Material • Rendering time is linear in the number of lights. What about complex Lighting and arbitrary BRDFs? Viewer, v Surface Point, p
Intensity Intensity Intensity Angles PSF Angular Component Amplitude Component Angles Point Spread Function • Assume equidistant point sources • Scattering is essentially Point Spread Function (PSF). • Change the medium parameters interactively.
Complex Materials • Convolution with arbitrary tabulated BRDFs in the frequency domain using spherical harmonics to get effective BRDFs. • Use effective BRDFs like how you use conventional BRDFs! Clear Day Foggy Day
Environment Maps • Real-time environment mapping methods with fog • Integration with methods like Precomputed Radiance Transfer. Clear Day Foggy Day
PSF for Complex Lighting and Material Video clip 4 and 5
Summary An OpenGL-Like Practical Real-Time Rendering Technique: • Analytic Airlight Model 20fps 20fps
Summary An OpenGL-Like Practical Real-Time Rendering Technique: • Analytic Airlight Model • Analytic Surface Radiance Model 30fps 40fps
Summary An OpenGL-Like Practical Real-Time Rendering Technique: • Analytic Airlight Model • Analytic Surface Radiance Model • PSF for Complex Lighting and Natural Material 100fps 20fps
Acknowledgement • We thank R. Wang, J. Tran and D. Luebke for the PRT code. • We thank S. Premoze for the Monte Carlo simulation code. • We thank anonymous reviewers for the comments. • Supported by a Columbia University Presidential Fellowship, an ONR Grant, an NSF Grant, an NSF CAREER award, and equipment donations from Intel and NVIDIA.
Thanks for Listening! 2D tables, prefiltered environment maps and shader code: http://www.cs.columbia.edu/~bosun/research.htmbosun@cs.columbia.edu