Fast Soft SelfShadowing on Dynamic Height Fields - PowerPoint PPT Presentation

1 / 38
About This Presentation
Title:

Fast Soft SelfShadowing on Dynamic Height Fields

Description:

Fast Soft SelfShadowing on Dynamic Height Fields – PowerPoint PPT presentation

Number of Views:58
Avg rating:3.0/5.0
Slides: 39
Provided by: Ale8326
Category:

less

Transcript and Presenter's Notes

Title: Fast Soft SelfShadowing on Dynamic Height Fields


1
Fast Soft Self-Shadowing on Dynamic Height Fields
Derek Nowrouzezahrai University of Toronto
  • John Snyder
  • Microsoft Research

2
Related Work
  • horizon mapping Max88
  • hard shadows
  • precomputed for static geometry

3
Related Work
  • shadow map filtering Reeves87
  • light bleeding artifacts
  • small light sources
  • no complex environmental lighting

Donnelly06
4
Related Work
  • ambient occlusion Bunnell05 Kontkanen05
  • AO in screen-space Shanmugam07
  • cone blocker model Heidrich00

Dimitrov08
Oat07
5
Related Work
  • static relighting Sloan02 Ng04
  • dynamic relighting Bunnell05, Ren06, Sloan07

6
Goals
  • strong response to lighting direction (cast
    shadows)

ambient occlusion
low-frequency SH Ren06
7
Goals
  • strong response to lighting direction (cast
    shadows)
  • environmental directional lighting

8
Goals
  • strong response to lighting direction (cast
    shadows)
  • environmental directional lighting
  • dynamic geometry (not precomputed)
  • real-time performance
  • limitation geometry is height field
  • applications
  • terrain rendering (flight simulators, games,
    mapping/navigation)
  • data visualization

9
Summary of Main Ideas
  • approximate horizon map via multi-resolution
  • create height field pyramid Burt81
  • sample height differences from each pyramid level
  • use coarser levels as distance to receiver
    increases
  • reduces sampling
  • convert horizon map to SH visibility for soft
    shadowing
  • use visibility wedges Dimitrov08
  • get good directional lighting response
  • sharpen shadows by restricting wedges azimuthally
  • fast 2D lookup SH z rotation S over wedges

10
Horizon Map Max88
height field zf(x)f(x,y), point p(x)
(x,f(x))
horizon angle ?(x,?)
max angle horizon makes at p in azimuthal
direction ?
Sample ? at all points x along set of directions
?i.
11
Calculating the Horizon Map
12
Calculating the Horizon Map
13
Calculating the Horizon Map
14
Calculating the Horizon Map
15
Calculating the Horizon Map
16
Calculating the Horizon Map
17
Calculating the Horizon Map
18
Calculating the Horizon Map
19
Calculating the Horizon Map
20
Calculating the Horizon Map
max
Problem aliasing need many samples in
t. Solution prefilter height field, apply
multi-scale derivative.
21
Brute Force Sampling Requirements
22
Multi-Resolution Approximation
multi-scale derivative
pyramid level i
sampling distance for level i
As t ?, i ? sample coarser levels further from
x.
fi
fi-1
fi-2
fi-3
23
Multi-Resolution Horizon Angle
horizon angle sample i
w
w
w
w
i-3
i
i-1
i-2
24
Multi-Resolution Horizon Angle
Up-sample coarser levels with 2D B-splines
w
w
w
w
i-3
i
i-1
i-2
knot
mid
25
Smooth Interpolation
  • non-smooth interpolation (e.g. bilinear) ? shadow
    artifacts
  • use 1D b-spline for horizon angle vs. distance
    (?i)
  • use 2D b-spline for heights (fi)

linearbilinear
b-splinebilinear
linearb-spline
b-splineb-spline
26
Pyramid Level Step
  • k 1 (standard power-of-2 pyramid) ? abrupt
    transitions
  • k 4 smoothes transitions

k 1
k 2
k 3
k 4
27
Pyramid Level Offset
  • pyramid level bias when sampling height
    differences
  • increasing bias increases shadow sharpness
  • increases sampling requirements

o 0
o 1
o 2
o 3
o 4
28
Summary of Main Ideas
  • approximate horizon map via multi-resolution
  • create height field pyramid Burt81
  • sample height differences from each pyramid level
  • use coarser levels as distance to receiver
    increases
  • reduces sampling
  • convert horizon map to SH visibility for soft
    shadowing
  • use visibility wedges Dimitrov08
  • get good directional lighting response
  • sharpen shadows by restricting wedges azimuthally
  • fast 2D lookup SH z rotation S over wedges

29
Reconstructing Visibility
  • so far discussed sampling in single azimuthal
    direction
  • large lights sample multiple azimuthal directions
  • linearly interpolate horizon angle ? as function
    of ?
  • sequential pairs of ?i determine visibility
    wedges

30
Projecting Visibility to SH
  • Visibility for a single wedge
  • Project visibility wedge to SH (order 4)
  • fix ?i 0 and ?f. Store as 2D table

31
Reconstruct Full Visibility
  • N azimuthal sampling directions ? N horizon
    angles
  • (N 1) adjacent horizon angle pairs (wedge
    boundaries)
  • (N 1) table lookups (N 1) SH Z-rotations
  • ? rotate wedge from ?i 0 to azimuthal direction
  • Sum over all wedges

All operations (including horizon angle
calculation) in a single GPGPU shader. See
Snyder08 for full source code.
32
Azimuthal Swaths
  • azimuthal swaths contain many visibility wedges
  • key lights restrict swath
  • get sharper shadows
  • acts as a geometric mask
  • only sample where necessary

33
Restricted Swaths
  • smaller swaths ? sharper shadows
  • approach limit determined by SH order

?f 45
?f 22.5
?f 11.25
?f 90
34
Soft Shadowed Shading with SH
visibility vector at x
diffuse reflectance clamped cosine around normal
Nx
lighting environment
35
Soft Shadowed Shading with SH
or BRDF x Visibility SH Product and dot with
lighting
36
Comparison with Ground Truth
ground truth
k 1, o 1
k 2, o 2
k 3, o 3
k 4, o 4
37
Measured Performance
38
Image Results
39
Video Results
Clip 1
Clip 2
40
Conclusions
  • multi-resolution approximation for horizon map
  • soft shadowing via fast SH projection
  • key env lighting decomposition
  • simple GPU implementation
  • real-time up to 512x512 dynamic height fields
  • performance independent of geometric content

41
Future Work
  • subsample visibility
  • combine with dynamic shadow casters
  • via Ren06Sloan07 (sphere set blocker
    approximation)
  • advantage of SH over cone models and AO
  • simulate inter-reflections
  • add local light sources
  • generalize geometry
  • screen space projection Shanmugam07
  • local height field displacements

42
Thanks! Any questions?
43
Restricted Swaths
  • For partial swaths, only directions affected by
    key light are sampled

44
Reconstructing Visibility
  • So far discussed sampling single azimuthal
    direction
  • Large lights require many directional samples
  • Calculate horizon angle in many azimuthal
    directions
  • Combine together, forming visibility wedges
    Dimitrov08
  • Canonically reposition fi 0, tabulate SH
    projection as 2D LUT for fixed azimuthal spacing.

45
Pyramid Level Step
  • Control the sample spacing reduction
  • pyramid level i
  • sample spacing at level i
  • k is the level step
  • k 1 ? standard level-of-2 pyramid (e.g. MIP)
  • we use k 4 ? storage 3.4x original HF

46
Multi-resolution Horizon Map
As t ?, i ? sample coarser levels further from x
47
Background
  • The rendering equation for direct illumination is

48
Background
  • The rendering equation for direct illumination is

assume a diffuse BRDF and combine the
reflectance and the cosine term
49
Background
  • The rendering equation for direct illumination is

assume a diffuse BRDF and combine the
reflectance and the cosine term
project the lighting, clamped cosine weighted
reflectance, and visibility into SH
50
Putting it all together
  • Height field geometry ? uniform grid of height
    values
  • Generated on the CPU or GPU
  • stored in a texture
  • A multi-resolution height pyramid is generated
    on-the-fly
  • avoid large sampling rates as distance
  • from receiver point increases
  • Max blocking angles are determined
  • Fast LUT fast SH Z-rotation generate visibility
  • At every step
  • Re-generate height-field and pyramid

51
Putting it all together
  • Height field geometry ? uniform grid of height
    values
  • Generated on the CPU or GPU
  • stored in a texture
  • A multi-resolution height pyramid is generated
    on-the-fly
  • avoid large sampling rates as distance
  • from receiver point increases
  • Max blocking angles are determined
  • Fast LUT fast SH Z-rotation generate visibility
  • At every step
  • Re-generate height-field and pyramid

52
Putting it all together
  • Height field geometry ? uniform grid of height
    values
  • Generated on the CPU or GPU
  • stored in a texture
  • A multi-resolution height pyramid is generated
    on-the-fly
  • avoid large sampling rates as distance
  • from receiver point increases
  • Max blocking angles are determined
  • Fast LUT fast SH Z-rotation generate visibility
  • At every step
  • Re-generate height-field and pyramid

53
Putting it all together
  • Height field geometry ? uniform grid of height
    values
  • Generated on the CPU or GPU
  • stored in a texture
  • A multi-resolution height pyramid is generated
    on-the-fly
  • avoid large sampling rates as distance
  • from receiver point increases
  • Max blocking angles are determined
  • Fast LUT fast SH Z-rotation generate visibility
  • At every step
  • Re-generate height-field and pyramid

54
Contributions
  • A formulation of the maximum blocking angle as a
    directional derivative
  • We analyze the effects of pyramid depth, step
    size and filtering on the final shadow quality
  • Determining the visibility amounts to calculating
    a multi-scale directional derivative
  • We present an efficient algorithm for determining
    the visibility
Write a Comment
User Comments (0)
About PowerShow.com