Hardware-accelerated Rendering of Antialiased Shadows With Shadow Maps Stefan Brabec and Hans-Peter Seidel Max-Planck-Institut für Informatik Saarbrücken,

Slides:



Advertisements
Similar presentations
Exploration of advanced lighting and shading techniques
Advertisements

CS123 | INTRODUCTION TO COMPUTER GRAPHICS Andries van Dam © 1/16 Deferred Lighting Deferred Lighting – 11/18/2014.
Technische Universität München Computer Graphics SS 2014 Graphics Effects Rüdiger Westermann Lehrstuhl für Computer Graphik und Visualisierung.
Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Object Space EWA Surface Splatting: A Hardware Accelerated Approach to High Quality Point Rendering Liu Ren Hanspeter Pfister Matthias Zwicker CMU.
Understanding the graphics pipeline Lecture 2 Original Slides by: Suresh Venkatasubramanian Updates by Joseph Kider.
RealityEngine Graphics Kurt Akeley Silicon Graphics Computer Systems.
CS 4363/6353 BASIC RENDERING. THE GRAPHICS PIPELINE OVERVIEW Vertex Processing Coordinate transformations Compute color for each vertex Clipping and Primitive.
Course Note Credit: Some of slides are extracted from the course notes of prof. Mathieu Desburn (USC) and prof. Han-Wei Shen (Ohio State University). CSC.
Texture Mapping. Texturing  process that modifies the appearance of each point on a surface using an image or function  any aspect of appearance can.
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
Render Cache John Tran CS851 - Interactive Ray Tracing February 5, 2003.
Real-Time Rendering TEXTURING Lecture 02 Marina Gavrilova.
High-Quality Parallel Depth-of- Field Using Line Samples Stanley Tzeng, Anjul Patney, Andrew Davidson, Mohamed S. Ebeida, Scott A. Mitchell, John D. Owens.
CS 551 / CS 645 Antialiasing. What is a pixel? A pixel is not… –A box –A disk –A teeny tiny little light A pixel is a point –It has no dimension –It occupies.
Shadow Volumes Revisited Stefan Roettger Alexander Irion Thomas Ertl University of Stuttgart, VIS Group.
Rasterization and Ray Tracing in Real-Time Applications (Games) Andrew Graff.
A Real-Time Soft Shadow Volume Algorithm DTU Vision days Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology Sweden
Point Rendering for Impostors Andreas Bærentzen IMM.
Paper by Alexander Keller
Parallel Graphics Rendering Matthew Campbell Senior, Computer Science
Computer Graphics Shadows
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
Aaron Schultz. Idea: Objects close to a light shadow those far away. Anything we can see from the light’s POV is lit. Everything hidden is dark. Distance.
Ray Tracing Primer Ref: SIGGRAPH HyperGraphHyperGraph.
Programmable Pipelines. Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
Programmable Pipelines. 2 Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
Interactive Time-Dependent Tone Mapping Using Programmable Graphics Hardware Nolan GoodnightGreg HumphreysCliff WoolleyRui Wang University of Virginia.
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 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
Week 2 - Friday.  What did we talk about last time?  Graphics rendering pipeline  Geometry Stage.
VIS Group, University of Stuttgart Tutorial T4: Programmable Graphics Hardware for Interactive Visualization Adaptive Terrain Slicing (Stefan Roettger)
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Penumbra Deep Shadow Maps Jean-Francois St-Amour, LIGUM – Université de Montreal Eric Paquette, LESIA - ETS Pierre Poulin, LIGUM – Université de Montreal.
CS 638, Fall 2001 Multi-Pass Rendering The pipeline takes one triangle at a time, so only local information, and pre-computed maps, are available Multi-Pass.
OpenGL Conclusions OpenGL Programming and Reference Guides, other sources CSCI 6360/4360.
Stream Processing Main References: “Comparing Reyes and OpenGL on a Stream Architecture”, 2002 “Polygon Rendering on a Stream Architecture”, 2000 Department.
Multi-pass Rendering. © 2002 James K. Hahn, N.H. Baek2 Multi-pass Rendering Repeat: image  Rendering pass  result imageRepeat: image  Rendering pass.
Shadow Mapping Chun-Fa Chang National Taiwan Normal University.
Tone Mapping on GPUs Cliff Woolley University of Virginia Slides courtesy Nolan Goodnight.
Rendering Fake Soft Shadows with Smoothies Eric Chan Massachusetts Institute of Technology.
Sample Based Visibility for Soft Shadows using Alias-free Shadow Maps Erik Sintorn – Ulf Assarsson – uffe.
09/16/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Environment mapping Light mapping Project Goals for Stage 1.
- Laboratoire d'InfoRmatique en Image et Systèmes d'information
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Lecture 6 Rasterisation, Antialiasing, Texture Mapping,
A SEMINAR ON 1 CONTENT 2  The Stream Programming Model  The Stream Programming Model-II  Advantage of Stream Processor  Imagine’s.
Computer Graphics 3 Lecture 6: Other Hardware-Based Extensions Benjamin Mora 1 University of Wales Swansea Dr. Benjamin Mora.
Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba.
11/24/ :45 Graphics II Shadow Maps Reflections Session 5.
Depth-of-Field Rendering with Multiview Synthesis SigGraph Asia 2009 Sungkil Lee, Elmar Eisemann, and Hans-Peter Seidel Sunyeong Kim Nov. 2 nd
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.
1 Shadow Rendering Techniques: Hard and Soft Author: Jamiur Rahman Supervisor: Mushfiqur Rouf Department of CSE BRAC University.
Convolution Shadow Maps * MPI Informatik Germany † Hasselt University Belgium ‡ University College London UK T. Annen * T. Mertens † P. Bekaert † H.-P.
Shuen-Huei Guan Seminar in CMLab, NTU
Graphics Pipeline Bringing it all together. Implementation The goal of computer graphics is to take the data out of computer memory and put it up on the.
Discrete Techniques.
Real-Time Soft Shadows with Adaptive Light Source Sampling
The Graphics Rendering Pipeline
Introduction to Computer Graphics with WebGL
Real-time Rendering Shadow Maps
UMBC Graphics for Games
RADEON™ 9700 Architecture and 3D Performance
Chapter XV Shadow Mapping
Frame Buffer Applications
Presentation transcript:

Hardware-accelerated Rendering of Antialiased Shadows With Shadow Maps Stefan Brabec and Hans-Peter Seidel Max-Planck-Institut für Informatik Saarbrücken, Germany

Stefan Brabec, MPI Informatik Overview Introduction Shadow mapping using graphics hardware Hardware-based percentage closer filtering A faster approach Results Conclusions

Stefan Brabec, MPI Informatik Introduction Hardware-accelerated rendering mostly dominated by local effects – Triangle through-put – Fast lighting & texturing Most important global effect are shadows – Two main classes of shadow algorithms Shadow Volumes [Crow ’77] Shadow Maps [Williams ’78]

Stefan Brabec, MPI Informatik Shadow Mapping Sampling based approach – Generate depth map from light source position Store depth values of frontmost pixels – Final rendering pass Foreach pixel seen by the camera: –Transform to light source coordinate system –Compare corresponding entry in depth map with transformed camera depth

Stefan Brabec, MPI Informatik Shadow Mapping Shadow Maps – Make their way to hardware SGI InfiniteReality, NVIDIA GeForce3, ATI – Implemented as special texture map operation Compare value at (s/q,t/q) with r/q -> result 1 or 0 – Can also be implemented using standard OpenGL

Stefan Brabec, MPI Informatik Shadow Mapping Pros: – Does not depend on scene geometry – Can be implemented using graphics-hardware Cons: – Sampling problems (aliasing) High resolution depth maps Filtering

Stefan Brabec, MPI Informatik Shadow Mapping Percentage closer filtering [Reeves `87] – Filtering depth values makes no sense – Perform shadow test before filtering

Stefan Brabec, MPI Informatik Shadow Mapping Our Shadow Mapping Approach – Render scene as seen by light source – Encode depth values in alpha channel – Project this texture into the final scene – Subtract depth values to determine lit pixels

Stefan Brabec, MPI Informatik Shadow Mapping 1D ramp texture brings depth to color values

Stefan Brabec, MPI Informatik Hardware-based PCF How can Reeves’ scheme be adopted for hardware-based shadow mapping ? Idea: – Generate multi-channel depth map where each entry contains also values of neighborhood pixels

Stefan Brabec, MPI Informatik Shadow Mapping Problem: 1D ramp texture can only use 256 depth values because of frame buffer depth – Only for scenes with moderate complexity But: 16 bits possible with NVIDIA’s register combiners – Use two color channels (high & low 8 bits) – See NVIDIA website for more details

Stefan Brabec, MPI Informatik Hardware-based PCF Multi-channel shadow map – Use RGBA instead of alpha channel only 4 values to sample a 2x2 region Increases effective shadow map resolution by a factor of 2 in each dimension – Shadow map generation: Render scene four times where in each pass –One channel (R,G,B or A) is selected –Image-plane is jittered (stratified sampling) Copy RGBA image to texture

Stefan Brabec, MPI Informatik Hardware-based PCF Stratified sampling and pixel packing

Stefan Brabec, MPI Informatik Hardware-based PCF Computing the percentage of shadowing – Final pass using all four channels R = camera_z – light_z_sample_1 G = camera_z – light_z_sample_2 B = camera_z – light_z_sample_3 A = camera_z – light_z_sample_4 – Channel is in shadow if value > 0

Stefan Brabec, MPI Informatik Hardware-based PCF Computing the percentage of shadowing – Implemented using OpenGL Imaging Subset 64,63 corresponds to 25 % shadow Sums up to 255 for full shadow

Stefan Brabec, MPI Informatik Hardware-based PCF Larger filter sizes possible – Split up into parts of max. 4 components – Sum up shadow contributions using the accumulation buffer Problem: – Number of rendering passes (scene geometry) not really practical for dynamic scenes

Stefan Brabec, MPI Informatik Fast PCF Problem: – Previous algorithm needs four passes only for shadow map generation Unsuitable for very complex scenes Fast PCF: – Use only one rendering pass and collect neighborhood pixels

Stefan Brabec, MPI Informatik Fast PCF Fast PCF filtering and pixel packing

Stefan Brabec, MPI Informatik Fast PCF Collect pixels using convolution Currently the only hardware-accelerated operation to include information from adjacent pixels

Stefan Brabec, MPI Informatik Fast PCF Center pixel consists of RGBA values taken from lower-left 2x2 region Use larger (3x3) filter for best hardware support Assemble pixels using neighborhood channels

Stefan Brabec, MPI Informatik Fast PCF Texture coordinate offset – Shift center pixel to be centered in 2x2 region

Stefan Brabec, MPI Informatik Fast PCF Fast PCF only uses one rendering pass for shadow map generation – Suitable for larger filter sizes – Example: 4x4 footprint Four passes which will sample the lower right, lower left, upper right and upper left 2x2 region Results in 4*5=20 shadowing levels Four shadow map textures used

Stefan Brabec, MPI Informatik Results without filtering

Stefan Brabec, MPI Informatik Results normal PCF (filter size 2x2)

Stefan Brabec, MPI Informatik Results fast PCF (filter size 2x2)

Stefan Brabec, MPI Informatik Results real PCF vs. fast PCF

Stefan Brabec, MPI Informatik Results fast,multipass PCF (filter size 4x4)

Stefan Brabec, MPI Informatik Results Timings & Overview No filtering PCF 2x2 Fast PCF 2x2 PCF 4x4 30 fps 10 fps 20 fps < 0.5 fps 1 pass 4 passes 1 pass 16 passes 2 levels 5 levels 20 levels Fast PCF 4x45 fps4 passes20 levels Machine: SGI Octane VPro/8 Image Resolution: 800x600 Shadow Map: 512x512 Polygons: 7000 Frame rateGenerationShadowing

Stefan Brabec, MPI Informatik no filtering

Stefan Brabec, MPI Informatik fast PCF (filter size 2x2)

Stefan Brabec, MPI Informatik Conclusions Benefits: – Good-looking, anti-aliased shadows – Hardware-based (fast) – Standard OpenGL Drawbacks: – OpenGL Imaging Subset not everywhere available – Depth to color mapping needs more than 8 bits per channel for complex scenes

Stefan Brabec, MPI Informatik Conclusions Future Work: – Now: only constant filter sizes – Better: mipmap-like method to compute filter size using the projected area

Stefan Brabec, MPI Informatik Thank You ! Visit us at Max-Planck-Institut für Informatik Computer Graphics Group