Robust Shadow Maps for Large Environments

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.
Optimized Stencil Shadow Volumes
Optimized Stencil Shadow Volumes
GAM532 DPS932 – Week 7 Introduction to shadows. Shadow Effects Light Surface No Shadows Shadows.
Computer graphics & visualization Global Illumination Effects.
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.
Projective Texture Mapping
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
Week 10 - Monday.  What did we talk about last time?  Global illumination  Shadows  Projection shadows  Soft shadows.
Projection Matrix Tricks Eric Lengyel Outline  Projection Matrix Internals  Infinite Projection Matrix  Depth Modification  Oblique Near Clipping.
1 Dr. Scott Schaefer Shadows. 2/40 Shadows Shadows provide clues about depth Make scenes appear more realistic.
Shadow Silhouette Maps Pradeep Sen, Mike Cammarano, Pat Hanrahan Stanford University.
1 Dynamic Shadows and Lighting for Walkthrus of Large Models Brandon Lloyd COMP 258 December 2002.
Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002.
LOGO Shadows On the GPU Presented by Lukai Lan. LOGO Contents  Introductions  Recent Shadow Maps  What we are NOT covering today  Perspective Shadow.
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.
Shadow Algorithms Ikrima Elhassan.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
2 COEN Computer Graphics I Evening’s Goals n Discuss the mathematical transformations that are utilized for computer graphics projection viewing.
GAM532 DPS932 – Week 8 Texture Shadow Implementation.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Real-time Shadow Mapping. Shadow Mapping Shadow mapping uses two-pass rendering - render depth texture from the light ’ s point-of-view - render from.
Week 10 - Wednesday.  What did we talk about last time?  Shadow volumes and shadow mapping  Ambient occlusion.
Shadows. Shadows is important in scenes, consolidating spatial relationships “Geometric shadows”: the shape of an area in shadow Early days, just pasted.
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
Programming 3D Applications CE Displaying Computer Graphics Week 3 Lecture 5 Bob Hobbs Faculty of Computing, Engineering and Technology Staffordshire.
Computer Graphics 2 Lecture 7: Texture Mapping Benjamin Mora 1 University of Wales Swansea Pr. Min Chen Dr. Benjamin Mora.
Binary Space Partitioning Trees Ray Casting Depth Buffering
Advanced Computer Graphics Shadow Techniques CO2409 Computer Graphics Week 20.
Sample Based Visibility for Soft Shadows using Alias-free Shadow Maps Erik Sintorn – Ulf Assarsson – uffe.
Emerging Technologies for Games Deferred Rendering CO3303 Week 22.
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.
Stencil Shadows Garrett Weng. What are stencil shadows? Also known as shadow volumes Relies on use of the stencil buffer Create volumes of the shadows.
Adaptive Depth Bias for Shadow Maps Hang Dou 4, Yajie Yan 4, Ethan Kerzner 2, Zeng Dai 1, Chris Wyman 3 University of Iowa 1, SCI Institute 2, NVIDIA 3.
Shuen-Huei Guan Seminar in CMLab, NTU
Applications and Rendering pipeline
CENG 477 Introduction to Computer Graphics
Rendering Pipeline Fall, 2015.
Real-Time Soft Shadows with Adaptive Light Source Sampling
Week 7 - Monday CS361.
© University of Wisconsin, CS559 Spring 2004
Deferred Lighting.
3D Graphics Rendering PPT By Ricardo Veguilla.
CENG 477 Introduction to Computer Graphics
The Graphics Rendering Pipeline
View-Dependent Textured Splatting for Rendering Live Scenes
Jim X. Chen George Mason University
© University of Wisconsin, CS559 Fall 2004
(c) 2002 University of Wisconsin
Introduction to Computer Graphics with WebGL
Real-time Rendering Shadow Maps
Chapter V Vertex Processing
UMBC Graphics for Games
UMBC Graphics for Games
Last Time Canonical view pipeline Projection Local Coordinate Space
Progressive Photon Mapping Toshiya Hachisuka Henrik Wann Jensen
CS5500 Computer Graphics May 29, 2006
CS-378: Game Technology Lecture #4: Texture and Other Maps
Last Time Presentation of your game and idea Environment mapping
CSCE 441: Computer Graphics Ray Tracing
ATO Project: Year 3 Main Tasks
Chapter XV Shadow Mapping
Game Programming Algorithms and Techniques
Frame Buffer Applications
Introduction to Ray Tracing
Presentation transcript:

Robust Shadow Maps for Large Environments Daniel Scherzer Hi! I‘m Daniel Scherzer from the Vienna Univerersity of Technology and today I want to talk about: „Robust shadow maps for large environments“ Institute of Computer Graphics and Algorithms Vienna University of Technology

Motivation: The Challenge Huge and dynamic environments More than 100,000 visible triangles Automatic shadow generation No artifacts? Let’s think of a real challenge for shadow generation. We may think of an environment which has huge extents and thousends of objects. As a result of this we may have 100,000 or more visible triangles. We want every object to be a possible dynamic shadow caster or shadow receiver. And we want to do this automatic without any need for a user intervention. And of course we want to achive this without noticable artifacts. Daniel Scherzer

Motivation: Why Shadow Maps? Independent of scene complexity Not as fill-rate limited with many polygons as shadow volumes Only one additional (depth only) render pass Handle self-shadowing correctly Handle arbitrary caster/receiver constellations As the title of the talk already suggests we used shadow maps to conquer the given challenge. Shadow maps where choosen because they offer great independence of the scene complexity And as a result are not as easily fill-rate limited as shadow volumes for the case of many polygons. They also need only one additional depth only render pass. The also can handle self-shadowing and arbitrary caster/receiver constellations. Daniel Scherzer

Shadow Map Algorithm: Second Pass Shadow Map Algorithm: First Pass Light Eye Eye-view Shadow map Render scene from light-view and save depth values Render scene from eye-view Transform each fragment to light source space Compare zeye with zlight value stored in shadow map zeye > zlight fragment is in shadow In the second pass you render the scene from the eyes point-of-view and for each fragment you transform this fragment into light space and in light space you compare the depth values of the eye-fragment and the shadow map texel at this position. and if the depth of the eye fragment is bigger than the fragment is in shadow because its farther away than the texel seen from the light source. Daniel Scherzer

Problem: Perspective aliasing Sufficient resolution far from the observer Insufficient resolution near the observer okay aliased Daniel Scherzer

Problem: Projection aliasing Receivers ~ perpendicular to shadow plane With receivers ruffly perpendicular to the shadow plane we have stored little information in the shadow map. From the observers point of view this can lead to very noticable artefacts caused by projection aliasing. Daniel Scherzer

Problem: Self-(un)shadowing Polygon Observers‘s distance > shadow depth Incorrect self-shadowing Daniel Scherzer

Problems of Shadow Maps Cause Sample Error Perspective aliasing Insufficient resolution near the observer Projection aliasing Insufficient resolution on polygons almost parallel to the light direction Self-(un) shadowing Moiré-patterns Daniel Scherzer

Solution: Perspective aliasing Insufficient resolution near the observer aliased okay Daniel Scherzer

Solution: Perspective aliasing Insufficient resolution near the observer Redistribute shadow map samples Daniel Scherzer

Solution: Perspective aliasing Sufficient resolution near the observer Redistribute shadow map samples still okay okay now Daniel Scherzer

Solution: Perspective aliasing How do we redistribute the shadow map samples? Using a perspective transformation Just another perspective matrix During shadow map generation During rendering For further details see [WSP2004] [WSP2004] M. Wimmer, D. Scherzer, and W. Purgathofer; Light space perspective shadow maps; In Proceedings of Eurographics Symposium on Rendering 2004 Daniel Scherzer

Solution: Projection aliasing Receivers ~ perpendicular to shadow plane Redistribution doesn‘t work But! With receivers ruffly perpendicular to the shadow plane we have stored little information in the shadow map. From the observers point of view this can lead to very noticable artefacts caused by projection aliasing. Daniel Scherzer

Solution: Projection aliasing Diffuse lighting: I = IL max( dot( L, N ), 0 ) ~ perpendicular receivers have small I Dark Hides artefacts! L N Daniel Scherzer

Solution: Projection aliasing Guidelines for the light- source Small ambient term Diffuse is good for hiding artefacts Specular is no problem Light direction and view direction nearly the same Resolution in shadow map suffices Daniel Scherzer

Solution: Projection aliasing Screen-space blur of shadows Hides artefacts Shadows get softer Daniel Scherzer

Problem: Self-(un)shadowing Polygon Biased polygon Observers‘s distance > shadow depth Incorrect self-shadowing Observer‘s distance < shadow depth Self-shadowing eliminated Daniel Scherzer

Solution: Self-(un)shadowing How do we choose the bias? No biasing Constant biasing Slope-scale biasing Daniel Scherzer

Solution: Self-(un)shadowing How do we choose the bias? Perspective Z is hyperbolic, not linear! Normal Slope-scale doesn’t work Do slope-scale biasing On the post-projective Z-slope Or calculate linear Z with vertex shader Another problem occurs for spot lights and for techniques to reduce the perspective aliasing, because here we have a perspective Z. Daniel Scherzer

Solution: Self-(un)shadowing Other possibility to avoid self-shadowing: Normally we use the front-side polygons Now we use the back-side polygons Only works with watertight models Daniel Scherzer

Conclusions Cause Sample Solution Perspective aliasing Perspective Transformation (LispSM) Projection aliasing Blurring, light-model Self-(un) shadowing Biasing, back-side rendering Daniel Scherzer

Putting It All Together Daniel Scherzer