Real-Time Rendering and Interaction with Complex Lighting and Materials Ravi Ramamoorthi Rendering Laboratory Columbia University Intel: August 13, 2004.

Slides:



Advertisements
Similar presentations
All-Frequency PRT for Glossy Objects Xinguo Liu, Peter-Pike Sloan, Heung-Yeung Shum, John Snyder Microsoft.
Advertisements

Precomputed Radiance Transfer
Environment Mapping CSE 781 – Roger Crawfis
Real-Time High Quality Rendering CSE 291 [Winter 2015], Lecture 3 Shadow and Environment Mapping
Spherical Convolution in Computer Graphics and Vision Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University SIAM Imaging Science Conference:
Spherical Harmonic Lighting of Wavelength-dependent Phenomena Clifford Lindsay, Emmanuel Agu Worcester Polytechnic Institute (USA)
3D Graphics Rendering and Terrain Modeling
Light Fields PROPERTIES AND APPLICATIONS. Outline  What are light fields  Acquisition of light fields  from a 3D scene  from a real world scene 
Advanced Computer Graphics
Advanced Computer Graphics (Fall 2009) CS 294, Rendering Lecture 7: High Quality Real-Time Rendering Ravi Ramamoorthi
Rendering with Environment Maps Jaroslav Křivánek, KSVI, MFF UK
A Signal-Processing Framework for Inverse Rendering Ravi Ramamoorthi Pat Hanrahan Stanford University.
PRT Summary. Motivation for Precomputed Transfer better light integration and light transport –dynamic, area lights –shadowing –interreflections in real-time.
Precomputed Local Radiance Transfer for Real-time Lighting Design Anders Wang Kristensen Tomas Akenine-Moller Henrik Wann Jensen SIGGRAPH ‘05 Presented.
Master Thesis Lighting and materials for real-time game engines
A Signal-Processing Framework for Forward and Inverse Rendering COMS , Lecture 8.
An Efficient Representation for Irradiance Environment Maps Ravi Ramamoorthi Pat Hanrahan Stanford University.
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 18: Precomputation-Based Real-Time Rendering Ravi Ramamoorthi
Real-Time Rendering COMS , Lecture 9. Real-Time Rendering Demo Motivation: Interactive rendering with complex natural illumination and realistic,
Computational Fundamentals of Reflection COMS , Lecture
Advanced Computer Graphics (Fall 2009) CS , Lecture 1: Introduction and History Ravi Ramamoorthi Some.
A Signal-Processing Framework for Forward and Inverse Rendering Ravi Ramamoorthi Ravi Ramamoorthi
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 16: Image-Based Rendering and Light Fields Ravi Ramamoorthi
Direct-to-Indirect Transfer for Cinematic Relighting Milos Hasan (Cornell University) Fabio Pellacini (Dartmouth College) Kavita Bala (Cornell University)
A Signal-Processing Framework for Forward and Inverse Rendering Ravi Ramamoorthi Ph.D. Orals: June 3, 2002.
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 10: Global Illumination Ravi Ramamoorthi Some images courtesy.
Final Gathering on GPU Toshiya Hachisuka University of Tokyo Introduction Producing global illumination image without any noise.
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 17: Frequency Analysis and Signal Processing for Rendering Ravi Ramamoorthi
Real-Time High Quality Rendering COMS 6160 [Fall 2004], Lecture 4 Shadow and Environment Mapping
Image-based Rendering of Real Objects with Complex BRDFs.
Jiaping Wang 1 Peiran Ren 1,3 Minmin Gong 1 John Snyder 2 Baining Guo 1,3 1 Microsoft Research Asia 2 Microsoft Research 3 Tsinghua University.
Real-Time High Quality Rendering COMS 6160 [Fall 2004], Lecture 1 Ravi Ramamoorthi
Exploiting Temporal Coherence for Incremental All-Frequency Relighting Ryan OverbeckRavi Ramamoorthi Aner Ben-ArtziEitan Grinspun Columbia University Ng.
Real-Time High Quality Rendering COMS 6160 [Fall 2004], Lecture 3 Overview of Course Content
A Theory of Locally Low Dimensional Light Transport Dhruv Mahajan (Columbia University) Ira Kemelmacher-Shlizerman (Weizmann Institute) Ravi Ramamoorthi.
A Signal-Processing Framework for Forward and Inverse Rendering Ravi Ramamoorthi Stanford University Columbia University: Feb 11, 2002.
Face Relighting with Radiance Environment Maps Zhen Wen 1, Zicheng Liu 2, Thomas Huang 1 Beckman Institute 1 University of Illinois Urbana, IL61801, USA.
Real-Time High Quality Rendering CSE 291 [Winter 2015], Lecture 6 Image-Based Rendering and Light Fields
Titre.
Pre-computed Radiance Transfer Jaroslav Křivánek, KSVI, MFF UK
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Advanced Computer Graphics (Spring 2013) CS 283, Lecture 15: Image-Based Rendering and Light Fields Ravi Ramamoorthi
Efficient Irradiance Normal Mapping Ralf Habel, Michael Wimmer Institute of Computer Graphics and Algorithms Vienna University of Technology.
Jonathan M Chye Technical Supervisor : Mr Matthew Bett 2010.
Sebastian Enrique Columbia University Relighting Framework COMS 6160 – Real-Time High Quality Rendering Nov 3 rd, 2004.
Real-Time Rendering Digital Image Synthesis Yung-Yu Chuang 01/03/2006 with slides by Ravi Ramamoorthi and Robin Green.
An Efficient Representation for Irradiance Environment Maps Ravi Ramamoorthi Pat Hanrahan Stanford University SIGGRAPH 2001 Stanford University SIGGRAPH.
Real-Time Relighting Digital Image Synthesis Yung-Yu Chuang 1/10/2008 with slides by Ravi Ramamoorthi, Robin Green and Milos Hasan.
Real-time Shading with Filtered Importance Sampling Jaroslav Křivánek Czech Technical University in Prague Mark Colbert University of Central Florida.
View-Dependent Precomputed Light Transport Using Nonlinear Gaussian Function Approximations Paul Green 1 Jan Kautz 1 Wojciech Matusik 2 Frédo Durand 1.
Lighting affects appearance. How do we represent light? (1) Ideal distant point source: - No cast shadows - Light distant - Three parameters - Example:
Tone Mapping on GPUs Cliff Woolley University of Virginia Slides courtesy Nolan Goodnight.
All-Frequency Shadows Using Non-linear Wavelet Lighting Approximation Ren Ng Stanford Ravi Ramamoorthi Columbia SIGGRAPH 2003 Pat Hanrahan Stanford.
Quick survey about PRT Valentin JANIAUT KAIST (Korea Advanced Institute of Science and Technology)
Fast Approximation to Spherical Harmonics Rotation Sumanta Pattanaik University of Central Florida Kadi Bouatouch IRISA / INRIA Rennes Jaroslav Křivánek.
Fast Approximation to Spherical Harmonics Rotation
Wavelet Applications for Rendering Speaker: Yung Chum Lu.
Real-Time High Quality Rendering CSE 291 [Winter 2015], Lecture 2 Graphics Hardware Pipeline, Reflection and Rendering Equations, Taxonomy of Methods
- Laboratoire d'InfoRmatique en Image et Systèmes d'information
Using wavelets on the XBOX360 For current and future games San Francisco, GDC 2008 Mike Boulton Senior Software Engineer Rare/MGS
Mitsubishi Electric Research Labs Progressively Refined Reflectance Fields from Natural Illumination Wojciech Matusik Matt Loper Hanspeter Pfister.
Spherical Harmonics in Actual Games
Non-Linear Kernel-Based Precomputed Light Transport Paul Green MIT Jan Kautz MIT Wojciech Matusik MIT Frédo Durand MIT Henrik Wann Jensen UCSD.
1cs426-winter-2008 Notes. 2 Atop operation  Image 1 “atop” image 2  Assume independence of sub-pixel structure So for each final pixel, a fraction alpha.
All-Frequency Shadows Using Non-linear Wavelet Lighting Approximation Ren Ng Stanford Ravi Ramamoorthi Columbia Pat Hanrahan Stanford.
Toward Real-Time Global Illumination. Global Illumination == Offline? Ray Tracing and Radiosity are inherently slow. Speedup possible by: –Brute-force:
Toward Real-Time Global Illumination. Project Ideas Distributed ray tracing Extension of the radiosity assignment Translucency (subsurface scattering)
Advanced Computer Graphics
3D Graphics Rendering PPT By Ricardo Veguilla.
Real-time Global Illumination with precomputed probe
Presentation transcript:

Real-Time Rendering and Interaction with Complex Lighting and Materials Ravi Ramamoorthi Rendering Laboratory Columbia University Intel: August 13, 2004

High quality real-time rendering  Photorealism, not just more polygons  Natural lighting, materials, shadows Interiors by architect Frank Gehry. Note rich lighting, ranging from localized sources to reflections off vast sheets of glass.

High quality real-time rendering  Photorealism, not just more polygons  Natural lighting, materials, shadows Real materials diverse and not easy to represent by simple parameteric models. Want to support measured reflectance. Glass Vase Glass Star (courtesy Intel) Peacock feather

High quality real-time rendering  Photorealism, not just more polygons  Natural lighting, materials, shadows Natural lighting creates a mix of soft diffuse and hard shadows. Agrawala et al. 00 small area light, sharp shadows soft and hard shadows Ng et al. 03

Demo

Industrial Relevance  Very difficult computational problem  Both preprocessing (hours to days) and real-time rendering  Related to computational problems in other areas  Driving application  Interactive 3D graphics major use of PCs  Realism increases use, applications  Leverages high-performance processors  Exploit parallelism (at pixel level), modern feature  SIMD instructions, MMX and SSE instructions

Applications  Entertainment: Lighting design  Architectural visualization  Material design: Automobile industry  Realistic Video games  Electronic commerce

Challenges  Illumination complexity  Material / view complexity  Transport complexity (shadows)  Putting it together Ramamoorthi and Hanrahan, SIGGRAPH 01, 02

Environment Maps Miller and Hoffman, 1984 Previous work: Blinn 76, Greene 86, Cabral 87, 99

Irradiance Environment Maps Incident Radiance (Illumination Environment Map) Irradiance Environment Map R N

Assumptions  Diffuse surfaces (relaxed later)  Distant illumination  No shadowing (relaxed later) Hence, Irradiance is a function of surface normal

Computing Irradiance  Classically, hemispherical integral for each pixel  Lambertian surface is like low pass filter  Frequency-space analysis Incident Radiance Irradiance

Analytic Irradiance Formula Lambertian surface acts like low-pass filter Basri & Jacobs 01 Ramamoorthi & Hanrahan 01

9 Parameter Approximation Exact image Order 2 9 terms RMS Error = 1% For any illumination, average error < 3% [Basri Jacobs 01]

Real-Time Rendering Simple procedural rendering method (no textures)  Requires only matrix-vector multiply and dot-product  In software or NVIDIA vertex programming hardware Widely used in Games (AMPED for Microsoft Xbox), Movies (Pixar, Framestore CFC, …)

Convolution: General Materials Ramamoorthi and Hanrahan 01 Frequency: product Spatial: integral Spherical harmonic analysis

Natural Lighting, Realistic Materials Ramamoorthi and Hanrahan 02

Challenges  Illumination complexity  Material (BRDF)/view complexity  Transport complexity (shadows): Relighting  Putting it together Ng, Ramamoorthi and Hanrahan SIGGRAPH 03

Existing Fast Shadow Techniques We know how to render very hard, very soft shadows Sloan, Kautz, Snyder 2002 Shadows from smooth lighting (precomputed radiance transfer) Sen, Cammarano, Hanrahan, 2003 Shadows from point-lights (shadow maps, volumes)

Assumptions  Static geometry  Precomputation  Real-Time Rendering (relight all-frequency effects)

Relighting as a Matrix-Vector Multiply

Input Lighting (Cubemap Vector) Output Image (Pixel Vector) Transport Matrix Relighting as a Matrix-Vector Multiply

Problem Definition Matrix is Enormous  512 x 512 pixel images  6 x 64 x 64 cubemap environments Full matrix-vector multiplication is intractable  On the order of operations per frame How to relight quickly?

Sparse Matrix-Vector Multiplication Choose data representations with mostly zeroes Vector: Use non-linear wavelet approximation on lighting Matrix: Wavelet-encode transport rows

Non-linear Wavelet Approximation Wavelets provide dual space / frequency locality  Large wavelets capture low frequency area lighting  Small wavelets capture high frequency compact features Non-linear Approximation  Use a dynamic set of approximating functions (depends on each frame’s lighting)  By contrast, linear approx. uses fixed set of basis functions (like 25 lowest frequency)  We choose 10’s - 100’s from a basis of 24,576 wavelets

Non-linear Wavelet Light Approximation Wavelet Transform

Non-linear Approximation Retain 0.1% – 1% terms Non-linear Wavelet Light Approximation

Performance: Timing Precomputation of Transport Matrix  Ray tracing: several days (depends on ray tracer)  Graphics hardware: 80,000 vertex buddha = 3 hours Rendering (2.8 GHz Pentium IV)  For 100 terms, 4-6 fps RGB, 9-15 fps monochrome  Relighting alone (core matrix-vector) somewhat faster  Use almost full CPU perf. (implementation details later)

Video

Broader Computational Relevance Sparse matrix-vector multiplication standard numerical problem  Challenging problem (giant matrices, vectors)  Even more demanding: we need real-time performance  Note: we sparsify vector, not matrix unlike most methods Most computation in tight inner loop  General kernel to focus optimization effort on

Broader Computational Relevance Sparse matrix-vector multiplication standard numerical problem  Challenging problem (giant matrices, vectors)  Even more demanding: we need real-time performance  Note: we sparsify vector, not matrix unlike most methods Most computation in tight inner loop  General kernel to focus optimization effort on Very parallelizable  Each pixel/vertex has same operations  Vectorization possible (even RGB parallel x3 faster)  Not yet exploited (but improved performance with SSE2)

Implementation Quantize matrix elements (6-8 bits)  Discard 0 coefficients, gives 3-20% matrix sparsity  Note that both matrix, vector now sparse Memory bandwidth  Don’t use bandwidth for lights not in current frame  Store matrix coeffs for each light contiguously in memory

Implementation Quantize matrix elements (6-8 bits)  Discard 0 coefficients, gives 3-20% matrix sparsity  Note that both matrix, vector now sparse Memory bandwidth  Don’t use bandwidth for lights not in current frame  Store matrix coeffs for each light contiguously in memory Cache coherence  Segment matrix into blocks 256 pixels  Store coefficients as 8 bit value and 8 bit block index

Sparse matrix-vector multiply is 3 – 4 orders of magnitude less work than full multiplication Total Compression Compress to 3% – 20% Compress to 0.1% – 1%

Challenges  Illumination complexity  Material (BRDF)/view complexity  Transport complexity (shadows)  Putting it together (relight and change view) Ng, Ramamoorthi and Hanrahan, SIGGRAPH 04

Changing Only The View

Problem Characterization 6D Precomputation Space  Distant Lighting(2D)  View(2D)  Rigid Geometry(2D) With ~ 100 samples per dimension ~ samples total!! : Intractable computation, rendering

Factorization Approach 6D Transport ~ samples ~ 10 8 samples 4D Visibility4D BRDF * =

Double Product Integral Relighting

Triple Product Integral Relighting Changing Surface Position Changing Camera Viewpoint

Triple Product Integral Relighting n 300,000 vertices n 6 x 64 x 64 cubemaps n 0.1% - 1% sparsity for visibility, BRDF n 3-5 seconds / frame

Relit Images

Broader Computational Relevance * = Same machinery applies to basic operation: multiplication Signal multiplication for audio, image compositing,…. Compressed signals/videos (e.g. wavelets JPEG 2000) Broadly relevant computational problem in computer graphics, multimedia, numerical analysis with little previous work

Challenges  Illumination complexity  Material (BRDF)/view complexity  Transport complexity (shadows)  Putting it together

Other approaches: local coherence Software: Image Relighting Framework [Enrique, Ramamoorthi]

Industrial Impact Environment maps: Lambertian 9 term formula [RH 01]  Standard in games, movies Spherical harmonic lighting [RH 01, SKS 02, 03, …]  Full session at SIGGRAPH 03, EGSR 04  Sessions at Game Developer Conference  Adopted in Microsoft DirectX 9  Used by Sony, Microsoft, …

Future Work  Exploit parallelism  Efficiency in precomputation  Dynamic scenes  Broader mathematical, computational problems

Acknowledgements  Collaborators and students: Ren Ng, Pat Hanrahan, Sameer Agarwal, Henrik Wann Jensen, Sebastian Enrique, Nolan Goodnight, Greg Humphreys  Funding: NSF and Intel

The End  Questions?  More demos/videos if time permits

Research Projects  Mathematical foundations of appearance  High quality real-time rendering  Volumetric and Multiple Scattering Effects  Acquisition, Rendering with real lighting, materials  Complex lighting, materials in computer vision

Error in Lighting: St Peter’s Basilica Approximation Terms Relative L 2 Error (%) Sph. Harmonics Non-linear Wavelets Ng, Ramamoorthi, Hanrahan 03

Output Image Comparison Top: Linear Spherical Harmonic Approximation Bottom: Non-linear Wavelet Approximation ,00020,000

Matrix Compression Rates Teapot (Grace)Plant (St Peter’s) Light Res. Fraction non-zero Size Fraction non-zero Size 6 x 4 x 419%8.5 MB17%8.4 MB 6 x 8 x 816%34 MB15%31 MB 6 x 16 x 1614%113 MB14%115 MB 6 x 32 x 3210%185 MB12%394 MB 6 x 64 x 643.1%314 MB7.4%1.0 GB

Matrix Compression Rates Teapot (Grace)Plant (St Peter’s) Light Res. Fraction non-zero Size Fraction non-zero Size 6 x 4 x 419%8.5 MB17%8.4 MB 6 x 8 x 816%34 MB15%31 MB 6 x 16 x 1614%113 MB14%115 MB 6 x 32 x 3210%185 MB12%394 MB 6 x 64 x 643.1%314 MB7.4%1.0 GB

Double Product Integral Relighting Changing Surface Position Changing Camera Viewpoint Lighting Transport

Triple Product Integrals

Tripling Coefficient Density BasisComplexity PixelsN Fourier1/16 (1+3N) 2 = O(N 2 ) Spherical Harmonics 9/20 N 5/2 + 1/4 N 3/2 + 3/10 N 1/2 = O(N 5/2 ) Haar Wavelets2 – N + 3N log 4 N = O(N log N) General BasisN3N3

Summary of Wavelet Results  O(N) for Haar through factorization and dynamic programming exploiting regularity of coefficients  Actually essentially O(n) where n is number of terms used (in a nonlinear approximation)  Wavelets can represent all frequencies unlike pixels or spherical harmonics  Triple products are also efficient

Recent relevant SIGGRAPH papers 1.R. Ng, R. Ramamoorthi and P. Hanrahan, “Triple Product Wavelet Integrals for All-Frequency Relighting” SIGGRAPH 04 (ACM TOG 23(3)) 2.J. Lawrence, R. Ramamoorthi and S. Rusinkiewicz, “Efficient BRDF Importance Sampling using a Factored Representation” SIGGRAPH 04 (ACM TOG 23(3)) 3.R. Ng, R. Ramamoorthi and P. Hanrahan, “All-Frequency Shadows Using Non-Linear Wavelet Lighting Approximation” SIGGRAPH 03 (ACM TOG 22(3), pages ). 4.S. Agarwal, R. Ramamoorthi, S. Belongie and H. Jensen, “Structured Importance Sampling of Environment Maps” SIGGRAPH 03 (ACM TOG 22(3), pages ). 5.R. Ramamoorthi and P. Hanrahan, “Frequency Space Environment Map Rendering” SIGGRAPH 02 (ACM TOG 21(3), pages ) 6.R. Ramamoorthi and P. Hanrahan, “A Signal-Processing Framework for Inverse Rendering” SIGGRAPH 01, pages R. Ramamoorthi and P. Hanrahan, “An Efficient Representation for Irradiance Environment Maps” SIGGRAPH 01, pages M. Agrawala, R. Ramamoorthi, A. Heirich and L. Moll, “Efficient Image- Based Methods for Rendering Soft Shadows” SIGGRAPH 00, pages