The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical Logarithmic Shadow Maps Brandon LloydUNC-CH Naga GovindarajuUNC-CH David TuftUNC-CH Steve MolnarNvidia.

Slides:



Advertisements
Similar presentations
COMPUTER GRAPHICS SOFTWARE.
Advertisements

An Optimized Soft Shadow Volume Algorithm with Real-Time Performance Ulf Assarsson 1, Michael Dougherty 2, Michael Mounier 2, and Tomas Akenine-Möller.
CS123 | INTRODUCTION TO COMPUTER GRAPHICS Andries van Dam © 1/16 Deferred Lighting Deferred Lighting – 11/18/2014.
CS 352: Computer Graphics Chapter 7: The Rendering Pipeline.
Understanding the graphics pipeline Lecture 2 Original Slides by: Suresh Venkatasubramanian Updates by Joseph Kider.
Graphics Pipeline.
RealityEngine Graphics Kurt Akeley Silicon Graphics Computer Systems.
Computer Graphic Creator: Mohsen Asghari Session 2 Fall 2014.
An Introduction to Light Fields Mel Slater. Outline Introduction Rendering Representing Light Fields Practical Issues Conclusions.
GI 2006, Québec, June 9th 2006 Implementing the Render Cache and the Edge-and-Point Image on Graphics Hardware Edgar Velázquez-Armendáriz Eugene Lee Bruce.
I3D Fast Non-Linear Projections using Graphics Hardware Jean-Dominique Gascuel, Nicolas Holzschuch, Gabriel Fournier, Bernard Péroche I3D 2008.
Real-Time Rendering Paper Presentation Logarithmic Perspective Shadow Maps Brandon Lloyd Naga Govindaraju Cory Quammen Steve Molnar Dinesh Manocha Slides.
CGDD 4003 THE MASSIVE FIELD OF COMPUTER GRAPHICS.
Shadow Silhouette Maps Pradeep Sen, Mike Cammarano, Pat Hanrahan Stanford University.
A Crash Course on Programmable Graphics Hardware Li-Yi Wei 2005 at Tsinghua University, Beijing.
Status – Week 277 Victor Moya.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Models and Architectures Ed Angel Professor of Computer Science, Electrical and Computer.
LOGO Shadows On the GPU Presented by Lukai Lan. LOGO Contents  Introductions  Recent Shadow Maps  What we are NOT covering today  Perspective Shadow.
Part I: Basics of Computer Graphics Rendering Polygonal Objects (Read Chapter 1 of Advanced Animation and Rendering Techniques) Chapter
GPU Graphics Processing Unit. Graphics Pipeline Scene Transformations Lighting & Shading ViewingTransformations Rasterization GPUs evolved as hardware.
Computer Graphics Inf4/MSc Computer Graphics Lecture 11 Texture Mapping.
1 A Hierarchical Shadow Volume Algorithm Timo Aila 1,2 Tomas Akenine-Möller 3 1 Helsinki University of Technology 2 Hybrid Graphics 3 Lund University.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Computer Graphics Mirror and Shadows
REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 Real-Time Volume.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures Vision, Modeling, Visualization Erlangen, Germany November 16-18,
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
CSC 461: Lecture 3 1 CSC461 Lecture 3: Models and Architectures  Objectives –Learn the basic design of a graphics system –Introduce pipeline architecture.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft.
OpenGL Conclusions OpenGL Programming and Reference Guides, other sources CSCI 6360/4360.
Real-time Shadow Mapping. Shadow Mapping Shadow mapping uses two-pass rendering - render depth texture from the light ’ s point-of-view - render from.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Stream Processing Main References: “Comparing Reyes and OpenGL on a Stream Architecture”, 2002 “Polygon Rendering on a Stream Architecture”, 2000 Department.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
1Computer Graphics Lecture 4 - Models and Architectures John Shearer Culture Lab – space 2
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
Shadow Mapping Chun-Fa Chang National Taiwan Normal University.
Perspective Shadow Maps Marc Stamminger REVES/INRIA, Sophia-Antipolis, France now at: Bauhaus-Universität, Weimar, Germany George Drettakis REVES/INRIA,
Accelerated Stereoscopic Rendering using GPU François de Sorbier - Université Paris-Est France February 2008 WSCG'2008.
Binary Space Partitioning Trees Ray Casting Depth Buffering
1 Visiblity: Culling and Clipping Computer Graphics COMP 770 (236) Spring 2009 January 21 & 26: 2009.
Sample Based Visibility for Soft Shadows using Alias-free Shadow Maps Erik Sintorn – Ulf Assarsson – uffe.
- Laboratoire d'InfoRmatique en Image et Systèmes d'information
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
What are shaders? In the field of computer graphics, a shader is a computer program that runs on the graphics processing unit(GPU) and is used to do shading.
Shadows David Luebke University of Virginia. Shadows An important visual cue, traditionally hard to do in real-time rendering Outline: –Notation –Planar.
The Graphics Pipeline Revisited Real Time Rendering Instructor: David Luebke.
Computer Graphics One of the central components of three-dimensional graphics has been a basic system that renders objects represented by a set of polygons.
1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Models and Architectures 靜宜大學 資訊工程系 蔡奇偉 副教授 2012.
A Crash Course on Programmable Graphics Hardware
Graphics Processing Unit
Chapter 6 GPU, Shaders, and Shading Languages
The Graphics Rendering Pipeline
Logarithmic perspective shadow maps
Models and Architectures
Models and Architectures
Introduction to Computer Graphics with WebGL
Practical logarithmic rasterization for low error shadow maps
Real-time Rendering Shadow Maps
Graphics Processing Unit
Computer Graphics One of the central components of three-dimensional graphics has been a basic system that renders objects represented by a set of polygons.
UMBC Graphics for Games
Models and Architectures
A Hierarchical Shadow Volume Algorithm
Models and Architectures
ATO Project: Year 3 Main Tasks
Presentation transcript:

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical Logarithmic Shadow Maps Brandon LloydUNC-CH Naga GovindarajuUNC-CH David TuftUNC-CH Steve MolnarNvidia Dinesh ManochaUNC-CH

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 2 Motivation Interactive shadow computation remains a challenge increasing scene complexity large, open environments user expect high quality

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 3 Shadow maps Simple two pass algorithm Supports wide range of geometric representations Cheap to render Disadvantage: Aliasing artifacts at shadow edges

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 4 Warping algorithms Perspective shadow maps (PSMs) [Stamminger and Drettakis 2002] Increase sample density where needed by reparametrizing the shadow map Trapezoidal shadow maps (TSMs) [Martin and Tan 2004] Light-space perspective shadow maps (LSPSMs) [Wimmer et al. 2004]

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 5 Comparison of parameterizations 4x4 projection matrixLogarithmic

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 6 Main results Logarithmic parameterization for directional and point lights Error analysis for point lights Hardware architecture enhancements for logarithmic rasterization

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 7 Outline Related work Aliasing error Logarithmic parameterization Hardware architecture Results

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 8 Partitioning algorithms Separate shadow maps for different parts of the scene Includes cascaded shadow maps Tiled shadow maps [Arvo 2004] Adaptive shadow maps [Fernando et al. 2001; Lefohn et al. 2006] Plural sunlight buffers [Tadamura et al. 1999,2001]

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 9 Warping + partitioning 4x4 matrix Lixel for every pixel [Chong and Gortler 2004] PSM with cube maps [Kozlov 2004] Warping + various frustum partitioning schemes [Lloyd et al. 2006] Dual paraboloid [Brabec et al. 2002]

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 10 Specialized representations Silhouette shadow maps [Sen et al. 2004] Irregular shadow maps [Johnson et al. 2004,2005; Aila and Laine 2004] Solves the aliasing problem GPU support requires major changes

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 11 Outline Related work Aliasing error Logarithmic parameterization Hardware architecture Results

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 12 Aliasing error shadow plane view frustum eye light

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 13 light beam 'wlwl 'wiwi 'wiwi 'wiwi 'wiwi Aliasing error 'wlwl image beam

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 14 wiwi wlwl light beam image beam θlθl θiθi 'wiwi Aliasing error 'wlwl m= 'wlwl 'wiwi cos θ l cos θ i wlwl wiwi Perspective aliasing cos θ l cos θ i Projection aliasing wlwl wiwi ≈

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 15 wiwi wlwl θlθl θiθi 'wiwi Aliasing error 'wlwl m= 'wlwl 'wiwi wlwl wiwi Perspective aliasing wlwl wiwi ≈ light beam image beam cos θ l cos θ i cos θ l cos θ i Projection aliasing

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 16 wiwi wlwl light beam image beam Controlling aliasing error To eliminate perspective aliasing: w l ≤ w i Light beam width depends on: Shadow map resolution Parameterization

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 17 Outline Related work Aliasing error Logarithmic parameterization Directional light Point light Hardware architecture Results

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 18 Parameterization Standard Perspective warped light image plane shadow map light

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 19 Directional light image beam light image plane t wlwl light z 1 wiwi 1. Light beam widths 2. Texel spacing function 3. Parameterization [Wimmer et al. 04]

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 20 Quadratic z beam width Uniform z beam width Linear z beam width Directional light With 4x4 matrix With logarithm

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 21 Comparison Standard Perspective Logarithmic frustum fov = 60 ○

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 22 Point lights light view frustum

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 23 Point lights light light image plane view frustum face z y w l ~ z

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 24 Point light spacing function - z face y z z y light

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 25 Point light spacing function - z face y light y z z

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 26 Point light spacing function - z face y light y z z

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 27 Point lights – parameterization

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 28 Fitting the spacing function - z Parameterization for exact function is complicated Fit two parabolas: Parameterization: 0 z Point light spacing function

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 29 4x4 matrix + logarithm v c : [x c z c y c w c ] T - clip coordinate v n : [x n z n y n 1] T - normalized device coordinate v : [x z y 1] T - world coordinate P : perspective or orthographic projection matrix a 0 -a 3 : constants b 0 -b 3 : constants To screen coordinates s= a 0 ln( a 1 x n + a 2 ) + a 3 t= b 0 ln( b 1 z n + b 2 ) + b 3 To NDC coords. v c = P v v n = v c /w c

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 30 Parameterization summary DirectionalPoint x: z: without logwith log ortho. persp. Actual spacing functions Spacing functions from 4x4 matrix + log

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 31 Outline Related work Aliasing error Logarithmic parameterization Hardware architecture Results

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 32 Logarithmic parameterization Unwarped view frustum

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 33 Vertex program Transform vertices on the GPU Requires finely tesselated model Increases burden on vertex processor Adaptive tesselation complicated Easier with DX10 geometry shaders

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 34 Fragment program Brute force rasterization Render bounding primitive Transform fragments to original triangle Discard if not inside 10x slow down Computing bounding primitive is complicated Easier with DX10 geometry shaders

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 35 Graphics pipeline fragment processor vertex processor rasterizer alpha, stencil, & depth tests blending clip & back-face cull memory interface depth compression color compression

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 36 Rasterizing equations Coverage determination use sign of edge distance equations Attribute interpolation depth, color, texture coordinates, etc.

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 37 Rasterizing equations Parameterization: Edge distance and attribute interpolation:

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 38 Incremental computation 1 MULT + 2 ADD per step

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 39 Depth compression First orderSecond order Compressed tiles shown in red

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 40 Feasibility Current hardware trend Computational power increasing rapidly Bandwidth lags behind Log shadow maps Increase computation Reduce memory/bandwidth consumption

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 41 Nonlinear rasterization Configurable rasterizer Other rasterization functions are possible Might be useful for other effects Reflections, refractions, caustics, general multi-view perspective [Hou et al. 06]

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 42 Outline Previous work Aliasing error Logarithmic parameterization Hardware implementation Results

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 43 Results Power plant 13 Mtris Oil tanker 82 Mtris Town scene 59 Ktris

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 44 Results StandardPerspective warping Logarithmic

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 45 Results Perspective warpingLogarithmic

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 46 Results Perspective warpingLogarithmic

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 47 Comparison to z-partitioning Perspective with k z-partitions Logarithmic

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 48 Results z-partitioning (k=4)Logarithmic

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 49 Results

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 50 Results Perspective warpingLogarithmic

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 51 Results Perspective warpingLogarithmic

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 52 Results – Point lights StandardPerspective warping Logarithmic high error

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 53 Advantages Logarithmic shadow maps require less bandwidth and storage Smoother parameterization than z-partitioning

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 54 Disadvantages Does not handle projection aliasing Requires multiple shadow maps Up to 5 directional light Up to 4 per frustum face for point light Warped depth values

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 55 Conclusion Logarithmic parameterization Lower error than previous methods Hardware architecture for log rasterization Requires only small enhancements to current graphics hardware Exploits current hardware trends

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 56 Future work More details for hardware implementation precision requirements filtering shadow map bias Other applications for nonlinear rasterization

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 57 Acknowledgements Aaron Lefohn for the town model Supported in part by: NSF Graduate Fellowship ARO Contracts DAAD and W911NF NSF awards and ONR Contract N DARPA/RDECOM Contract N C-0043 Intel

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 58 Questions?

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 59 Coordinate systems view y z x warping frustum view frustum light shadow map t s Light space [Wimmer et al. 04] z x

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 60 Directional light - general case Highest error ( w l /w i ) occurs at the faces Partition frustum to handle each face separately wlwl light shadow map t z