Presentation is loading. Please wait.

Presentation is loading. Please wait.

Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002.

Similar presentations


Presentation on theme: "Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002."— Presentation transcript:

1 Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002

2 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps2 Outline – Shadow Maps – Shadow Map Aliasing – Frame Works – Light Sources – Point Rendering – Result – Conclusion

3 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps3 Shadow Maps [Williams78] Casting curved shadows on curved surfaces – Image-space algorithm – Well suited for hardware implementation

4 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps4 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)

5 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps5 Outline – Shadow Maps – Perspective Aliasing – Frame Works – Light Sources – Point Rendering – Result – Conclusion

6 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps6 Perspective aliasing

7 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps7 Outline – Shadow Maps – Perspective Aliasing – Frame Works – Light Sources – Point Rendering – Result – Conclusion

8 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps8 Idea uniform shadow map perspective shadow map

9 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps9 Idea uniform shadow map perspective shadow map

10 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps10 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.

11 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps11 Including Objects Casting Shadows S: The bounding box of the scene objects. V: The viewing frustum. L: The light frustum. l: The light source. M: Contain all rays from the points in V to l. H: M ۸ S ۸ L

12 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps12 Shadows From Behind ► ► Virtually move camera backwards

13 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps13 Outline – Shadow Maps – Perspective Aliasing – Frame Works – Light Sources – Point Rendering – Result – Conclusion

14 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps14 Light Sources – Parallel light transformation – Point light transformation In this paper, point lights means spot lights. – Discussion

15 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps15 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.

16 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps16 Parallel Light Transformation

17 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps17 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.

18 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps18 Point light transformation

19 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps19 Discussion – Worst case: Become uniform shadow map. – Best case: – Parallel light in post- perspective space. – No new perspective distortion.

20 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps20 Near Plane Selection – Near plane as far as possible – Automatic selection: reading back depth buffer.

21 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps21 Outline – Shadow Maps – Perspective Aliasing – Frame Works – Light Sources – Point Rendering – Result – Conclusion

22 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps22 Point Rendering Not suited for uniform Shadow Map. – Not suited for uniform Shadow Map. A very large, dense point set needs to be generated frequently. Well suited for Perspective Shadow Map. – Well suited for Perspective Shadow 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.

23 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps23 Outline – Shadow Maps – Perspective Aliasing – Frame Works – Light Sources – Point Rendering – Result – Conclusion

24 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps24 Result

25 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps25 Result With shadow maps of size 1024*1024. FPS = 15

26 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps26 Result With shadow maps of size 1024*1024. FPS = 10

27 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps27 Result With shadow maps of size 1024*1024. FPS = 10

28 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps28 Result With shadow maps of size 1024*1024. FPS = 10

29 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps29 Result no shadows 20 million triangles, FPS = 1

30 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps30 Result no shadows 20 million triangles, FPS = 1

31 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps31 Result no shadows 20 million triangles, FPS = 0.83

32 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps32 Demo

33 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps33 Outline – Shadow Maps – Perspective Aliasing – Frame Works – Light Sources – Point Rendering – Result – Conclusion

34 Alivn/GAME LAB/CSIE/NDHUPrespective Shadow Maps34 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


Download ppt "Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002."

Similar presentations


Ads by Google