practical logarithmic shadow maps l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Practical Logarithmic Shadow Maps PowerPoint Presentation
Download Presentation
Practical Logarithmic Shadow Maps

Loading in 2 Seconds...

play fullscreen
1 / 60

Practical Logarithmic Shadow Maps - PowerPoint PPT Presentation


  • 304 Views
  • Uploaded on

Practical Logarithmic Shadow Maps. Brandon Lloyd UNC-CH Naga Govindaraju UNC-CH David Tuft UNC-CH Steve Molnar Nvidia Dinesh Manocha UNC-CH. Motivation. Interactive shadow computation remains a challenge increasing scene complexity large, open environments user expect high quality.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Practical Logarithmic Shadow Maps' - leanne


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
practical logarithmic shadow maps

Practical Logarithmic Shadow Maps

Brandon Lloyd UNC-CH

Naga Govindaraju UNC-CH

David Tuft UNC-CH

Steve Molnar Nvidia

Dinesh Manocha UNC-CH

motivation
Motivation
  • Interactive shadow computation remains a challenge
    • increasing scene complexity
    • large, open environments
    • user expect high quality
shadow maps
Shadow maps
  • Simple two pass algorithm
  • Supports wide range of geometric representations
  • Cheap to render
  • Disadvantage:Aliasing artifacts at shadow edges
warping algorithms
Increase sample density where needed by reparametrizing the shadow mapWarping algorithms

Light-space perspective shadow maps (LSPSMs) [Wimmer et al. 2004]

Perspective shadow maps(PSMs) [Stamminger and Drettakis 2002]

Trapezoidal shadow maps(TSMs) [Martin and Tan 2004]

comparison of parameterizations
Comparison of parameterizations

4x4 projection matrix

Logarithmic

main results
Main results
  • Logarithmic parameterization for directional and point lights
  • Error analysis for point lights
  • Hardware architecture enhancements for logarithmic rasterization
outline
Outline
  • Related work
  • Aliasing error
  • Logarithmic parameterization
  • Hardware architecture
  • Results
partitioning algorithms
Separate shadow maps for different parts of the scene

Includes cascaded shadow maps

Plural sunlight buffers [Tadamura et al. 1999,2001]

Partitioning algorithms

Adaptive shadow maps [Fernando et al. 2001; Lefohn et al. 2006]

Tiled shadow maps [Arvo 2004]

warping partitioning
Warping + partitioning
  • 4x4 matrix
    • Lixel for every pixel[Chong and Gortler 2004]
    • PSM with cube maps[Kozlov 2004]
    • Warping + various frustum partitioning schemes [Lloyd et al. 2006]
  • Dual paraboloid [Brabec et al. 2002]
specialized representations
Specialized representations

Silhouette shadow maps[Sen et al. 2004]

Irregular shadow maps[Johnson et al. 2004,2005; Aila and Laine 2004]

  • Solves the aliasing problem
  • GPU support requires major changes
outline11
Outline
  • Related work
  • Aliasing error
  • Logarithmic parameterization
  • Hardware architecture
  • Results
aliasing error
Aliasing error

light

shadow plane

eye

viewfrustum

aliasing error13

wl

wi

wi

wi

wi

wl

'

'

'

'

'

'

light

beam

image

beam

Aliasing error
aliasing error14

wl

wi

wi

wl

'

'

'

'

cos θi

wl

m=

wi

cos θl

θl

wl

Perspectivealiasing

θi

wi

cos θi

Projectionaliasing

cos θl

Aliasing error

light

beam

wl

image

beam

wi

aliasing error15

wi

wi

wl

wl

'

'

'

'

cos θi

wl

m=

wi

cos θl

θl

wl

Perspectivealiasing

θi

wi

cos θi

Projectionaliasing

cos θl

Aliasing error

light

beam

wl

image

beam

wi

controlling aliasing error
To eliminate perspective aliasing:wl ≤wi

Light beam width depends on:

Shadow map resolution

Parameterization

Controlling aliasing error

light

beam

image

beam

wl

wi

outline17
Outline
  • Related work
  • Aliasing error
  • Logarithmic parameterization
    • Directional light
    • Point light
  • Hardware architecture
  • Results
parameterization
Parameterization

light imageplane

light

light

shadow map

shadow map

Standard

Perspective warped

directional light
Directional light

light

1. Light beam widths

2. Texel spacing function

1

t

light image

plane

z

3. Parameterization

wl

wi

imagebeam

[Wimmer et al. 04]

directional light20
Directional light

With 4x4 matrix

With logarithm

Uniform

beam width

Linear

z

beam width

Quadratic

z

beam width

z

comparison

8

10

6

10

4

Shadow maptexels / image texels

10

2

10

0

10

1

2

3

4

10

10

10

10

f / n

Comparison

Standard

Perspective

Logarithmic

frustum fov = 60○

point lights
Point lights

light

view frustum

point lights23
Point lights

light

light imageplane

wl ~ z

y

z

view frustum face

fitting the spacing function z
Parameterization for exact function is complicated

Fit two parabolas:

Parameterization:

Fitting the spacing function - z

Point light spacing function

0

z

4x4 matrix logarithm

To NDC coords.

vc = Pv

vn= vc /wc

To screen coordinates

s = a0ln( a1xn + a2 ) + a3

t = b0ln( b1zn + b2 ) + b3

4x4 matrix + logarithm

vc : [xc zc ycwc]T - clip coordinate

vn : [xn zn yn 1]T - normalized device coordinate

v : [x z y 1]T - world coordinate

P : perspective or orthographic projection matrix

a0-a3 : constants

b0-b3 : constants

parameterization summary
Parameterization summary

Spacing functions from4x4 matrix + log

Actual spacing functions

Directional

Point

without log

with log

x:

ortho.

z:

persp.

outline31
Outline
  • Related work
  • Aliasing error
  • Logarithmic parameterization
  • Hardware architecture
  • Results
logarithmic parameterization
Logarithmic parameterization

viewfrustum

Unwarped

vertex program
Vertex program
  • Transform vertices on the GPU
  • Requires finely tesselated model
    • Increases burden on vertex processor
  • Adaptive tesselation complicated
    • Easier with DX10 geometry shaders
fragment program
Brute force rasterization

Render bounding primitive

Transform fragments to original triangle

Discard if not inside

10x slow down

Computing bounding primitive is complicated

Easier with DX10 geometry shaders

Fragment program
graphics pipeline
Graphics pipeline

vertex processor

memory

interface

clip & back-face cull

rasterizer

fragment processor

alpha, stencil,

& depth tests

depth

compression

color

compression

blending

rasterizing equations
Coverage determination

use sign of edge distance equations

Attribute interpolation

depth, color, texture coordinates, etc.

Rasterizing equations
rasterizing equations37
Rasterizing equations

Edge distance and

attribute interpolation:

Parameterization:

incremental computation
Incremental computation

1 MULT + 2 ADD

per step

depth compression
Depth compression

First order

Second order

Compressed tiles shown in red

feasibility
Feasibility
  • Current hardware trend
    • Computational power increasing rapidly
    • Bandwidth lags behind
  • Log shadow maps
    • Increase computation
    • Reduce memory/bandwidth consumption
nonlinear rasterization
Nonlinear rasterization
  • Configurable rasterizer
  • Other rasterization functions are possible
  • Might be useful for other effects
    • Reflections, refractions, caustics, general multi-view perspective [Hou et al. 06]
outline42
Outline
  • Previous work
  • Aliasing error
  • Logarithmic parameterization
  • Hardware implementation
  • Results
results
Results

Power plant

13 Mtris

Oil tanker

82 Mtris

Town scene

59 Ktris

results44
Results

Standard

Perspective warping

Logarithmic

results45
Results

Perspective warping

Logarithmic

results46
Results

Perspective warping

Logarithmic

comparison to z partitioning

8

10

k=1

6

10

Shadow map texels / image texels

k=2

4

10

k=4

2

10

k=8

0

10

1

2

3

4

10

10

10

10

f / n

Comparison to z-partitioning

Perspective with kz-partitions

Logarithmic

results48
Results

z-partitioning (k=4)

Logarithmic

results50
Results

Perspective warping

Logarithmic

results51
Results

Perspective warping

Logarithmic

results point lights
Results – Point lights

higherror

high error

Standard

Perspective warping

Logarithmic

advantages
Advantages
  • Logarithmic shadow maps require less bandwidth and storage
  • Smoother parameterization than z-partitioning
disadvantages
Disadvantages
  • Does not handle projection aliasing
  • Requires multiple shadow maps
    • Up to 5 directional light
    • Up to 4 per frustum face for point light
  • Warped depth values
conclusion
Conclusion
  • Logarithmic parameterization
    • Lower error than previous methods
  • Hardware architecture for log rasterization
    • Requires only small enhancements to current graphics hardware
    • Exploits current hardware trends
future work
Future work
  • More details for hardware implementation
    • precision requirements
    • filtering
    • shadow map bias
  • Other applications for nonlinear rasterization
acknowledgements
Acknowledgements
  • Aaron Lefohn for the town model
  • Supported in part by:
    • NSF Graduate Fellowship
    • ARO Contracts DAAD19-02-1-0390 and W911NF-04-1-0088
    • NSF awards 0400134 and 0118743
    • ONR Contract N00014-01-1-0496
    • DARPA/RDECOM ContractN61339-04-C-0043
    • Intel
coordinate systems

shadow map

Coordinate systems

light

warping frustum

y

z

x

view

z

t

s

viewfrustum

x

Light space [Wimmer et al. 04]

directional light general case
Directional light - general case

light

  • Highest error (wl/wi) occurs at the faces
  • Partition frustum to handle each face separately

t

shadow map

wl

z