Soft Shadow Volumes for Ray Tracing - PowerPoint PPT Presentation

About This Presentation
Title:

Soft Shadow Volumes for Ray Tracing

Description:

Can compute very high resolution soft shadows with low extra cost ... Region of penumbra caused by an edge. Light source. Soft Shadow Volume. Shadow caster ... – PowerPoint PPT presentation

Number of Views:63
Avg rating:3.0/5.0
Slides: 35
Provided by: steve1666
Category:

less

Transcript and Presenter's Notes

Title: Soft Shadow Volumes for Ray Tracing


1
Soft Shadow Volumes for Ray Tracing
Timo Aila Helsinki University of
Technology, Hybrid Graphics Ltd.
Samuli Laine Helsinki University of
Technology, Hybrid Graphics Ltd.
Ulf Assarsson ARTIS, GRAVIR /IMAG
INRIA, Chalmers University of Technology
Jaakko Lehtinen Helsinki University of
Technology, Remedy Entertainment Ltd.
Tomas Akenine-Möller Lund University
2
We present
  • An algorithm for computing Soft Shadows
  • For planar area light sources
  • Exactly the same shadows as using shadow rays
  • Faster - up to 2 orders of magnitude
  • Can compute very high resolution soft shadows
    with low extra cost
  • E.g. allows for 1000 shadow samples per pixel
  • Requires computation of silhouettes
  • Trivial for polygon-based scenes

3
Soft Shadows A Quick Recap
  • Area lights give soft shadows

Point light
Area light
Hard shadow
Soft shadow
4
Classic solution
  • Multiple shadow rays

Lots of shadow rays per pixel
5
Our solution - overview
  • Replace the shadow rays
  • With soft shadow volume computations
  • Plus one reference shadow ray

One shadow ray soft shadow volume computations
Lots of shadow rays per pixel
pixel
pixel
Classic approach Our approach
6
Whats a Soft Shadow Volume?
Light source
Shadow caster
Soft Shadow Volume
  • Soft Shadow Volume
  • A. Volume from which an edge projects onto the
    light source
  • B. Region of penumbra caused by an edge

7
Our solution - overview
  • Two parts
  • from any receiving point p, we need to find
    silhouette edges affecting the visibility
  • A method for computing the visibility from
    silhouette information

8
Finding potential silhouettes
  • Fast method for determining silhouette edges that
    overlap light source from p

Arbitrary shadow caster
Arbitrary shadow receiving point p
HOW?
9
Hemicube Construction
  • Rasterize soft shadow volumes into a hemicube for
    each light source

Each cell contains list of edges
Each cell contains list of edges
10
Hemicube Construction
  • Rasterize soft shadow volumes into a hemicube for
    each light source

Wedge marked to all cells it even partially
overlaps ? no artifacts
Each cell contains list of edges
11
Hemicube Construction
Wedge marked to all cells it even partially
overlaps ? no artifacts
Each cell contains list of edges
12
Hemicube Construction
  • Lots of edges does not need to be considered

13
Hemicube Construction
  • Lots of edges does not need to be considered

Because these edges cannot be silhouettes
projected onto the light source from any point p
14
Wedge Creation Criterions
  • Wedges are created for all edges that are
    silhouettes from any point on the light source
  • The wedge includes all positions from which the
    edge projects onto (occludes) the light source.

15
During Rendering
  • Hemicube returns a conservative set of edges
  • All the necessary edges but also many more
  • We only want edges that are
  • Silhouettes from p
  • Project onto the light source.
  • Tested with Point-inside-wedge
  • Now we have the silhouette edges from p

16
Visibility Reconstruction
  • Which light samples si are visible from point p?
  • Brute force cast a shadow ray for each si
  • Our recipe
  • 1. Find silhouette edges between p and light
    source
  • 2. Project them onto light source ? reduces to
    2D
  • 3. Compute relative depth complexity for every
    si
  • 4. Solve visibility with a single shadow ray
  • 5. Profit

17
Depth Complexity
  • Depth complexity of si number of surfaces
    between p and si

?
0
Light source as seen from p
Depth complexity function
18
From Silhouette Edges to Relative Depth Complexity
  • Projected silhouette edges define the first
    derivative of the depth complexity function
  • Hence, relative depth complexity can be solved by
    integrating the silhouette edges over the light
    source
  • Integration islinear ? can beperformed oneedge
    at a time

19
Integration Example
  • Left-to-right integration of a triangular
    silhouette

0
?
0
Light source as seen from p
Depth complexity function
20
Integration Sampling Points
  • We dont need the value of the depth complexity
    function except at the sampling points si
  • Sufficient to maintain a depth complexity counter
    for each si
  • Integration find si that are insideupdate
    region and update theirdepth complexity counters

21
Integration Rules
  • Theres a caveat - we only have the edges that
    overlap the light source
  • Loops are not necessarily closed, since parts
    outside the light source may be missing

We dont have this edge!
22
Integration Rules
  • Solution apply special rules to edges that cross
    the left side of the light source
  • This accountsfor potentiallymissing edges

23
Integration Optimization
  • Place the light samples into uniformly sized
    buckets
  • During integration, only process affected buckets
  • Most edges span only one bucket
  • We use approx. sqrt(N)buckets for N light
    samples
  • We also process 4 samplesin parallel using SSE
    vectorinstructions

24
From Relative Depth Complexity to Visibility
  • We are not done yet, since the constant of
    integration is not known ? cannot solve
    visibility
  • Solution cast a shadow rayray to one si with
    lowestrelative depth complexity
  • If blocked, all si are blocked
  • Otherwise, all si with lowest rel.depth
    complexity are visible

25
Experimental Results
  • Comparisons done using a commercial ray tracer
  • Turtle by Illuminate Labs
  • Enabled heuristic shadow ray casting stop if
    first 50 of rays agree
  • Our method was implemented into this ray tracer
  • We use the same ray caster for casting the
    reference ray

26
Columns 580 triangles, adaptive AA, 960x540
27
Formula 60K triangles, adaptive AA, 960x540
28
Sponza 109K triangles, adaptive AA, 960x540
29
Robots 1.3M triangles, adaptive AA, 960x540
30
Ring 374K triangles, adaptive AA, 960x540
31
Conclusions
  • Fast shadow algorithm in wide range of scenes
  • Easy to plug into an existing ray tracer
  • Scalability considerations
  • Number of light samples excellent ( sqrt M)
  • Number of triangles good (silhouettes
    N(something 1))
  • Output resolution not so good (linear)
  • Spatial size of the light source not so good (
    linear)

32
Future Work
  • GPU implementation?
  • Improvement of the acceleration structure
  • To pump up the edge acceptance ratio (currently lt
    10)

33
Thanks
  • Questions

Thanks for the cash Bitboys, Hybrid Graphics,
Remedy Entertainment, Nokia, National Technology
Agency of Finland, ATI, Illuminate Labs, French
Ministry of Research, Chalmers, Hans Werthén
foundation, Carl Tryggers foundation, Ernhold
Lundströms foundation, Swedish Foundation for
Strategic Research
34
Semi-transparent shadow casters
  • Detect the light samples that are occluded only
    by semi-transparent occluders
  • Determine the color for these light samples by
    casting shadow rays

Blocked
???
Blocked
Visible
Write a Comment
User Comments (0)
About PowerShow.com