500 likes | 656 Views
Derek Nowrouzezahrai University of Toronto. Fast Global-Illumination on Dynamic Height Fields. John Snyder Microsoft Research. Related Work. static geometry [Sloan02; Ng04; …] dynamic geometry [Bunnell05, Ren06, Sloan07, Ritschel08]. [Sloan&Cohen00]. Related Work.
E N D
Derek Nowrouzezahrai University of Toronto Fast Global-Illumination on Dynamic Height Fields John Snyder Microsoft Research
Related Work • static geometry [Sloan02; Ng04; …] • dynamic geometry [Bunnell05, Ren06, Sloan07, Ritschel08]
[Sloan&Cohen00] Related Work • screen-space shading [Shanmugam07;Ritschel09…] • ignores view-occluded blockers • horizon mapping [Max88; …] • precomputation for hard shadows on static geometry [Dimitrov08]
Related Work • fast soft-shadowing on dynamic height fields [SN08]
Goals • all of [SN08]as well as • dynamic indirect illumination • glossy effects (direct and indirect)
Goals [SN08] Our results
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
Summary of Main Ideas • create height and shading pyramids • sample from pyramid levels • pre-filter data • approximate visibility & incident radiance w/ multi-resolution • compute visibility and radiance at discrete azimuthal directions • determine final spherical visibility and incident radiance
Azimuthal Swaths [SN08] • for smaller area (key) light sources: • restrict azimuthal extent and use m = 3 • get sharper shadows • acts as a geometric mask • only sample where necessary • env lights and incident radiance: • complete swath and use m = 32
Definitions and Notation blocking angle: (t) angle p makes at t along incident radiance: u(t) incident radiance at t towards p along u(t) (t) Sample and u at all points talong direction .
Calculating the Incident Radiance Which points on the height field contribute indirect radiance?
Calculating the Incident Radiance Which points on the height field contribute indirect radiance?
Calculating the Incident Radiance Which points on the height field contribute indirect radiance?
Calculating the Incident Radiance Which points on the height field contribute indirect radiance?
Calculating the Incident Radiance Which points on the height field contribute indirect radiance?
Calculating the Incident Radiance Which points on the height field contribute indirect radiance?
Calculating the Incident Radiance Which points on the height field contribute indirect radiance?
Calculating the Incident Radiance Which points on the height field contribute indirect radiance?
Calculating the Incident Radiance Which points on the height field contribute indirect radiance?
Calculating the Incident Radiance Which points on the height field contribute indirect radiance?
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.
Brute Force Sampling – Pitfall… Problem: aliasing – need many samples in t. Solution: prefilter data, apply multi-scale sampling.
Multi-Resolution Height Sampling height pyramid level i sampling distance for level i τ τ τ τ i-1 i-2 i-3 i Sample coarser levels further from x. fi fi-1 fi-2 fi-3
Multi-Resolution Radiance Sampling multi-scale incident radiance samples τ τ τ τ radiance pyramid (for the previous bounce) i-2 i-1 i-3 i blocking angle at Sample coarser levels further from x. ui ui-1 ui-2 ui-3
Summary of Main Ideas • approximate visibility & incident radiance w/ multi-resolution • compute visibility and radiance at discrete azimuthal directions • determine final spherical visibility and incident radiance • analytic visibility and incident radiance • use normalized Legendre polynomials (NLPs)
Analytic Occlusion Elevation Function σ • we start with the binary occlusion function: 0 1 • and represent it analytically in the Normalized Legendre Polynomial (NLP) basis:
Analytic Visibility and IR • can represent visibility and incident radiance in NLP with = max + + v() 1 max 1 - • visibility binary function with 1 transition from 0 to 1 @ max as increases 1 = 0 u() • incident radiance piece-wise constant, RGB function of elevation
Summary of Main Ideas • approximate visibility & incident radiance w/ multi-resolution • compute visibility and radiance at discrete azimuthal directions • determine final spherical visibility and incident radiance • NLPSH blending & projection • fast shading pipeline
From Sampled NLP to Full SH • given (2 x m) NLP vectors • need full spherical functions (represented in SH) • interpolate between azimuthal samples + • project resulting spherical function into SH • requires only 1 pre-computed matrix! • matrix acts on NLP coefficients at edges of each swath • rotate & sum across swaths for final SH • All operations performed in a single GPGPU shader. See • supplemental material for full source code.
N x f f ( ( N R ) ) x x Global Illumination Shading with SH • at each shading point: compute m azimuthal visibility + incident radiance NLP vectors interpolate & project into SH. Rotate & sum across directions R or x BRDF: clamped cosine and/or Phong lobe or external lighting environment
Global Illumination Shading with SH Direct Illumination: BRDF x Visibility SH Product and take inner product with lighting Indirect Illumination: BRDF take inner product with Incident Radiance
Comparison to Ground Truth m = 32 ground truth
Memory Usage • we typically sub-sample visibility & IR • shade with full-resolution geometry & normals
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
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
Thanks! Any questions? We acknowledge the helpful suggestions of the anonymous reviewers.