1 shadows (2) ©anthony steed 2002. 2 overview n shadows – umbra recap n penumbra analytical v....
TRANSCRIPT
1
Shadows (2)
©Anthony Steed 2002
2
Overview
Shadows – Umbra Recap Penumbra• Analytical v. Sampling
Analytical• Aspect graphs• Discontinuity meshing
Sampling• Accumulation buffer• Convolution
3
Shadows
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.
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
6
Extremal Shadow Boundaries
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)
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
9
EV and EEE Surfaces
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
11
Shadows and Discontinuities
12
Storing the Discontinuity Mesh
DM-Tree which uses both 2D BSP tree and winged edge data structure
13George Drettakis
14George Drettakis
15David Hedley
16David Hedley
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
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
19
Example
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