All-Frequency Shadows Using Non-linear Wavelet Lighting Approximation Ren Ng Stanford Ravi Ramamoorthi Columbia SIGGRAPH 2003 Pat Hanrahan Stanford.

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
Local, Deformable Precomputed Radiance Transfer
Wavelets Fast Multiresolution Image Querying Jacobs et.al. SIGGRAPH95.
Environment Mapping CSE 781 – Roger Crawfis
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 
All-Frequency Rendering of Dynamic, Spatially-Varying Reflectance
Rendering with Environment Maps Jaroslav Křivánek, KSVI, MFF UK
Computer graphics & visualization Pre-Computed Radiance Transfer PRT.
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.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lectures 18, 19: Monte Carlo Integration Ravi Ramamoorthi Acknowledgements.
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
Computational Fundamentals of Reflection COMS , Lecture
Advanced Computer Graphics (Fall 2009) CS , Lecture 1: Introduction and History Ravi Ramamoorthi Some.
1 Compression and Real-time Rendering of Measured BTFs using local-PCA Mueller, Meseth, Klein Bonn University Computer Graphics Group.
Direct-to-Indirect Transfer for Cinematic Relighting Milos Hasan (Cornell University) Fabio Pellacini (Dartmouth College) Kavita Bala (Cornell University)
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 10: Global Illumination Ravi Ramamoorthi Some images courtesy.
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.
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.
Real-Time Rendering and Interaction with Complex Lighting and Materials Ravi Ramamoorthi Rendering Laboratory Columbia University Intel: August 13, 2004.
The Story So Far The algorithms presented so far exploit: –Sparse sets of images (some data may not be available) –User help with correspondences (time.
Face Relighting with Radiance Environment Maps Zhen Wen 1, Zicheng Liu 2, Thomas Huang 1 Beckman Institute 1 University of Illinois Urbana, IL61801, USA.
Direct Illumination with Lazy Visibility Evaluation David Hart Philip Dutré Donald P. Greenberg Cornell University SIGGRAPH 99.
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.
Image-Based Rendering from a Single Image Kim Sang Hoon Samuel Boivin – Andre Gagalowicz INRIA.
Efficient Irradiance Normal Mapping Ralf Habel, Michael Wimmer Institute of Computer Graphics and Algorithms Vienna University of Technology.
Sebastian Enrique Columbia University Real-Time Rendering Using CUReT BRDF Materials with Zernike Polynomials CS Topics.
Interactive Time-Dependent Tone Mapping Using Programmable Graphics Hardware Nolan GoodnightGreg HumphreysCliff WoolleyRui Wang University of Virginia.
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.
Efficient Rendering of Local Subsurface Scattering Tom Mertens 1, Jan Kautz 2, Philippe Bekaert 1, Frank Van Reeth 1, Hans-Peter Seidel
02/05/03© 2003 University of Wisconsin Last Time Importance Better Form Factors Meshing.
03/24/03© 2003 University of Wisconsin Last Time Image Based Rendering from Sparse Data.
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.
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
Project 11: Determining the Intrinsic Dimensionality of a Distribution Okke Formsma, Nicolas Roussis and Per Løwenborg.
- 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.
Inferring Reflectance Functions from Wavelet Noise Pieter Peers Philip Dutré Pieter Peers Philip Dutré June 30 th 2005 Department of Computer Science.
Spherical Harmonics in Actual Games
Thank you for the introduction
Non-Linear Kernel-Based Precomputed Light Transport Paul Green MIT Jan Kautz MIT Wojciech Matusik MIT Frédo Durand MIT Henrik Wann Jensen UCSD.
Shadows David Luebke University of Virginia. Shadows An important visual cue, traditionally hard to do in real-time rendering Outline: –Notation –Planar.
Radiance Cache Splatting: A GPU-Friendly Global Illumination Algorithm P. Gautron J. Křivánek K. Bouatouch S. Pattanaik.
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)
Working Group « Pre-Filtering »
3D Graphics Rendering PPT By Ricardo Veguilla.
Real-time Global Illumination with precomputed probe
Presentation transcript:

All-Frequency Shadows Using Non-linear Wavelet Lighting Approximation Ren Ng Stanford Ravi Ramamoorthi Columbia SIGGRAPH 2003 Pat Hanrahan Stanford

Light on Stone River (Goldsworthy)

From Frank Gehry Architecture, Ragheb ed Lighting Design

Existing Fast Shadow Techniques We know how to render very hard and 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)

Soft Lighting Teapot in Grace Cathedral

All-Frequency Lighting Teapot in Grace Cathedral

Formulation Geometry relighting: assume diffuse Image relighting: fix view point T could include global effects

Relighting as Matrix-Vector Multiply

Input Lighting (Cubemap Vector) Output Image (Pixel Vector) Transport Matrix

Ray-Tracing Matrix Columns

Only works for image relighting

Light-Transport Matrix Rows

Rasterizing Matrix Rows Pre-computing rows n Rasterize visibility hemicubes with graphics hardware n Read back pixels and weight by reflection function

Matrix Multiplication is Enormous Dimension n 512 x 512 pixel images n 6 x 64 x 64 cubemap environments Full matrix-vector multiplication is intractable n On the order of operations per frame

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 Light Approximation Wavelet Transform

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

Why Non-linear Approximation? Linear n Use a fixed set of approximating functions n Precomputed radiance transfer uses of the lowest frequency spherical harmonics Non-linear n Use a dynamic set of approximating functions (depends on each frame’s lighting) n In our case: choose 10’s - 100’s from a basis of 24,576 wavelets Idea: Compress lighting by considering input data

Why Wavelets? Wavelets provide dual space / frequency locality n Large wavelets capture low frequency, area lighting n Small wavelets capture high frequency, compact features In contrast n Spherical harmonics n Perform poorly on compact lights n Pixel basis n Perform poorly on large area lights

Choosing Non-linear Coefficients Three methods of prioritizing 1. Magnitude of wavelet coefficient n Optimal for approximating lighting 2. Transport-weighted n Biases lights that generate bright images 3. Area-weighted n Biases large lights

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

Matrix Row Wavelet Encoding

Extract Row

Matrix Row Wavelet Encoding Wavelet Transform

Matrix Row Wavelet Encoding Wavelet Transform

Matrix Row Wavelet Encoding Wavelet Transform

Matrix Row Wavelet Encoding Wavelet Transform

Matrix Row Wavelet Encoding Store Back in Matrix 0 ’ ’ 0 0

Matrix Row Wavelet Encoding 0 ’ ’ 0 0 Only 3% – 30% are non-zero

Total Compression Lighting vector compression n Highly lossy n Compress to 0.1% – 1% Matrix compression n Essentially lossless encoding n Represent with 3% – 30% non-zero terms Total compression in sparse matrix-vector multiply n 3 – 4 orders of magnitude less work than full multiplication

Error Analysis Compare to linear spherical harmonic approximation n [Sloan, Kautz, Snyder, 2002] Measure approximation quality in two ways: n Error in lighting n Error in output image pixels Main point (for detailed natural lighting) n Non-linear wavelets converge exponentially faster than linear harmonics

Lighting Error

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

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

Error in Output Image: Plant Scene Approximation Terms Relative L 2 Error (%) Sph. Harmonics Non-linear Wavelets

Results SIGGRAPH 2003 video

Summary A viable representation for all-frequency lighting n Sparse non-linear wavelet approximation n 100 – 1000 times information reduction Efficient relighting from detailed environment maps

Triple Product Wavelet Integrals For All-Frequency Relighting Ren Ng Stanford Ravi Ramamoorthi Columbia SIGGRAPH 2004 Pat Hanrahan Stanford

Precomputed Relighting Techniques Low-Frequency Lighting, Dynamic View [Sloan et al 2002, 2003] All-Frequency Lighting, Fixed View [Ng et al 2003]

Formulation Simplifications: 1. Incorporate cosine term into BRDF 2. Assume the lighting is distant, so L depends only on ω 3. Uniform BRDF over the surface 4. Expressed in the global frame; BRDF has to be rotated For a fixed point,

Double product Let

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

Problem Characterization 6D Precomputation Space n Distant Lighting(2D) n Surface (2D) n View(2D) With ~ 100 samples per dimension n Total of ~ samples

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

Triple Product Integral Relighting

Triple Product Integrals

Basis Requirements 1.Need few non-zero “tripling” coefficients 2.Need sparse basis coefficients

1. Number Non-Zero Tripling Coeffs Basis Choice Number Non-Zero General (e.g. PCA) O (N 3)O (N 3) Pixels O (N)O (N) Fourier Series O (N 2)O (N 2) Sph. Harmonics O (N 5 / 2)O (N 5 / 2) Haar Wavelets O ( N log N )

Basis Requirements 1.Need few non-zero “tripling” coefficients 2.Need sparse basis coefficients

2. Sparsity in Light Approximation Approximation Terms Relative L 2 Error (%) Pixels Wavelets

2. Sparsity in Visibility and BRDF Visibility n ~ 40% sparse in pixels n 1 – 5 % sparse in wavelets BRDF with diffuse component n ~ 50% sparse in pixels n 0.1 – 1% sparse in wavelets

Summary of Basis Analysis Choose wavelet basis because 1.Few non-zero tripling coefficients 1.Sparse basis coefficients

Haar Tripling Coefficient Analysis * * * *

Visual Review of 2D Haar Basis

* * * = = = 1. Non-Overlapping Haar Multiplication

* * * 1. Zero Triple Product Integral * * *

* * * = = = 2. Co-Square Haar Multiplication

* * * * * * 2. Non-Zero Triple Product Integrals

= = = 3. Overlapping Haar Multiplication * * *

3. More Non-Zero Triple Integrals * * * * * *

Haar Tripling Coefficient Theorem The integral of three Haar wavelets is non-zero iff n All three are the scaling function n All three are co-square and different n Two are identical, and the third overlaps at a coarser level

Theorem Consequences 1.Prove O(N log N) Haar sparsity 2.Derive O(N log N) triple product integral algorithm n Dynamic programming eliminates log N term n Final complexity is linear in number of retained basis coefficients

High-Level Algorithm: Precomputation for each vertex compute the visibility cubemap wavelet encode store for each viewing direction compute BRDF for that view nonlinear wavelet approximation store for each vertex compute the visibility cubemap wavelet encode store for each viewing direction compute BRDF for that view nonlinear wavelet approximation store

for each frame wavelet encode lighting, L for each vertex in mesh look up visibility, V look up BRDF for view, ρ integrate product of L, V, ρ set color of vertex draw colored mesh High-Level Algorithm: Relighting for each frame wavelet encode lighting, L for each vertex in mesh look up visibility, V look up BRDF for view, ρ integrate product of L, V, ρ set color of vertex draw colored mesh

Relit Images

Changing Lighting, Fixed View

Changing View, Fixed Lighting

Dynamic Lighting and View

Results SIGGRAPH 2004 video

Summary All-frequency relighting, changing view n Factor into visibility and BRDF n Fast relight in Haar basis Triple product analysis and algorithms n Analysis of several bases n Haar tripling theorem n Efficient triple product integral estimation

Efficient Wavelet Rotation for Environment Map Rendering Rui Wang Ren Ng David Luebke Greg Humphreys EGSR 2006

Triple product ωoωo x The output color of vertex x given view direction ω o BRDF : Represents lighting reflective ratio of x at given light direction ω to view direction ω o. Lighting : Represents the radiance of direction ω. Visibility : Decides whether light is visible in direction ω.

Triple product ωoωo x The output radiance is the integral of these functions over all directions!

BRDF Lighting Global frame

BRDF Lighting Local frame

Rotation n Because we can’t rotate wavelet basis easily, some functions must be sampled with different rotations in advance and use lookup at runtime. n Spherical harmonics does not have this problem because it can be rotated easily.

Rotation of spherical functions

Rotation of spherical basis source basis target basis Basis transform matrix

n Transform matrices have to be pre- computed at several rotations

Varying truncation threshold

Varying rotation sampling rate