



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




ECE/CS 412 Introduction to Computer Graphics Pradeep Sen Class 25– November 26, 2008
Pradeep Sen Advanced Graphics Lab
Class 25 November 26, 2008
ECE/CS 412 Introduction to Computer Graphics Pradeep Sen Class 25– November 26, 2008
Shadows
ECE/CS 412 Introduction to Computer Graphics Pradeep Sen Class 25– November 26, 2008
Shadows are an important part of any image
Help define the spatial relationship between objects
source: artis.imag.fr ECE/CS 412 Introduction to Computer Graphics Pradeep Sen Class 25– November 26, 2008
Shadows are an important part of any image Help define the spatial relationship between objects Create “mood” for scene
Toy Story 2 , Pixar (1999)
ECE/CS 412 Introduction to Computer Graphics Pradeep Sen Class 25– November 26, 2008
Shadows are an important part of any image
Help define the spatial relationship between objects
Create “mood” for scene
Add to game play
Doom 3 , id (2004) ECE/CS 412 Introduction to Computer Graphics Pradeep Sen Class 25– November 26, 2008
Shadows are an important part of any image Help define the spatial relationship between objects Create “mood” for scene Add to game play Make an image look photorealistic
Final Fantasy , Square (2001)
ECE/CS 412 Introduction to Computer Graphics Pradeep Sen Class 25– November 26, 2008
Why are shadows so hard to compute?
This is the first example of non-local light transport we are looking at
Consider our rendering model: as we rasterize each triangle and shade it we don’t have information about the rest of the scene!
To render shadows, we have to know what else is going on in the scene
An example of “global illumination”
ECE/CS 412 Introduction to Computer Graphics Pradeep Sen Class 25– November 26, 2008
Kinds of shadows
Hard shadows
ECE/CS 412 Introduction to Computer Graphics Pradeep Sen Class 25– November 26, 2008
Examples
Hard shadows Soft shadows
Sen et al. SIGGRAPH 2003 Ng et al. SIGGRAPH 2004
ECE/CS 412 Introduction to Computer Graphics Pradeep Sen Class 25– November 26, 2008
Hard shadows
There are several algorithms to cast hard shadows in real-time:
ECE/CS 412 Introduction to Computer Graphics Pradeep Sen Class 25– November 26, 2008
Planar shadows
Used to cast shadows onto a flat plane
Very common in games
Madden 2007 , Electronic Arts (2006) ECE/CS 412 Introduction to Computer Graphics Pradeep Sen Class 25– November 26, 2008
Planar shadows
Used to cast shadows onto a flat plane Very common in games
Madden 2007 , Electronic Arts (2006)
ECE/CS 412 Introduction to Computer Graphics Pradeep Sen Class 25– November 26, 2008
Problems with shadow maps
Aliasing artifacts because of quantization of depth map!
ECE/CS 412 Introduction to Computer Graphics Pradeep Sen Class 25– November 26, 2008
Proposed solutions for artifacts
For the past 20 years, there have been many proposed solutions to address these quantization artifacts
ECE/CS 412 Introduction to Computer Graphics Pradeep Sen Class 25– November 26, 2008
Percentage closer filtering
Developed by Reeves et al. SIGGRAPH 1987 to address these artifacts
Observation: multiple samples can be used to reduce quantization artifacts
The trick is how to filter these samples properly
ECE/CS 412 Introduction to Computer Graphics Pradeep Sen Class 25– November 26, 2008
Adaptive shadow maps
Developed by Fernando et al. SIGGRAPH 2001 Observation: combat aliasing by dedicating more samples to the region that the user is currently viewing They develop a hierarchical structure that stores depth maps of varying resolutions
ECE/CS 412 Introduction to Computer Graphics Pradeep Sen Class 25– November 26, 2008
Adaptive shadow maps
standard shadow maps adaptive shadow maps
ECE/CS 412 Introduction to Computer Graphics Pradeep Sen Class 25– November 26, 2008
Perspective shadow maps
Developed by Stamminger and Drettakis (SIGGRAPH 2002) Observation: one source of artifacts is the differences in perspective projection between the light source and viewer Combat these artifacts by transforming the objects by the eye’s perspective projection before computing the shadow map
ECE/CS 412 Introduction to Computer Graphics Pradeep Sen Class 25– November 26, 2008
Sources of artifacts
From Stamminger et al. SIGGRAPH 02
cos( )
cos() α
β i s s r d = dr
Perspective aliasing Projective aliasing ECE/CS 412 Introduction to Computer Graphics Pradeep Sen Class 25– November 26, 2008
Perspective shadow maps
From Stamminger et al. SIGGRAPH 02
ECE/CS 412 Introduction to Computer Graphics Pradeep Sen Class 25– November 26, 2008
Perspective shadow maps results
standard shadow maps (^) perspective shadow maps
ECE/CS 412 Introduction to Computer Graphics Pradeep Sen Class 25– November 26, 2008
Problems with perspective shadow maps
Lots of special cases that are difficult to implement
ECE/CS 412 Introduction to Computer Graphics Pradeep Sen Class 25– November 26, 2008
Shadow silhouette maps
Observation: shadow maps work well in regions that are fully lit and regions that are fully shadowed
The quantization artifacts are due to the approximation of the sample as a box
Can we use the silhouette map algorithm to deform the box to match shadow discontinuities?
ECE/CS 412 Introduction to Computer Graphics Pradeep Sen Class 25– November 26, 2008
depth map
Shadow silhouette map algorithm
silhouette map
Enhance the depth map with a new texture: the silhouette map