1 / 26

Fast Self-Shadowing on Dynamic Height Fields

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

will
Download Presentation

Fast 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 Self-Shadowing on Dynamic Height Fields John Snyder Microsoft Research

  2. [Sloan&Cohen00] Related Work [Max88; Stewart98; Sloan&Cohen00] • horizon mapping • hard shadows • precomputed for static geometry

  3. Related Work [Reeves87; Donnelly06; …] • shadow map filtering • light “bleeding” artifacts • small light sources • no complex environmental lighting [Donnelly06]

  4. Related Work [Bunnell05; Kontkanen05; …] • ambient occlusion • AO in screen-space • “cone” blocker model [Shanmugam07; Dimitrov08] [Dimitrov08] [Heidrich00; Oat07] [Oat07]

  5. Related Work [Sloan02; Ng04; …] • static relighting • dynamic relighting [Bunnell05, Zhang06, 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: restrict geometry to height field

  9. Summary of Main Ideas • approximate the horizon map via multi-res • avoid aliasing with height field pyramid • sample height differences from each pyramid level • use coarser levels as caster-to-receiver dist. increases • real-time for dynamic height fields • use the horizon map to generate SH visibility • soft shadows using visibility wedges • fully directional lighting response • sharpen shadows with restrictive wedges • fast: {2D lookup + SH z rotation + Σ over wedges} [Dimitrov08]

  10. Horizon Map height field: z=f(x)=f(x,y), p=(x,f(x)) horizon angle: (x,) max angle horizon makes at p in azimuthal direction  sample at all points x, along set of directions i

  11. + 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

  12. 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

  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 • 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

  14. + 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

  15. ( ) - 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

  16. 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

  17. 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}

  18. ò = 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

  19. ò = 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

  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 [ ] » × * = × 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

  21. 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

  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. 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

  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

More Related