The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft.

Slides:



Advertisements
Similar presentations
Point-based Graphics for Estimated Surfaces
Advertisements

CS 352: Computer Graphics Chapter 7: The Rendering Pipeline.
Graphics Pipeline.
RealityEngine Graphics Kurt Akeley Silicon Graphics Computer Systems.
Week 10 - Monday.  What did we talk about last time?  Global illumination  Shadows  Projection shadows  Soft shadows.
3D Graphics Rendering and Terrain Modeling
Real-Time Rendering TEXTURING Lecture 02 Marina Gavrilova.
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.
Rasterization and Ray Tracing in Real-Time Applications (Games) Andrew Graff.
Computer Graphics Hardware Acceleration for Embedded Level Systems Brian Murray
A Real-Time Soft Shadow Volume Algorithm DTU Vision days Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology Sweden
A Crash Course on Programmable Graphics Hardware Li-Yi Wei 2005 at Tsinghua University, Beijing.
3D Graphics Processor Architecture Victor Moya. PhD Project Research on architecture improvements for future Graphic Processor Units (GPUs). Research.
Specialized Acceleration Structures for Ray-Tracing Warren Hunt Bill Mark.
IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.
Approximate Soft Shadows on Arbitrary Surfaces using Penumbra Wedges Tomas Akenine-Möller Ulf Assarsson Department of Computer Engineering, Chalmers University.
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.
© 2004 Tomas Akenine-Möller1 Shadow Generation Hardware Vision day at DTU 2004 Tomas Akenine-Möller Lund University.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical Logarithmic Shadow Maps Brandon LloydUNC-CH Naga GovindarajuUNC-CH David TuftUNC-CH Steve MolnarNvidia.
GPU Graphics Processing Unit. Graphics Pipeline Scene Transformations Lighting & Shading ViewingTransformations Rasterization GPUs evolved as hardware.
Computer Graphics Shadows
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.
Shadows Computer Graphics. Shadows Shadows Extended light sources produce penumbras In real-time, we only use point light sources –Extended light sources.
Erdem Alpay Ala Nawaiseh. Why Shadows? Real world has shadows More control of the game’s feel  dramatic effects  spooky effects Without shadows the.
Computer Graphics Mirror and Shadows
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
CSC 461: Lecture 3 1 CSC461 Lecture 3: Models and Architectures  Objectives –Learn the basic design of a graphics system –Introduce pipeline architecture.
Real-time Shadow Mapping. Shadow Mapping Shadow mapping uses two-pass rendering - render depth texture from the light ’ s point-of-view - render from.
Introduction to Parallel Rendering Jian Huang, CS 594, Spring 2002.
CSE Real Time Rendering Week 2. Graphics Processing 2.
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.
1Computer Graphics Lecture 4 - Models and Architectures John Shearer Culture Lab – space 2
Perspective Shadow Maps Marc Stamminger REVES/INRIA, Sophia-Antipolis, France now at: Bauhaus-Universität, Weimar, Germany George Drettakis REVES/INRIA,
Computer Graphics 2 Lecture 7: Texture Mapping Benjamin Mora 1 University of Wales Swansea Pr. Min Chen Dr. Benjamin Mora.
Hardware-accelerated Rendering of Antialiased Shadows With Shadow Maps Stefan Brabec and Hans-Peter Seidel Max-Planck-Institut für Informatik Saarbrücken,
Binary Space Partitioning Trees Ray Casting Depth Buffering
Sample Based Visibility for Soft Shadows using Alias-free Shadow Maps Erik Sintorn – Ulf Assarsson – uffe.
Global Illumination. Local Illumination  the GPU pipeline is designed for local illumination  only the surface data at the visible point is needed to.
A SEMINAR ON 1 CONTENT 2  The Stream Programming Model  The Stream Programming Model-II  Advantage of Stream Processor  Imagine’s.
Fateme Hajikarami Spring  What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations.
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.
Real-Time Dynamic Shadow Algorithms Evan Closson CSE 528.
Shadows David Luebke University of Virginia. Shadows An important visual cue, traditionally hard to do in real-time rendering Outline: –Notation –Planar.
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.
09/23/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Reflections Shadows Part 1 Stage 1 is in.
1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Models and Architectures 靜宜大學 資訊工程系 蔡奇偉 副教授 2012.
Shuen-Huei Guan Seminar in CMLab, NTU
A Crash Course on Programmable Graphics Hardware
Graphics Processing Unit
Robust Shadow Maps for Large Environments
The Graphics Rendering Pipeline
Logarithmic perspective shadow maps
Hybrid Ray Tracing of Massive Models
Models and Architectures
Models and Architectures
Models and Architectures
Introduction to Computer Graphics with WebGL
Alias-Free Shadow Maps
Practical logarithmic rasterization for low error shadow maps
Real-time Rendering Shadow Maps
UMBC Graphics for Games
Models and Architectures
A Hierarchical Shadow Volume Algorithm
Models and Architectures
ATO Project: Year 3 Main Tasks
RADEON™ 9700 Architecture and 3D Performance
Presentation transcript:

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Practical logarithmic rasterization for low error shadow maps Brandon LloydUNC-CH Naga GovindarajuMicrosoft Steve MolnarNVIDIA Dinesh ManochaUNC-CH

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 2 Shadows Shadows are important aid spatial reasoning enhance realism can be used for dramatic effect High quality shadows for real-time applications remains a challenge

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 3 Shadow approaches Raytracing [Whitted 1980] not yet real-time for complex, dynamic scenes at high resolutions Shadow volumes [Crow 1977] can exhibit poor performance on complex scenes

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 4 Light Eye Shadow maps [Williams 1978]

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 5 Logarithmic perspective shadow maps (LogPSMs) [Lloyd et al. 2007] Standard shadow mapLogPSM

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 6 Logarithmic perspective shadow maps (LogPSMs) [Lloyd et al. 2007] Standard shadow mapLogPSM

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 7 Goal linear rasterizationlogarithmic rasterization Perform logarithmic rasterization at rates comparable to linear rasterization

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 8 Outline Background Handling aliasing error LogPSMs Hardware enhancements Conclusion and Future work

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 9 High resolution shadow maps Requires more bandwidth Decreases shadow map rendering performance Requires more storage Increased contention for limited GPU memory Decreased cache coherence Decreases image rendering performance Poor shadow map query locality

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 10 Sample at shadow map query positions No aliasing Uses irregular data structures requires fundamental changes to graphics hardware [Johnson et al. 2005] Irregular z-buffer [Aila and Laine 2004; Johnson et al. 2004]

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 11 Adaptive partitioning Adaptive shadow maps [Fernando et al. 2001] Queried virtual shadow maps [Geigl and Wimmer 2007] Fitted virtual shadow maps [Geigl and Wimmer 2007] Resolution matched shadow maps [Lefohn et al. 2007] Multiple shadow frusta [Forsyth 2006]

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 12 Adaptive partitioning Requires scene analysis Uses many rendering passes

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 13 Scene-independent schemes Match spacing between eye samples Faster than adaptive partitioning no scene analysis few render passes eye sample spacing

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 14 Cascaded shadow maps [Engel 2007] Parallel split shadow maps [Zhang et al. 2006] Cascade shadow maps

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 15 Projective warping Perspective shadow maps (PSMs) [Stamminger and Drettakis 2002] Light-space perspective shadow maps (LiSPSMs) [Wimmer et al. 2004] Trapezoidal shadow maps (TSMs) [Martin and Tan 2004] Lixel for every pixel [Chong and Gortler 2004]

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 16 Projective warping Not necessarily the best spacing distribution PSM LiSPSM high error low error moderate error y x

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 17 Logarithmic+perspective parameterization Perspective projection Logarithmic transform Resolution redistribution

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 18 Size of the shadow map* required to remove aliasing error (ignoring surface orientation) Uniform Perspective Logarithmic + perspective Bandwidth/storage savings - near and far plane distances of view frustum *shadow map texels / image pixels

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 19 Single shadow map LogPSM LogPSMs have lower maximum error more uniform error Image resolution: Shadow map resolution: f/n = 300 Grid lines for every 10 shadow map texels Color coding for maximum texel extent in image LiSPSM LogPSM LiSPSM LogPSM

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 20 Comparisons

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 21 More details Logarithmic perspective shadow maps UNC TR

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 22 Outline Background Hardware enhancements rasterization to nonuniform grid generalized polygon offset depth compression Conclusion and Future work

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 23 Graphics pipeline fragment processor vertex processor rasterizer alpha, stencil, & depth tests blending clipping memory interface depth compression color compression setup

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 24 Rasterization Coverage determination coarse stage– compute covered tiles fine stage – compute covered pixels Attribute interpolation interpolate from vertices depth, color, texture coordinates, etc.

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 25 Signs used to compute coverage Water-tight rasterization Use fixed-point fixed-point “snaps” sample locations to an underlying uniform grid Edge equations

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 26 Attribute interpolation Same form as edge equations:

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 27 Logarithmic rasterization light spacelinear shadow map space warped shadow map space Linear rasterization with nonuniform grid locations. y x y'y' x

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 28 Edge and interpolation equations Monotonic existing tile traversal algorithms still work optimizations like z-min/z-max culling still work

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 29 Coverage determination for a tile Full parallel implementation Full evaluation

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 30 Per-triangle constants Coverage determination for a tile Incremental in x Full evaluation Incremental x 12

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 31 Generalized polygon offset texel width - depth slope - smallest representable depth difference constant light

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 32 Generalized polygon offset texel width - depth slope - smallest representable depth difference constant not constant light

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 33 Generalized polygon offset Do max per pixel Split polygon Interpolate max at end points

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 34 Depth compression Important for reducing memory bandwidth requirements Exploits planarity of depth values Depth compression survey [Hasselgren and Möller 2006] depth compressor tile tile table store compressed yes store uncompressed no fits in bit budget?

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 35 Depth compression - Standard compressed untouched clamped Linear depth compressionOur depth compression Resolution: 512x512

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 36 Depth compression - LiSPSM compressed untouched clamped Linear depth compressionOur depth compression Resolution: 512x512

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 37 Depth compression - LogPSM compressed untouched clamped Linear depth compressionOur depth compression Resolution: 512x512

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 38 Depth compression – LogPSM Higher resolution compressed untouched clamped Linear depth compressionOur depth compression low curvature Resolution: 1024x1024

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 39 ΔxΔxΔxΔxΔxΔx ΔxΔxΔxΔxΔxΔx ΔxΔxΔxΔxΔxΔx ΔxΔxΔxΔxΔxΔx ΔyΔy ΔyΔy ΔyΔy z0z0 dd dda0a0 a1a1 dd ddz0z0 ΔyΔy ΔyΔy ΔyΔy ΔyΔy ΔxΔx Differential encoding Anchor encoding128-bit allocation table Our compression scheme

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 40 Test scenes Town model 58K triangles Robots model 95K triangles Power plant 13M triangles 2M rendered

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 41 Compression methods tested Anchor encoding [Van Dyke and Margeson 2005] Differential differential pulse code modulation (DDPCM) [DeRoo et al. 2002] Plane and offset [Ornstein et al. 2005] Hasselgren and Möller [2006]

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 42 Compression results Average compression over paths through all models Varying light and view direction

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 43 Compression results Anchor encoding best linear method higher tolerance for curvature

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 44 Summary of hardware enhancements Apply F(y) to vertices in setup log and multiply-add operations Evaluators for G(y’) exponential and multiply-add operations Possible increase in bit width for rasterizer Generalized polygon offset New depth compression unit can be used for both linear and logarithmic rasterization

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 45 Feasibility Leverages existing designs Trades computation for bandwidth Aligns well with current hardware trends computation cheap bandwidth expensive

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 46 Conclusion Shadow maps Handling errors requires high resolution Logarithmic rasterization significant savings in bandwidth and storage Incremental hardware enhancements Rasterization to nonuniform grid Generalized polygon offset Depth compression Feasible leverages existing designs aligns well with hardware trends

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 47 Future work Prototype and more detailed analysis Greater generalization for the rasterizer reflections, refraction, caustics, multi-perspective rendering [Hou et al. 2006; Liu et al. 2007] paraboloid shadow maps for omnidirectional light sources [Brabec et al. 2002] programmable rasterizer?

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 48 Acknowledgements Jon Hasselgren and Thomas Akenine-Möller for depth compression code Corey Quammen for help with video Ben Cloward for robots model Aaron Lefohn and Taylor Halliday for town model

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 49 Acknowledgements Funding agencies NVIDIA University Fellowship NSF Graduate Fellowship ARO Contracts DAAD and W911NF NSF awards , and DARPA/RDECOM Contract N C-0043 Disruptive Technology Office.

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 50 Questions

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 51 Precision depends on resolution in y and Inputs limited to 24 bits of precision (floating point mantissa)

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 52 Generalized polygon offset f For flythroughs in our test scenes: Split situation occured for 1% of polygons Average was.001

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 53 Coverage determination for a tile Incremental in y Full evaluation Incremental x Incremental y Per-frame constants

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 54 Coverage determination for a tile Look up table Full evaluation Incremental x Incremental y LUT 21 Per-frame constants

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 55 Coverage determination for a tile Look up table Full evaluation Incremental x Incremental y LUT Per-frame constants

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 56 Comparisons Standard FP+Perspective ZP5+PerspectiveFP+Log+Perspective

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 57 Equal error (4096x2053) (210x1248) LiSPSMLogSPSM

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 58 Simulating logarithmic rasterization Apply F(y) in vertex program requires fine tesselation to avoid error increases vertex transformation load Brute-force rasterization with a fragment program disables optimizations due to depth writes