1 shadows (2) ©anthony steed 2002. 2 overview n shadows – umbra recap n penumbra analytical v....

20
Shadows (2) ©Anthony Steed 2002

Upload: solomon-curtis-burns

Post on 02-Jan-2016

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 1 Shadows (2) ©Anthony Steed 2002. 2 Overview n Shadows – Umbra Recap n Penumbra Analytical v. Sampling n Analytical Aspect graphs Discontinuity meshing

1

Shadows (2)

©Anthony Steed 2002

Page 2: 1 Shadows (2) ©Anthony Steed 2002. 2 Overview n Shadows – Umbra Recap n Penumbra Analytical v. Sampling n Analytical Aspect graphs Discontinuity meshing

2

Overview

Shadows – Umbra Recap Penumbra• Analytical v. Sampling

Analytical• Aspect graphs• Discontinuity meshing

Sampling• Accumulation buffer• Convolution

Page 3: 1 Shadows (2) ©Anthony Steed 2002. 2 Overview n Shadows – Umbra Recap n Penumbra Analytical v. Sampling n Analytical Aspect graphs Discontinuity meshing

3

Shadows

Page 4: 1 Shadows (2) ©Anthony Steed 2002. 2 Overview n Shadows – Umbra Recap n Penumbra Analytical v. Sampling n Analytical Aspect graphs Discontinuity meshing

4

Analytical v. Sampling

AnalyticalFind all boundaries within the penumbra.

Done almost exclusively for polygonal light sources

SamplingApproximate solution that treat the light

source as a set of points. Any shape source is possible.

Page 5: 1 Shadows (2) ©Anthony Steed 2002. 2 Overview n Shadows – Umbra Recap n Penumbra Analytical v. Sampling n Analytical Aspect graphs Discontinuity meshing

5

Extremal Shadow Boundaries

What is the potential area of the penumbra and umbra?

For penumbra:• Bounded by planes define by a pair of source

vertex and occluder edge where the source is in the front space and the occluder on the back

For umbra:• Similarly defined planes, but where source and

occluder are in the back space

Page 6: 1 Shadows (2) ©Anthony Steed 2002. 2 Overview n Shadows – Umbra Recap n Penumbra Analytical v. Sampling n Analytical Aspect graphs Discontinuity meshing

6

Extremal Shadow Boundaries

Page 7: 1 Shadows (2) ©Anthony Steed 2002. 2 Overview n Shadows – Umbra Recap n Penumbra Analytical v. Sampling n Analytical Aspect graphs Discontinuity meshing

7

Shading Using Extremal Planes

If you write these planes into object space

We can use a scan-conversion as we have before• At each pixel we must estimate the

proportion of the light source that can be seen

• Usually done with SVBSP tree(s)

Page 8: 1 Shadows (2) ©Anthony Steed 2002. 2 Overview n Shadows – Umbra Recap n Penumbra Analytical v. Sampling n Analytical Aspect graphs Discontinuity meshing

8

More Analysis

Borrowing aspect graphs from computer vision

Define critical surfaces where visual events occur• EV surfaces: planes defined by edge and vertex• EEE surfaces: quadratic surfaces defined by three

non-adjacent edges.

Penumbra volumes so far have used EV only

Page 9: 1 Shadows (2) ©Anthony Steed 2002. 2 Overview n Shadows – Umbra Recap n Penumbra Analytical v. Sampling n Analytical Aspect graphs Discontinuity meshing

9

EV and EEE Surfaces

Page 10: 1 Shadows (2) ©Anthony Steed 2002. 2 Overview n Shadows – Umbra Recap n Penumbra Analytical v. Sampling n Analytical Aspect graphs Discontinuity meshing

10

Discontinuity Meshing

Discontinuities of the illumination of a polygon occur at the places where EV and EEE surfaces intersect the polygon

Discontinuities occur at different degrees

Discontinuities are written into the geometry of the scene as before

Page 11: 1 Shadows (2) ©Anthony Steed 2002. 2 Overview n Shadows – Umbra Recap n Penumbra Analytical v. Sampling n Analytical Aspect graphs Discontinuity meshing

11

Shadows and Discontinuities

Page 12: 1 Shadows (2) ©Anthony Steed 2002. 2 Overview n Shadows – Umbra Recap n Penumbra Analytical v. Sampling n Analytical Aspect graphs Discontinuity meshing

12

Storing the Discontinuity Mesh

DM-Tree which uses both 2D BSP tree and winged edge data structure

Page 13: 1 Shadows (2) ©Anthony Steed 2002. 2 Overview n Shadows – Umbra Recap n Penumbra Analytical v. Sampling n Analytical Aspect graphs Discontinuity meshing

13George Drettakis

Page 14: 1 Shadows (2) ©Anthony Steed 2002. 2 Overview n Shadows – Umbra Recap n Penumbra Analytical v. Sampling n Analytical Aspect graphs Discontinuity meshing

14George Drettakis

Page 15: 1 Shadows (2) ©Anthony Steed 2002. 2 Overview n Shadows – Umbra Recap n Penumbra Analytical v. Sampling n Analytical Aspect graphs Discontinuity meshing

15David Hedley

Page 16: 1 Shadows (2) ©Anthony Steed 2002. 2 Overview n Shadows – Umbra Recap n Penumbra Analytical v. Sampling n Analytical Aspect graphs Discontinuity meshing

16David Hedley

Page 17: 1 Shadows (2) ©Anthony Steed 2002. 2 Overview n Shadows – Umbra Recap n Penumbra Analytical v. Sampling n Analytical Aspect graphs Discontinuity meshing

17

Sampling Methods

Model an area light source by multiple n point light sources

At rendering time render n times moving the light each time

Compose the image into an accumulation buffer

Page 18: 1 Shadows (2) ©Anthony Steed 2002. 2 Overview n Shadows – Umbra Recap n Penumbra Analytical v. Sampling n Analytical Aspect graphs Discontinuity meshing

18

Accumulation Buffer

Yet another set of hardware buffers Can be cleared (like the colour buffer) You repeatedly copy the colour buffer to it,

using a 1/N scale each time After N iterations, the A-buffer holds the

average of the N frames Obviously requires precision! • (Spend more $$)

http://www.sgi.com/software/opengl/advanced96/programs.html

Page 19: 1 Shadows (2) ©Anthony Steed 2002. 2 Overview n Shadows – Umbra Recap n Penumbra Analytical v. Sampling n Analytical Aspect graphs Discontinuity meshing

19

Example

Page 20: 1 Shadows (2) ©Anthony Steed 2002. 2 Overview n Shadows – Umbra Recap n Penumbra Analytical v. Sampling n Analytical Aspect graphs Discontinuity meshing

20

Recap

Penumbra is difficult to render correctly• Boundaries are formed by very complex

shapes Discontinuity meshing is an analytical

solution• Difficult to implement

Sampling is obviously less accurate• Potentially fast enough (soon) to do in real-

time