Normal Mapping for Precomputed Radiance Transfer

Slides:



Advertisements
Similar presentations
Clustered Principal Components for Precomputed Radiance Transfer Peter-Pike Sloan Microsoft Corporation Jesse Hall, John Hart UIUC John Snyder Microsoft.
Advertisements

All-Frequency PRT for Glossy Objects Xinguo Liu, Peter-Pike Sloan, Heung-Yeung Shum, John Snyder Microsoft.
Bi-Scale Radiance Transfer Peter-Pike Sloan Xinguo Liu Heung-Yeung Shum John Snyder Microsoft.
Surface Signals for Graphics John Snyder Researcher 3D Graphics Group Microsoft Research.
Jan Kautz, MPI Informatik Peter-Pike Sloan, Microsoft Research
Precomputed Radiance Transfer
Local, Deformable Precomputed Radiance Transfer
Spherical Harmonic Lighting Jaroslav Křivánek. Overview Function approximation Function approximation Spherical harmonics Spherical harmonics Some other.
1 Radiance Workshop 2004 – Fribourg, Switzerland Radiance Caching for Efficient Global Illumination Computation J. Křivánek P. Gautron S. Pattanaik K.
A Novel Hemispherical Basis for Accurate and Efficient Rendering P. Gautron J. Křivánek S. Pattanaik K. Bouatouch Eurographics Symposium on Rendering 2004.
Pre-computing Lighting in Games
A Mike Day Paper Exercise
Normal Map Compression with ATI 3Dc™ Jonathan Zarge ATI Research Inc.
Michael I. Gold NVIDIA Corporation
Bump Mapping CSE 781 Roger Crawfis.
Computer graphics & visualization Global Illumination Effects.
Environment Mapping CSE 781 – Roger Crawfis
Spherical Harmonic Lighting of Wavelength-dependent Phenomena Clifford Lindsay, Emmanuel Agu Worcester Polytechnic Institute (USA)
Frequency Domain Normal Map Filtering Charles Han Bo Sun Ravi Ramamoorthi Eitan Grinspun Columbia University.
All-Frequency Rendering of Dynamic, Spatially-Varying Reflectance
Rendering with Environment Maps Jaroslav Křivánek, KSVI, MFF UK
Week 9 - Wednesday.  What did we talk about last time?  Fresnel reflection  Snell's Law  Microgeometry effects  Implementing BRDFs  Image based.
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
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,
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 10: Global Illumination Ravi Ramamoorthi Some images courtesy.
IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.
Exploiting Temporal Coherence for Incremental All-Frequency Relighting Ryan OverbeckRavi Ramamoorthi Aner Ben-ArtziEitan Grinspun Columbia University Ng.
Precomputed Radiance Transfer Harrison McKenzie Chapter.
Fast Global-Illumination on Dynamic Height Fields
A Theory of Locally Low Dimensional Light Transport Dhruv Mahajan (Columbia University) Ira Kemelmacher-Shlizerman (Weizmann Institute) Ravi Ramamoorthi.
Face Relighting with Radiance Environment Maps Zhen Wen 1, Zicheng Liu 2, Thomas Huang 1 Beckman Institute 1 University of Illinois Urbana, IL61801, USA.
Computer Vision Spring ,-685 Instructor: S. Narasimhan PH A18B T-R 10:30am – 11:50am Lecture #13.
1 KIPA Game Engine Seminars Jonathan Blow Ajou University December 4, 2002 Day 8.
Pre-computed Radiance Transfer Jaroslav Křivánek, KSVI, MFF UK
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.
View-Dependent Precomputed Light Transport Using Nonlinear Gaussian Function Approximations Paul Green 1 Jan Kautz 1 Wojciech Matusik 2 Frédo Durand 1.
Global Illumination CMSC 435/634. Global Illumination Local Illumination – light – surface – eye – Throw everything else into ambient Global Illumination.
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
SIGGRAPH 2010 Course: Physically Based Shading Models in Film and Game Production SIGGRAPH 2010 Physically Based Shading Models in Film and Game Production.
Global Illumination. Local Illumination  the GPU pipeline is designed for local illumination  only the surface data at the visible point is needed to.
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.
Instructor: Mircea Nicolescu Lecture 7
Radiance Cache Splatting: A GPU-Friendly Global Illumination Algorithm P. Gautron J. Křivánek K. Bouatouch S. Pattanaik.
01/27/03© 2002 University of Wisconsin Last Time Radiometry A lot of confusion about Irradiance and BRDFs –Clarrified (I hope) today Radiance.
Function Representation & Spherical Harmonics. Function approximation G(x)... function to represent B 1 (x), B 2 (x), … B n (x) … basis functions G(x)
All-Frequency Shadows Using Non-linear Wavelet Lighting Approximation Ren Ng Stanford Ravi Ramamoorthi Columbia Pat Hanrahan Stanford.
Precomputation aided GI on the GPU László Szirmay-Kalos.
Toward Real-Time Global Illumination. Project Ideas Distributed ray tracing Extension of the radiosity assignment Translucency (subsurface scattering)
MAN-522 Computer Vision Spring
Working Group « Pre-Filtering »
Fast Filtering of Reflection Probes
Illumination Model How to compute color to represent a scene
Chapter XVI Texturing toward Global Illumination
Lecture 28: Photometric Stereo
Last Time Presentation of your game and idea Environment mapping
Computer Graphics (Fall 2003)
Real-time Global Illumination with precomputed probe
Presentation transcript:

Normal Mapping for Precomputed Radiance Transfer Peter-Pike Sloan Microsoft

Inspiration [McTaggart04] Half-Life 2 “Radiosity Normal Mapping”

Related Work [Willmott99] Vector irradiance formulation of radiosity (for accelerating computation) [Tabellion04] Lighting model similar to above (dominant light direction) [Good2005] “Spherical Harmonic Light Maps”

Goal Develop lightweight techniques to decouple normal variation (ala HL2) From parameterized models of lighting (PRT) For rigid objects Non goals Modeling “local GI” of the bumps [Sig05] Masking effects Glossy materials

PRT Now that we’ve seen a demo we are going to define some of the terms we will use for the rest of the talk. We use the abbreviation “PRT” for precomputed radiance transfer. In PRT, the source radiance function represents the distant lighting that will illuminate the object. It is a spherical function represented by a vector of coefficients with respect to a given basis.

PRT At every point over the surface of the object, this source radiance function is attenuated due to shadowing and increased due to inter-reflections. We call the result transferred incident radiance. It represents the local environment lighting each point “p”.

PRT This transferred incident radiance function can be integrated against the surface material properties to produce the exit radiance emanating from that point. Exit radiance is a spherical function that is parameterized by view direction.

Bi-Scale Radiance Transfer In order to get that global transport we introduce Bi-scale radiance transfer. It uses PRT to model macro-scale transport – the source radiance is transformed into a local lighting vector at a coarse sampling over the object. This is then interpolated and used to light an RTT that models the meso-scale effects.

Bi-Scale Radiance Transfer l : vector = source radiance spherical function Mp : 25x25 transfer matrix at point p (source → transferred incident) q(xp) : ID map (2D → 2D, maps RTT patch over surface) b(x,v) : RTT (4D → 25D, tabulated over small spatial patch) Mathematically, source radiance L is transferred to incident radiance using the transfer matrix Mp. An ID map “q” defined over the whole surface indexes into a small RTT “b”. The resulting RTT sample is then dotted with the transferred incident radiance vector, generating exit radiance “e”. This essentially applies macro-scale transferred radiance to the meso-scale RTT. applies macro-scale transferred radiance to meso-scale RTT

Bi-Scale Radiance Transfer l : vector = source radiance spherical function Mp : 25x25 transfer matrix at point p (source → transferred incident) q(xp) : ID map (2D → 2D, maps RTT patch over surface) b(x,v) : RTT (4D → 25D, tabulated over small spatial patch) Mathematically, source radiance L is transferred to incident radiance using the transfer matrix Mp. An ID map “q” defined over the whole surface indexes into a small RTT “b”. The resulting RTT sample is then dotted with the transferred incident radiance vector, generating exit radiance “e”. This essentially applies macro-scale transferred radiance to the meso-scale RTT. applies macro-scale transferred radiance to meso-scale RTT

Bi-Scale Radiance Transfer l : vector = source radiance spherical function Mp : 25x25 transfer matrix at point p (source → transferred incident) q(xp) : ID map (2D → 2D, maps RTT patch over surface) b(x,v) : RTT (4D → 25D, tabulated over small spatial patch) Mathematically, source radiance L is transferred to incident radiance using the transfer matrix Mp. An ID map “q” defined over the whole surface indexes into a small RTT “b”. The resulting RTT sample is then dotted with the transferred incident radiance vector, generating exit radiance “e”. This essentially applies macro-scale transferred radiance to the meso-scale RTT. applies macro-scale transferred radiance to meso-scale RTT

Limitations Expensive Add constraints Stores 64 “response vectors” that are 9-36D (x3 for spectral) Parallax mapping cheaper way of getting masking Local radiance is too much data (9 – 36 x 3) for low res textures/per-vertex Add constraints Just model normal variation Diffuse only

Diffuse + Normal Maps Quadratic SH [Ramamoorthi2001] Distant Lighting Environment

Distant Radiance to Transferred Incident Radiance Diffuse + Normal Maps Quadratic SH [Ramamoorthi2001] Distant Radiance to Transferred Incident Radiance In local frame

Diagonal Convolution Matrix Diffuse + Normal Maps Quadratic SH [Ramamoorthi2001] Diagonal Convolution Matrix Clamped cosine kernel

Irradiance Environment Map Diffuse + Normal Maps Quadratic SH [Ramamoorthi2001] Irradiance Environment Map

Irradiance Environment Map Diffuse + Normal Maps Quadratic SH [Ramamoorthi2001] Irradiance Environment Map

Evaluate SH basis with normal Diffuse + Normal Maps Quadratic SH [Ramamoorthi2001] Evaluate SH basis with normal

Concerns Lot of data at low res 9xO2 matrices (x3 with color bleeding) Can compress using CPCA [Sig03] Too much data passed from low res to high res Irradiance emap (27 numbers, 7 interpolators) Alternatives Project into analytic basis Separable approximation

Project into new basis (fewer rows) Analytic Basis Project into new basis (fewer rows)

Shifted Associated Legendre Polynomials [Gautron2005]

Half-Life 2 Basis

Comparison PRT Gold Standard HL2 SAL

Comparison PRT Gold Standard HL2 SAL

Normal Mapping for PRT Use same ideas as BRDF factorization [Kautz and McCool1999] Another approach, that we will discuss here is to use the same ideas that are used for BRDF factorization, which Jaakko talked about earlier. That is build a matrix “A” sampling the convolved lighting environment over a hemisphere of normals. The rows represent the normal directions, the columns the lighting environment. Bi-linear basis functions over hemisphere (4 non-zero) Matrix, rows “normal directions” columns quadratic SH light Aij equals evaluating convolved light basis function “j” in normal direction “i”

Normal Mapping for PRT This is just trying to give more intuition to the matrix A. You have some sampling of the hemisphere, each row corresponds to a sample. The columns correspond to illumination from the 9 quadratic SH basis functions. A coefficient in the matrix represents the integral of a cosine kernel in the given direction against the lighting environment. Not that the lighting environment should be clamped to the hemisphere before this integral happens. Bi-linear basis functions are used on the unit disk, and then mapped to the hemisphere to generate a value at any point on the hemisphere (so there are at most 4 non-zero entries for a given normal.)

Normal Mapping for PRT Compute SVD of A Nx9 matrix (each column is a “normal basis” texture) Then you compute the singular value decomposition of this matrix and you get 3 terms. A matrix U, where each column represents a “normal basis” texture. A diagonal matrix S (the singular values) And a matrix Vt,which is 9x9 (for quadratic SH.) 9x9 diagonal matrix (singular values) 9x9 matrix

Normal Mapping for PRT Old equation New equation This generates a new equation that simply replaces the evaluation of the quadratic SH in the normal direction.

Normal Mapping for PRT Use first M singular values MxO2 matrix M channel “normal direction” texture Then instead of using the full matrix, just use the first M singular values.

Pixel Shader StandardSVDPS( VS_OUT In, out float3 rgb : COLOR ) { float2 Normal = tex2D(NormalSampler, In.TexCoord); float2 vTex = Normal*0.5 + float2(0.5,0.5); float4 vU = tex2D(USampler,vTex); rgb.r = dot(In.cR,vU); rgb.g = dot(In.cG,vU); rgb.b = dot(In.cB,vU); rgb *= tex2D(AlbedoSampler, In.TexCoord); }

Comparison

Demo

Conclusions Lightweight form of normal mapping for PRT Inspired by Half-Life 2 For static objects, diffuse only HL2 basis and separable basis seem to be best Experiment with CPCA more [Sig03] Integrate with other techniques Parallax mapping for masking Ambient Occlusion for local effects

Acknowledgments Gary McTaggart for HL2 images Shanon Drone for Models Paul Debevec for Light Probes