Real-time Soft Shadows in Dynamic Scenes using Spherical Harmonic Exponentiation - PowerPoint PPT Presentation

1 / 49
About This Presentation
Title:

Real-time Soft Shadows in Dynamic Scenes using Spherical Harmonic Exponentiation

Description:

Realtime Soft Shadows in Dynamic Scenes using Spherical Harmonic Exponentiation – PowerPoint PPT presentation

Number of Views:91
Avg rating:3.0/5.0
Slides: 50
Provided by: ResearchM53
Category:

less

Transcript and Presenter's Notes

Title: Real-time Soft Shadows in Dynamic Scenes using Spherical Harmonic Exponentiation


1
Real-time Soft Shadows in Dynamic Scenes using
Spherical Harmonic Exponentiation
  • John Snyder
  • Principal Researcher
  • Microsoft Research

2
Project Collaborators
  • Zhong Ren, Zhejian University (intern at MSRA)
  • Rui Wang, Zhejian University (intern at MSRA)
  • Kun Zhou, MSRA
  • Xinguo Liu, MSRA
  • Bo Sun, Columbia University (intern at MSR)
  • Peter-Pike Sloan, DirectX
  • Hujun Bao, Zhejiang University
  • Qunsheng Peng, Zhejiang University
  • Baining Guo, MSRA

paper appears in Siggraph 2006
3
Fast Soft Shadows in Dynamic Scenes
  • Motivation
  • realism
  • shape/proximity cues
  • new look
  • Challenges
  • large light sources
  • complex, dynamic blockers/receivers
  • self-shadows cast-shadows

unshadowed
shadowed
4
Previous Work in Fast Shadow Rendering
Name Reference Lighting Constraints
shadow buffer/vol. Williams78, point -
accum. buffer Segal92, small area many passes
PRT (SH) Sloan02, low-freq static
PRT (all-freq) Ng03, all-freq static, diffuse
PRT (dynamic) James03,05 low-freq precomp. sequences
LDPRT Sloan05 low-freq local effects
ambient occlusion Bunnel04, DC no casting
shadow fields Zhou05 low-freq few, rigid objs
SHEXP current low-freq many, deform objs
5
Previous Work in Fast Shadow Rendering
Name Reference Lighting Constraints
ambient occlusion Bunnel04, DC no casting
shadow fields Zhou05 low-freq few, rigid objs
SHEXP current low-freq many, deform objs
  • soft shadows from large-area lights
  • dynamic shading
  • blocker/receiver motion not precomputed

6
Ambient Occlusion vs. SHEXP
ray traced
7
SHEXP Summary
  • Approximate blockers with spheres
  • accumulate over large blockers, not light
    directions
  • symmetry simplifies calculation

8
SHEXP Summary
  • Approximate blockers with spheres
  • accumulate over large blockers, not light
    directions
  • symmetry simplifies calculation
  • Represent low-frequency visibility/lighting in SH

9
SHEXP Summary
  • Approximate blockers with spheres
  • accumulate over large blockers, not light
    directions
  • symmetry simplifies calculation
  • Represent low-frequency visibility/lighting in SH
  • For each receiver point p
  • accumulate visibility logarithm over blocker
    spheres
  • exponentiate
  • shade

10
SH ReviewProjection and Reconstruction
s
11
SH ReviewProjection and Reconstruction
12
SH ReviewProjection and Reconstruction
13
SH ReviewProducts
14
SH ReviewProducts
15
SH ReviewProducts
16
SH ReviewShading Ng04
gp
L
H(Np)
lighting
visibility
BRDF
  • shade(p) (L, gp, H(Np))

17
SH ReviewShading Ng04
gp
L
H(Np)
  • shade(p) (L, gp, H(Np))

18
Visibility Accumulation (Product Space Zhou05)
g g1g2gm
  • m moving blockers
  • gi is SH visibility of blocker i
  • exact product order m(n-1)1
  • truncate to order n after each
  • need m-1 expensive SH products

19
Visibility Accumulation Example(Product Space)
Product Space Accumulated
64 Spheres
1 Spheres
2 Spheres
3 Spheres
16 Spheres
32 Spheres
20
Idea Use Log Space
  • SH product expensive O(n5)
  • SH add cheap O(n2)
  • e.g. SH order n4
  • ab ? 673 flops
  • ab ? 16 adds!
  • suggests rule for positive reals

21
Visibility Accumulation(Log Space)
g exp(f 1 f 2 f m)
  • applies scalar rule to every visibility direction
  • f ilog(gi) is SH log visibility of sphere i
  • need m-1 vector adds, one exp
  • greatly reduces per-blocker cost ( ? )

22
Visibility Accumulation Example(Log Space)
Log Space Accumulated
64 Spheres
1 Spheres
2 Spheres
3 Spheres
16 Spheres
32 Spheres
23
Log vs. Product Space
SH Projection
Visibility Function
Log Space Approx.
Product Space Approx.
24
SH Exponential Volterra Series
  • expand exp(x) in SH projection formula

25
SH Exponential Volterra Series
  • expand exp(x) in SH projection formula
  • yielding sum of powers f p

26
SH Exponential Product Series
  • exact evaluation horribly expensive!
  • order-p tensors
  • output order grows with p p(n-1)1
  • approximate with product series
  • degree p series needs p-1 SH products
  • truncate each product back to order n

27
Accelerating Product Series
  • bigger f ? more series terms in exp( f )
  • DC isolation compute DC via scalar exp
  • scaling/squaring divide by 2p, exp, square p
    times
  • factoring reduce products Higham05

28
Optimal Linear Approximation
  • linear model (degree 1 series)
  • no SH products!
  • optimal coefs a and b
  • tabulated functions of input magnitude f
  • least-squares fit to example visibility functions
  • accurate for n 4, f 4.8
  • extend magnitude range using scaling/squaring

29
SHEXP Method Comparison
log space (SHEXP)
PS-2, 45k
PS-21, 328k
product space, 495k
HYB, 31k
OL, 0
30
SHEXP Method Comparison
log space (SHEXP)
PS-2, 45k
PS-21, 328k
product space, 495k
  • evaluate on GPU
  • workhorse method

HYB, 31k
OL, 0
31
SH Logarithm
  • computed for sphere blockers as preprocess
  • naïve method numerical integration with clipping
  • better method series inversion

32
Approximating Blocker Geometry
  • bounding sphere set
  • minimize outside volume Wang06
  • animate via mean value coordinates Ju05

33
Single Sphere Visibility
  • tabulate logs of circle visibility, f (q)
  • function of angle subtended, q
  • canonically oriented around z axis
  • rotate on-the-fly

34
Single Sphere Visibility(Rotation)
  • use rotation rule Sloan05

35
Self-Shadowing Replacement Rules
Tp
p
36
Sphere Hierarchies
Blocker Hierarchy
37
Sphere Hierarchies
38
Sphere Hierarchies
39
Sphere Hierarchies
40
Per-Band Weighting
41
Rendering
  • Per-cluster computation (on CPU)
  • Per-vertex computation (on GPU)

42
Per-Cluster Computation (CPU)
  • For each cluster
  • choose cut
  • for each sphere in cut
  • compute weight vector
  • Pack information into textures
  • sphere cut info (center, radius, weight vector)
  • vertex info (position, normal, receiver cluster
    id)

43
Per-Vertex Computation (GPU)
  • For each sphere i in cut
  • apply self-shadow replacement rules
  • get canonical log visibility vector f (q)
  • rotate and apply weights, yielding f i
  • accumulate f f i
  • Exponentiate using HYB
  • total visibility vector g exp( f )
  • Shade using (H(N), L, g)

44
Demos
45
Implementation Performance
  • per-vertex shading via render-to-vertex buffer
  • battle demo
  • 65k receiver vertices
  • 244 leaf spheres, avg47, max117
  • 26Hz average frame rate
  • dino demo
  • 120k receiver vertices
  • 500 leaf spheres, avg42, max160
  • 14Hz average frame rate

46
Contributions
  • Blocker approximation using bounding sphere sets
  • general, deformable objects
  • Accumulation of low-frequency blocker visibility
  • much faster in log space
  • accurate as product space
  • Fast evaluation of SH exp/log
  • product series approx. to Volterra series
  • optimal linear method
  • SH log by series inversion

47
Limitations
  • Low-frequency lighting
  • Low-frequency (diffuse) BRDF
  • Distant lighting
  • true local lighting requires sorting
  • demo special case

48
Future Work
  • Anisotropic blocker models
  • Diffuse inter-reflection
  • Models for spatial, temporal variation

49
Acknowledgements
  • Becky Sundling
  • video production
  • Mingdong Xie
  • modeling and animation
  • Anon. SIGGRAPH reviewers
  • suggestions and comments

and thank you!
Write a Comment
User Comments (0)
About PowerShow.com