Top Banner
Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto
49

Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Dec 21, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Fast Global-Illumination on Dynamic Height Fields

John Snyder

Microsoft Research

Derek Nowrouzezahrai

University of Toronto

Page 2: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Related Work

• static geometry [Sloan02; Ng04; …]

• dynamic geometry [Bunnell05, Ren06, Sloan07, Ritschel08]

3

Page 3: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Related Work

• screen-space shading [Shanmugam07;Ritschel09…]

– ignores view-occluded blockers

[Dimitrov08]

• horizon mapping [Max88; …]

– precomputation for hard shadows on static geometry

[Sloan&Cohen00]4

Page 4: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Related Work

• fast soft-shadowing on dynamic height fields [SN08]

5

Page 5: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Goals

• all of [SN08] as well as – dynamic indirect illumination– glossy effects (direct and indirect)

6

Page 6: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Goals

[SN08] Our results7

Page 7: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Goals

• unified formulation for direct- and indirect-illumination• diffuse and glossy bounces

• environmental + directional lighting• dynamic geometry (not precomputed)• real-time performance• simple implementation

• limitation: geometry is a height field• applications:

– terrain rendering (flight simulators, games, mapping/navigation)– data visualization

8

Page 8: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

1. approximate visibility & incident radiance w/ multi-resolution

2. compute visibility and radiance at discrete azimuthal directions

3. determine final spherical visibility and incident radiance

Summary of Main Ideas

- create height and shading pyramids

- sample from pyramid levels

- pre-filter data

9

Page 9: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Azimuthal Swaths [SN08]

• for smaller area (key) light sources:– restrict azimuthal extent and use m = 3

– env lights and incident radiance:– complete swath and use m = 32

get sharper shadowsacts as a geometric maskonly sample where necessary

10

Page 10: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Definitions and Notation

blocking angle: (t) angle p makes at t along

Sample and u at all points t along direction .

incident radiance: u(t) incident radiance at t towards p along

u(t)(t)

11

Page 11: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Calculating the Max Blocking Angle

max

12

Page 12: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

t

Calculating the Max Blocking Angle

Page 13: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

t

Calculating the Max Blocking Angle

Page 14: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

t

Calculating the Max Blocking Angle

Page 15: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

t

Calculating the Max Blocking Angle

16

Page 16: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

t

Calculating the Max Blocking Angle

Page 17: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

t

Calculating the Max Blocking Angle

Page 18: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

t

Calculating the Max Blocking Angle

Page 19: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

t

Calculating the Max Blocking Angle

Page 20: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

t

max

Calculating the Max Blocking Angle

21

Page 21: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Calculating the Incident Radiance

Which points on the height field contribute indirect radiance?

22

Page 22: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Calculating the Incident Radiance

Which points on the height field contribute indirect radiance?

Page 23: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Calculating the Incident Radiance

Which points on the height field contribute indirect radiance?

Page 24: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Calculating the Incident Radiance

Which points on the height field contribute indirect radiance?

Page 25: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Calculating the Incident Radiance

Which points on the height field contribute indirect radiance?

Page 26: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Calculating the Incident Radiance

Which points on the height field contribute indirect radiance?

Page 27: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Calculating the Incident Radiance

Which points on the height field contribute indirect radiance?

Page 28: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Calculating the Incident Radiance

Which points on the height field contribute indirect radiance?

Page 29: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Calculating the Incident Radiance

Which points on the height field contribute indirect radiance?

Page 30: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Calculating the Incident Radiance

Which points on the height field contribute indirect radiance?

Page 31: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Calculating the Incident Radiance

Which points on the height field contribute indirect radiance?

The set of points with monotonically increasing blocking angles.We call this the casting set.

32

Page 32: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Brute Force Sampling

Problem: aliasing – need many samples in t.Solution: prefilter data, apply multi-scale sampling.

– Pitfall…

33

Page 33: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Multi-Resolution Height Sampling

sampling distance for level i

if height pyramid level i

Sample coarser levels further from x.

fi fi-1 fi-2 fi-3

τiτi-1

τi-2τi-3

34

Page 34: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Multi-Resolution Radiance Sampling

multi-scale incident radiance samples)()( iii uu radiance pyramid (for the previous bounce)

Sample coarser levels further from x.

ui ui-1 ui-2 ui-3

τiτi-1

τi-2τi-3

iu

blocking angle at i i

35

Page 35: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

1. approximate visibility & incident radiance w/ multi-resolution

2. compute visibility and radiance at discrete azimuthal directions

3. determine final spherical visibility and incident radiance

Summary of Main Ideas

- analytic visibility and incident radiance

- use normalized Legendre polynomials (NLPs)

36

Page 36: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Analytic Occlusion Elevation Function

• we start with the binary occlusion function:

otherwise

if ,0

,1);(

v

and represent it analytically in the Normalized Legendre Polynomial (NLP) basis:

σ

1

0)(v

37

Page 37: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Analytic Visibility and IR

• can represent visibility and incident radiance in NLP with

v () max

0

1• visibility binary function with 1 transition

from 0 to 1 @ max as increases

• incident radiance piece-wise constant, RGB function of elevation

u ()

)( 0tu

)( 1tu)( 2tu

38

1

)2/(v

1

)( maxv max

- =

v

))(()( 00 tvtu ))(())(()( 122 tvtvtu ))(())(()( 011 tvtvtu

+ + =

Page 38: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

1. approximate visibility & incident radiance w/ multi-resolution

2. compute visibility and radiance at discrete azimuthal directions

3. determine final spherical visibility and incident radiance

Summary of Main Ideas

- NLPSH blending & projection

- fast shading pipeline

39

Page 39: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

From Sampled NLP to Full SH

• matrix acts on NLP coefficients at edges of each swath• rotate & sum across swaths for final SH

• given (2 x m) NLP vectors• need full spherical spherical functions (represented in SH)

All operations performed in a single GPGPU shader. See

supplemental material for full source code.

• interpolate between azimuthal samples +

project resulting spherical function into SH• requires only 1 pre-computed matrix!

40

Page 40: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Global Illumination Shading with SH

uv & compute m azimuthal visibility + incident radiance NLP vectors

L external lighting environment

• at each shading point:

UV & interpolate & project into SH. Rotate & sum across directions

BRDF: clamped cosine and/or Phong lobe

)( xf N

)( xf Ror

xN xRor

41

Page 41: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

xVxT

Direct Illumination:

BRDF x Visibility SH Product

and take inner product with lightingLTx ,

Global Illumination Shading with SH

Indirect Illumination:

BRDF take inner product with Incident Radiance

UN ),( xf

)( xf N

42

Page 42: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Comparison to Ground Truth

m = 32 ground truth

43

Page 43: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

HF resolution pyramid levels memory requirements

no sub-sampling 2x sub-sampling

256 x 256(130k triangles)

33 17.4 MB 4.5 MB

512 x 512(522k triangles)

37 76 MB 20 MB

1024 x 1024(2.1M triangles)

41 336 MB 88 MB

2048 x 2048(8.4M triangles)

45 1.4 GB 360 MB

44

Memory Usage

• we typically sub-sample visibility & IR• shade with full-resolution geometry & normals

Page 44: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Measured Performance

HF resolutionFPS (nVidia GTX 285)

no ss 2x ss 4x ss

256 x 256(130k triangles)

50 125 229

512 x 512(522k triangles)

12 36 73

1024 x 1024(2.1M triangles)

3 8 19

45

Page 45: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Results

47

Page 46: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Results

48

Page 47: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Conclusions

• multi-resolution sampling of:• visibility • incident radiance

• compact, analytic representation of:• elevation-only functions• SH interpolation and projection operators

• simple GPU implementation• real-time up to 512x512 dynamic HFs

• can sub-sample visibility and incident radiance• performance independent of geometric content

49

Page 48: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Future Work

• combine with dynamic shadow casters – via [Ren06;Sloan07] (sphere set blocker approximation)

• apply to image-space global illumination frameworks

• generalize geometry– local height field displacements– tiled height field representations

50

Page 49: Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek Nowrouzezahrai University of Toronto.

Thanks! Any questions?

We acknowledge the helpful suggestions of the anonymous reviewers.