Real-time Shading with Filtered Importance Sampling

Slides:



Advertisements
Similar presentations
Surface Signals for Graphics John Snyder Researcher 3D Graphics Group Microsoft Research.
Advertisements

Accelerating Real-Time Shading with Reverse Reprojection Caching Diego Nehab 1 Pedro V. Sander 2 Jason Lawrence 3 Natalya Tatarchuk 4 John R. Isidoro 4.
Exploration of advanced lighting and shading techniques
Spherical Harmonic Lighting Jaroslav Křivánek. Overview Function approximation Function approximation Spherical harmonics Spherical harmonics Some other.
Improved Radiance Gradient Computation Jaroslav Křivánek Pascal Gautron Kadi Bouatouch Sumanta Pattanaik ComputerGraphicsGroup.
Spatial Directional Radiance Caching Václav Gassenbauer Czech Technical University in Prague Jaroslav Křivánek Cornell University Kadi Bouatouch IRISA.
Computer graphics & visualization Global Illumination Effects.
Environment Mapping CSE 781 – Roger Crawfis
Chunhui Yao 1 Bin Wang 1 Bin Chan 2 Junhai Yong 1 Jean-Claude Paul 3,1 1 Tsinghua University, China 2 The University of Hong Kong, China 3 INRIA, France.
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)
Many-light methods – Clamping & compensation
Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry Many slides courtesy Pat Hanrahan.
Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection Many slides courtesy.
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.
I3D Fast Non-Linear Projections using Graphics Hardware Jean-Dominique Gascuel, Nicolas Holzschuch, Gabriel Fournier, Bernard Péroche I3D 2008.
PRT Summary. Motivation for Precomputed Transfer better light integration and light transport –dynamic, area lights –shadowing –interreflections in real-time.
Real-Time Rendering Paper Presentation Imperfect Shadow Maps for Efficient Computation of Indirect Illumination T. Ritschel T. Grosch M. H. Kim H.-P. Seidel.
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.
Computer Graphics (Spring 2008) COMS 4160, Lecture 20: Illumination and Shading 2
Final Gathering on GPU Toshiya Hachisuka University of Tokyo Introduction Producing global illumination image without any noise.
Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2
IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.
1 CSCE 641: Computer Graphics Lighting Jinxiang Chai.
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.
Fast Global-Illumination on Dynamic Height Fields
Matrix Row-Column Sampling for the Many-Light Problem Miloš Hašan (Cornell University) Fabio Pellacini (Dartmouth College) Kavita Bala (Cornell University)
Computer Graphics (Fall 2004) COMS 4160, Lecture 16: Illumination and Shading 2 Lecture includes number of slides from.
CIS 681 Distributed Ray Tracing. CIS 681 Anti-Aliasing Graphics as signal processing –Scene description: continuous signal –Sample –digital representation.
Computer Graphics Inf4/MSc Computer Graphics Lecture 11 Texture Mapping.
CS 445 / 645: Introductory Computer Graphics
Ray Tracing Primer Ref: SIGGRAPH HyperGraphHyperGraph.
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.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.
-Global Illumination Techniques
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
09/11/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Graphics Pipeline Texturing Overview Cubic Environment Mapping.
CS 638, Fall 2001 Today Project Stage 0.5 Environment mapping Light Mapping.
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 Shading with Filtered Importance Sampling Jaroslav Křivánek Czech Technical University in Prague Mark Colbert University of Central Florida.
Characteristic Point Maps Hongzhi Wu Julie Dorsey Holly Rushmeier (presented by Patrick Paczkowski) Computer Graphics Lab Yale University.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Path Tracing Algorithms K. H. Ko School of Mechatronics Gwangju.
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
Efficient Streaming of 3D Scenes with Complex Geometry and Complex Lighting Romain Pacanowski and M. Raynaud X. Granier P. Reuter C. Schlick P. Poulin.
Global Illumination. Local Illumination  the GPU pipeline is designed for local illumination  only the surface data at the visible point is needed to.
Local Illumination and Shading
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Path Tracing Algorithms K. H. Ko School of Mechatronics Gwangju.
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.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
01/26/05© 2005 University of Wisconsin Last Time Raytracing and PBRT Structure Radiometric quantities.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
Computer Graphics Ken-Yi Lee National Taiwan University (the slides are adapted from Bing-Yi Chen and Yung-Yu Chuang)
Introduction to Monte Carlo Method
Texture Mapping cgvr.korea.ac.kr.
Advanced Computer Graphics
Path Tracing (some material from University of Wisconsin)
Illumination Model How to compute color to represent a scene
Interactive photo-realistic 3D digital prototyping
Monte Carlo Rendering Central theme is sampling:
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Real-time Global Illumination with precomputed probe
Presentation transcript:

Real-time Shading with Filtered Importance Sampling Mark Colbert University of Central Florida Jaroslav Křivánek Czech Technical University in Prague

Motivation Dynamic BRDF and lighting Applications Material design Gaming Production pipeline friendly Single GPU shader No precomputation Minimal code base Solution that can be put into a game engine or Renderman

Demo

Our Approach BRDF proportional sampling Environment map filtering

Related Work A Unified Approach to Prefiltered Environment Maps [ Kautz et al. 2000 ] Efficient Rendering of Spatial Bi-directional Reflectance Distribution Functions [ McAllister et al. 2002 ] Efficient Reflectance and Visibility Approximations for Environment Map Rendering [ Green et al. 2007 ] Interactive Illumination with Coherent Shadow Maps [ Ritschel et al. 2007 ] Kautz et al. - Providing a good review of prefiltering techniques McAllister et al. – Demonstrates SBRDFs on GPU novel MIP-map Green et al. – Prefilter Gaussians for glossy materials (EG) Ritschel et al. – Importance sampling on GPU for visiblity (EGSR)

Illumination Integral Ignores visibility [ Kozlowski and Kautz 2007 ] Computationally expensive Explain in terms of the equation components Li Incoming Radiance (Environment Map) f Material Function (BRDF)  Angle between normal and incoming direction

Importance Sampling Choose a few random samples Select according to the BRDF PDF – guides

Importance Sampling Result 40 samples per pixel

Random Numbers on the GPU Relatively expensive Random numbers per pixel (computation) Random number textures (memory/indirection) Quasi-random sequence Good sample distribution (no clumping) Use same sequence for each pixel

Same Sequence Result 40 samples per pixel

Filtered Importance Sampling Filter environment map between samples over hemisphere Samples distributed by the BRDF Support approximately equivalent to: Add omega being proportional to this thing N Number of samples p Probability density function

Filtering Use MIP-maps Level proportional to log of filter size Spherical Harmonics diffuse component [Ramamoorthi and Hanrahan 2001]

Implementation Auto-generated MIP-map Dual paraboloids Single GPU Shader Sum together filtered samples

Results Sphere – Grace Probe Stochastic No Filtering Our Result Reference

Results Bunny – Ennis Probe Stochastic No Filtering Our Result Reference

Approximations Constant BRDF across filter Isotropic filter shape Tri-linear filtering

RMS Error Phong Reflection - Ennis Light Probe n=10 n=100 n=1000 TODO: Get from MATLAB Maybe show reference image? Make sure to mention the RMS error as a function of n n=1000

Performance 512x512 Sphere No portion of the algorithm is ran on the CPU From 7800 to 8800 SLI: 8.4x faster @ 40 spp From 7800 to 8800 : 5.75x faster @ 40 spp

Conclusions Real-time glossy surface reflections Signal Processing Theory Practical Affords new interfaces For more information: GPU Gems 3 Download the code now! graphics.cs.ucf.edu/gpusampling/

Questions

Additional Slides

Performance From 7800 to 8800 SLI: 8.4x faster From 7800 to 8800 : 5.75x faster

Which distribution? Product of lighting and BRDF Lighting BRDF Requires bookkeeping Too expensive Lighting BRDF Sample-Importance Resample (SIR) Lighting – already know BRDF is higher frequency, so….

Which distribution? Product of lighting and BRDF Lighting BRDF Too many samples for glossy surfaces BRDF Sample-Importance Resample (SIR) Lighting – already know BRDF is higher frequency, so….

Which distribution? Product of lighting and BRDF Lighting BRDF Computationally efficient Sample-Importance Resample (SIR) Lighting – already know BRDF is higher frequency, so….

Environment Mapping Dual Paraboloid Error Support Region Use because cube maps cause seams artifacts when using MIP-maps Support Region

Environment Mapping Cube Maps Low distortion Accelerated by GPU Decimation/reconstruction filters non-spherical Introduces Seams Decimation/reconstruction is non-spherical (i.e. per face) causing filter region to

Environment Mapping Latitude/Longitude Too much distortion at poles Makes rate of change from spherical to image vary greatly as a distance from the pole

Measured BRDF Data Fast primitive distribution for illustration [ Secord et al. 2002 ] Efficient BRDF importance sampling using a factored representation [ Lawrence et al. 2004 ] Probability Trees [ McCool and Harwood 1997 ]

PDF-Proportional Samples Importance Sampling Random Samples on Unit Square PDF-Proportional Samples on Hemisphere 1 PDF Mapping TODO: Add animation Random values on unit square 1

Pseudocode float4 FilteredIS(float3 viewing : TEXCOORD1 uniform sampler2D env) : COLOR { float4 c = 0;   // sample loop for (int k=0; k < N; k++) { float2 xi = quasi_random_seq(k); float3 u = sample_material(xi); float pdf = p(u, viewing); float lod = compute_lod(u, pdf); float3 L = tex2Dlod(env,float4(u, lod)); c += L*f(u,viewing)/pdf; } return c/N;

Filter Support Ideal Isotropic approximation Assume sample points are perfectly stratified Implies area of 1 sample = 1 / N Use Jacobian approximation for warping function (Inverted PDF) Support region of sample  1 / p(i, o) N TODO: Convert text to equations Mention: Ideal = Support region between each sample Jacobian provides a rate of change from one domain to another Here we need to find the rate of change from the nearly stratified domain of the unit square (approximated by 1/N) to the BRDF-proportional domain

Ideal Sample Filter Design h – Filter function More expensive than illumination integral TODO: Change color of BRDF

Approximate Sample Filter Estimate for sample BRDF  PDF PDF is normalized BRDF Near constant over single sample Low frequency cosine approximation Use multiple samples to estimate effect Filter independent of BRDF and cosine