![Page 1: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/1.jpg)
Perspective Shadow Maps
Marc Stamminger and George Drettakis
Speaker: AlvinSpeaker: Alvin
Date: 5/28/2003Date: 5/28/2003
SIGGRAPH 2002SIGGRAPH 2002
![Page 2: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/2.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 2
Outline
– Shadow Maps– Shadow Map Aliasing– Frame Works– Light Sources– Point Rendering– Result– Conclusion
![Page 3: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/3.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 3
Shadow Maps
[Williams78]Casting curved shadows
on curved surfaces– Image-space algorithm– Well suited for hardware
implementation
![Page 4: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/4.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 4
Shadow Maps Algorithm
– Render scene as seen from light source
– Save back depth buffer (2D shadow map)
– Render scene from viewer’s position• Transform pixel coordinates to light source space• Compare z with z value stored in shadow map
– Pixel is in shadow if z(light) < z(viewer)
![Page 5: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/5.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 5
Outline
– Shadow Maps– Perspective Aliasing– Frame Works– Light Sources– Point Rendering– Result– Conclusion
![Page 6: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/6.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 6
Perspective aliasing
![Page 7: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/7.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 7
Outline
– Shadow Maps– Perspective Aliasing– Frame Works– Light Sources– Point Rendering– Result– Conclusion
![Page 8: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/8.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 8
IdeaIdea
uniform shadow map perspective shadow map
![Page 9: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/9.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 9
IdeaIdea
uniform shadow map perspective shadow map
![Page 10: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/10.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 10
Frame Works
– Map the scene to post-perspective space.
– Generate a standard shadow map in this space by rendering a view from the transformed light source to the unit cube.
![Page 11: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/11.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 11
Including Objects Casting Including Objects Casting ShadowsShadows
S: The bounding box of the scene objects.S: The bounding box of the scene objects.
V: The viewing frustum.V: The viewing frustum.
L: The light frustum.L: The light frustum.
l: The light source.l: The light source.
M: Contain all rays from the points in V to l.M: Contain all rays from the points in V to l.
H: M H: M ۸۸ S S ۸۸ LL
![Page 12: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/12.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 12
Shadows From Behind
► Virtually move camera backwards
![Page 13: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/13.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 13
Outline
– Shadow Maps– Perspective Aliasing– Frame Works– Light Sources– Point Rendering– Result– Conclusion
![Page 14: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/14.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 14
Light Sources
– Parallel light transformation– Point light transformation
In this paper, point lights means spot lights.
– Discussion
![Page 15: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/15.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 15
Parallel Light Transformation
– Parallel light becomes point light at infinity.– Perspective mapping can move these
source to a infinity position. z = (far+near)/(far-near)– A directional light source from behind is
mapped to a “inverted” point light source.– Inverted point can be handle as hit point
furthest from the point source survive.
![Page 16: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/16.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 16
Parallel Light Transformation
![Page 17: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/17.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 17
Point light transformation
– Point light sources in front of the viewer remain point lights.
– Point light sources behind the viewer are mapped beyond the infinity plane and becomes inverted.
– Point light sources on the plane which is perpendicular to the view direction become directional.
![Page 18: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/18.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 18
Point light transformation
![Page 19: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/19.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 19
Discussion
– Worst case:Become uniform shadow map.
– Best case: – Parallel light in post-perspective space. – No new perspective distortion.
![Page 20: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/20.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 20
Near Plane Selection
– Near plane as far as possible
– Automatic selection: reading back depth buffer.
![Page 21: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/21.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 21
Outline
– Shadow Maps– Perspective Aliasing– Frame Works– Light Sources– Point Rendering– Result– Conclusion
![Page 22: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/22.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 22
Point Rendering
– Not suited for uniform Shadow Map.Not suited for uniform Shadow Map.
A very large, dense point set needs to be A very large, dense point set needs to be generated frequently.generated frequently.
– Well suited for Perspective Shadow Well suited for Perspective Shadow Map.Map.
– – Point clouds have uniform point density.Point clouds have uniform point density.
– – Assume the point densities are uniform.Assume the point densities are uniform.
– – Easy to select the splat size to avoid holes.Easy to select the splat size to avoid holes.
![Page 23: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/23.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 23
Outline
– Shadow Maps– Perspective Aliasing– Frame Works– Light Sources– Point Rendering– Result– Conclusion
![Page 24: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/24.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 24
Result
![Page 25: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/25.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 25
Result
With shadow maps of size 1024*1024.FPS = 15
![Page 26: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/26.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 26
Result
With shadow maps of size 1024*1024.FPS = 10
![Page 27: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/27.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 27
Result
With shadow maps of size 1024*1024.
FPS = 10
![Page 28: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/28.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 28
Result
With shadow maps of size 1024*1024.
FPS = 10
![Page 29: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/29.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 29
Result
no shadows20 million triangles, FPS = 1
![Page 30: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/30.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 30
Result
no shadows20 million triangles, FPS = 1
![Page 31: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/31.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 31
Result
no shadows20 million triangles, FPS = 0.83
![Page 32: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/32.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 32
DemoDemo
![Page 33: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/33.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 33
Outline
– Shadow Maps– Perspective Aliasing– Frame Works– Light Sources– Point Rendering– Result– Conclusion
![Page 34: Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d4e5503460f94a2d2ec/html5/thumbnails/34.jpg)
Alivn/GAME LAB/CSIE/NDHU Prespective Shadow Maps 34
Conclusion
Perspective Shadow Maps– Shadow map in post-perspective space– View-dependent– Easy for hardware support– Needs recomputation per frame– Minimal overhead for dynamic scenes