Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek...
-
date post
21-Dec-2015 -
Category
Documents
-
view
219 -
download
0
Transcript of Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research Derek...
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
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
Goals
• all of [SN08] as well as – dynamic indirect illumination– glossy effects (direct and indirect)
6
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
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
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
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
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
Brute Force Sampling
Problem: aliasing – need many samples in t.Solution: prefilter data, apply multi-scale sampling.
– Pitfall…
33
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
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
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
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
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
+ + =
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
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
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
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
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
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
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
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