500 likes | 777 Views
Real-time realistic illumination and shading of stratiform clouds. Antoine Bouthors, Fabrice Neyret, Sylvain Lefebvre Evasion-GRAVIR / IMAG-INRIA Grenoble, France Eurographics Workshop on Natural Phenomena. Motivations. Clouds are very complex: Complex shape Lots of visual features
E N D
Real-time realistic illumination and shading of stratiform clouds Antoine Bouthors, Fabrice Neyret, Sylvain Lefebvre Evasion-GRAVIR / IMAG-INRIA Grenoble, France Eurographics Workshop on Natural Phenomena
Motivations • Clouds are very complex: • Complex shape • Lots of visual features • Lots of details • No one has reproduced everything yet
Multiple scattering • No absorption, albedo = 1 • Thick (up to several km) • Dense (Mean free path = several meters) → Very high number of scattering events (up to several hundreds)
Mie phase function • Strongly anisotropic • Computationally expensive • Depends on droplet size, temperature, wavelength 49% 1% 49%
Droplet size distribution • One common phase function for the whole cloud
Visual features • Fogbow & glory
Visual features • Anisotropic forward scattering • Diffusive multiple scattering
Visual features • Pseudo-specular effect
Visual features • Clouds-ground inter-reflections Water sky Ice blink
Previous workOffline approaches Musgrave et. al. Musgrave
Harris et. al. Previous workInteractive approaches • Different approximations: • Low albedo / low density → single scattering • Simpler phase function → not all features • Diffusion approximation → isotropic • Volumetric models • Very coarse • Billboards or slices • Lots of overdraw
Overview • What we assume: • Stratiform →locally equivalent to a slab • Homogeneous density • What we want: • Realistic • Real-time (GPU-friendly) • Allow animation
Overview • Complex behavior • Rays with different orders of scattering • Our idea: a study of the contribution of each order
Overview • Our analysis: • Narrow forward scattering only important on silhouettes (low orders) • Low orders of scattering give anisotropic features (fogbow, glory, pseudo-specular) • Higher orders become diffusive (i.e. isotropic) • Sky and ground play a role • Sky illuminance = ~25% of that of the sun • Standard floor reflectance = ~20%
Overview • Our analysis: • Narrow forward scattering only important on silhouettes (low orders) • Low orders of scattering give anisotropic features (fogbow, glory, pseudo-specular) • Higher orders become diffusive (i.e. isotropic) • Sky and ground play a role • Sky illuminance = ~25% of that of the sun • Standard floor reflectance = ~20%
Overview • Our analysis: • Narrow forward scattering only important on silhouettes (low orders) • Low orders of scattering give anisotropic features (fogbow, glory, pseudo-specular) • Higher orders become diffusive (i.e. isotropic) • Sky and ground play a role • Sky illuminance = ~25% of that of the sun • Standard floor reflectance = ~20%
Overview • Our analysis: • Narrow forward scattering only important on silhouettes (low orders) • Low orders of scattering give anisotropic features (fogbow, glory, pseudo-specular) • Higher orders become diffusive (i.e. isotropic) • Sky and ground play a role • Sky illuminance = ~25% of that of the sun • Standard floor reflectance = ~20%
Overview • Scattering: • Strong forward scattering: special treatment • 1+2 orders: analytic • Higher orders (3+) considered isotropic • Environment: • Take sky into account (diffuse source) • Clouds-ground radiosity (plane parallel) • Shape: • Height field
Clouds representation • Clouds are stored as a height field • Well fitted for stratiform clouds • Lot of details in a small space • Procedural & animatable
Phase function • Our Modified-Mie model • Strong narrow (<5°) forward scattering moved into extinction function • Error negligible with multiple scattering
1 2 3 4 5 6 7+ 1 2 3 4 5 6 7+ Phase function • Modified-Mie model validation Monte-Carlo bench: generated reflection BRDFs
Single scattering • Slab -> Local analytical function
Double scattering • Local approximation by convolution
3+ scattering • Convolution = bad idea for high orders • Assume slab → 1D problem → column
3+ scattering • Assuming diffusion → simple interaction between column cells • Given scattering behavior of a cell → analytical solutionfor the column
3+ scattering • How to know the multiple scattering behavior of one cell ? • Characteristic of the « cloud material » • Precompute Monte Carlo integration→ reflectance & transmittance of a cell
3+ scattering • Issue: • Diffuse hypothesis broken on top cell:anisotropy still plays a role • Solution: • 1D model correction term dependant on the sun incident angle • Correction parameters fitted on Monte Carlo simulations
Sky & ground contributions • Previous: valid for directional L,V • Sky & ground: Assumed diffuse source • 1D model used • → gives diffuse reflectance & transmittance
Ground-clouds inter-reflections • Radiosity between two facing parallel planes → known form factors (analytic) • Heterogeneous source (clear sky + cloud bottom) • Heterogenous reflectance (ground AND clouds) Ecloud = (Sun+sky)T + Σi(Rcloud_i FF Eground_i) Eground = (Sun+sky)R + Σi(Rground_i FF Ecloud_i)
- = Ground-clouds inter-reflections • Reflectances and radiosities in textures • Plane-plane → Form Factor (ring to dS) • → Using MIP-mapping • GPU-enhanced iterative algorithm • Render-to-texture • Hardware MIP-mapping
Validation • Validation of our 1D model
Validation • Comparison of our model with a Monte-Carlo integration 5m-thick slab 1 Monte-Carlo bench: generated reflection BRDFs 2 3 100m-thick slab 3 2 1
Implementation • Height field: advected textures [Ney03] • 16km-wide landscape • 2km-height, 500m-thick cloud layer • Shaders + radiosity on GPU • 512x512 clouds textures • 512x512 ground textures • 512x512 shadows textures • 16x16 radiosity textures • 18 to 40 FPS on current hardware
Lighting contributionsbottom view 1 and 2 scattering 3+ scattering Ground illumination (incl. radiosity) Sky illumination
Lighting contributionstop view 1 and 2 scattering 3+ scattering Ground illumination Sky illumination
Videos • Videos
Conclusion • Good • Realistic • Reproduce all clouds visual features • Account for clouds-ground inter-reflections • Real-time • Animation-friendly • Bad • Poor lateral shading (clouds borders) • 3+ scattering can be improved • Limited to stratiform clouds