Real-time realistic illumination and shading of stratiform clouds
description
Transcript of Real-time realistic illumination and shading of stratiform clouds
Real-time realistic illumination and shading
of stratiform cloudsAntoine Bouthors, Fabrice Neyret, Sylvain Lefebvre
Evasion-GRAVIR / IMAG-INRIAGrenoble, France
Eurographics Workshop on Natural Phenomena
MotivationsClouds are very complex:
Complex shapeLots of visual featuresLots of details
No one has reproduced everything yet
Multiple scatteringNo absorption, albedo = 1Thick (up to several km) Dense (Mean free path = several meters)
→ Very high number of scattering events (up to several hundreds)
Mie phase functionStrongly anisotropicComputationally expensive
• Depends on droplet size, temperature, wavelength
49% 49% 1%
Harris et. al.
Previous workInteractive approaches
Different approximations:Low albedo / low density → single scatteringSimpler phase function → not all featuresDiffusion approximation → isotropic
Volumetric modelsVery coarse
Billboards or slicesLots of overdraw
OverviewWhat we assume:
Stratiform → locally equivalent to a slabHomogeneous density
What we want:RealisticReal-time (GPU-friendly)Allow animation
OverviewComplex behavior
Rays with different orders of scattering
Our idea: a study of the contribution of each order
OverviewOur 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 sunStandard floor reflectance = ~20%
OverviewOur 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 sunStandard floor reflectance = ~20%
OverviewOur 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 sunStandard floor reflectance = ~20%
OverviewOur 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 sunStandard floor reflectance = ~20%
OverviewScattering:
Strong forward scattering: special treatment1+2 orders: analyticHigher 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 fieldWell fitted for stratiform cloudsLot of details in a small spaceProcedural & animatable
Phase functionOur Modified-Mie model
Strong narrow (<5°) forward scattering moved into extinction function
Error negligible with multiple scattering
Phase functionModified-Mie model validation
Monte-Carlo bench: generated reflection BRDFs
1234567+
1234567+
3+ scatteringAssuming diffusion → simple
interaction between column cellsGiven 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 roleSolution:
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,VSky & 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 texturesPlane-plane → Form Factor (ring to dS)
→ Using MIP-mapping
GPU-enhanced iterative algorithm
Render-to-textureHardware MIP-mapping
= -
ValidationComparison of our model with a Monte-
Carlo integration
100m-thick slab
5m-thick slab
Monte-Carlo bench: generated reflection BRDFs
123
123
ImplementationHeight field: advected textures [Ney03]
16km-wide landscape2km-height, 500m-thick cloud layer
Shaders + radiosity on GPU512x512 clouds textures512x512 ground textures512x512 shadows textures16x16 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
ConclusionGood
RealisticReproduce all clouds visual featuresAccount for clouds-ground inter-reflectionsReal-timeAnimation-friendly
BadPoor lateral shading (clouds borders)3+ scattering can be improvedLimited to stratiform clouds