1 / 27

Fast Soft Self-Shadowing on Dynamic Height Fields

Derek Nowrouzezahrai University of Toronto. Fast Soft Self-Shadowing on Dynamic Height Fields. John Snyder Microsoft Research. [Sloan&Cohen00]. Related Work. horizon mapping [Max88; …] hard shadows precomputed for static geometry. Related Work. shadow map filtering [Reeves87; …]

paul2
Télécharger la présentation

Fast Soft Self-Shadowing on Dynamic Height Fields

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. [Sloan&Cohen00] 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 [Sloan02; Ng04; …] • static relighting • dynamic relighting [Bunnell05, Ren06, Sloan07]

  6. Goals • response to lighting direction (cast shadows) ambient occlusion low-frequency SH [Ren06]

  7. Goals • response to lighting direction (cast shadows) • environmental + directional lighting

  8. Goals • 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 • greatly 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 + Σ over wedges}

  10. Horizon Map [Max88] height field: z=f(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 xalong set of directions i.

  11. Calculating the Horizon Map Problem: aliasing – need many samples in t. Solution: prefilter height field, apply multi-scale derivative.

  12. + j + j - æ ö f ( x t cos , y t sin ) f ( x , y ) - w j = 1 ç ÷ ( x , ) max tan t è ø Î ¥ t ( 0 , ) • Note: the horizon angle contains an expression similar to a numerical derivative of f Background = = z f ( x ) f ( x , y ) • Given a height field , the • maximum elevation angle of the horizon in the azimuthal direction, called the horizon angle, is

  13. f ( x ) i Using a HF pyramid • We will use a multi-resolution pyramid in order to accelerate the computation of the horizon angle • pyramid level i denoted for • with resolution multipliers of • for k = 4 storage is approximately 3.4x the original HF

  14. f ( x ) i Using a HF pyramid • We will use a multi-resolution pyramid in order to accelerate the computation of the horizon angle • pyramid level i denoted for • with resolution multipliers of • for k = 4 storage is approximately 3.4x the original HF • The pyramid will allow us to use an approximate sampling rate in directions and distance from receiver point • reduces sampling requirements of points far from the receiver while avoiding aliasing artifacts

  15. + j + j - f ( x d cos , y d sin ) f ( x , y ) j = i i i i D ( f , x , , d ) i i d i Multi-Scale Derivative • We introduce a multi-scale directional derivative, defined in terms of: • the pyramid scale • the receiver point • the azimuthal direction • and the distance to the receiver point • Sample heights from coarser pyramid levels as the distance from the receiver increases

  16. ( ) - w j = j 1 ( x , , d ) tan D ( f , x , , d ) i i i i i • convert the discrete “scale-space” horizon angles from step 1 to a continous function using b-spline interpolation w t j = t w j w j ( , x , ) b - spline ( , ( x , , d ),..., ( x , , d )) - - 0 0 1 1 N N Approximate Horizon Angle • To approximate the horizon angle given the multi-scale directional derivative we • obtain the horizon angle at each pyramid level

  17. For strong directional lighting, b-spline pyramid synthesis as well as b-spline blocker angle interpolation are required to eliminate aliasing Approximate Horizon Angle 3. and take the max of the continuous function over all scales in the pyramid

  18. Main Ideas • Approximating the horizon map • using a height field pyramid to avoid aliasing • in real-time for dynamic height field geometries • Use the horizon map to generate SH visibility • soft shadows using visibility “wedges” • fully directional lighting response • can sharpen shadows with restrictive wedges • FAST: {2D lookup + SH z rotation + Σ over wedges}

  19. ò = L ( x , s ) L ( x , s ) f ( x , s , s ) v ( x , s ) cos( s ) ds q out in r out S Background • The rendering equation for direct illumination is

  20. ò = L ( x , s ) L ( x , s ) f ( x , s , s ) v ( x , s ) cos( s ) ds q out in r out S ò ò = = L ( x ) L ( x , s ) h ( x , N ) v ( x , s ) ds L ( x , s ) T ( x ) ds in x in S S Background • The rendering equation for direct illumination is assume a diffuse BRDF and combine the reflectance and the cosine term

  21. ò = L ( x , s ) L ( x , s ) f ( x , s , s ) v ( x , s ) cos( s ) ds q out in r out S ò ò = = L ( x ) L ( x , s ) h ( x , N ) v ( x , s ) ds L ( x , s ) T ( x ) ds in x in S S [ ] » × * = × L ( x ) L H ( N ) V L T x x x 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

  22. 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 • Determine total SH visibility over each azimuthal swath • Shade with SH triple product

  23. 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 • Determine total SH visibility over each azimuthal swath • Shade with SH triple product

  24. 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 • Determine total SH visibility over each azimuthal swath • Shade with SH triple product

  25. 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 • Determine total SH visibility over each azimuthal swath • Shade with SH triple product

  26. Contributions • Aformulationof 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 amulti-scale directional derivative • We present an efficient algorithm for determining the visibility

  27. Contributions • Aformulationof 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 amulti-scale directional derivative • We present an efficient algorithm for determining the visibility

More Related