Realtime realistic illumination and shading of stratiform clouds

  • Slides: 49
Download presentation
Real-time realistic illumination and shading of stratiform clouds Antoine Bouthors, Fabrice Neyret, Sylvain Lefebvre

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 l Clouds are very complex: Complex shape l Lots of visual features l

Motivations l Clouds are very complex: Complex shape l Lots of visual features l Lots of details l l No one has reproduced everything yet

Cloud facts

Cloud facts

Clouds types

Clouds types

Multiple scattering No absorption, albedo = 1 l Thick (up to several km) l

Multiple scattering No absorption, albedo = 1 l Thick (up to several km) l Dense (Mean free path = several meters) → Very high number of scattering events l (up to several hundreds)

Mie phase function Strongly anisotropic l Computationally expensive l • Depends on droplet size,

Mie phase function Strongly anisotropic l Computationally expensive l • Depends on droplet size, temperature, wavelength 49% 1%

Droplet size distribution l One common phase function for the whole cloud

Droplet size distribution l One common phase function for the whole cloud

Visual features l Fogbow & glory

Visual features l Fogbow & glory

Visual features Anisotropic forward scattering l Diffusive multiple scattering l

Visual features Anisotropic forward scattering l Diffusive multiple scattering l

Visual features l Pseudo-specular effect

Visual features l Pseudo-specular effect

Visual features l Clouds-ground inter-reflections Ice blink Water sky

Visual features l Clouds-ground inter-reflections Ice blink Water sky

Previous work Offline approaches Musgrave et. al. Musgrave

Previous work Offline approaches Musgrave et. al. Musgrave

Previous work Interactive approaches l Different approximations: Low albedo / low density → single

Previous work Interactive approaches l Different approximations: Low albedo / low density → single scattering l Simpler phase function → not all features l Diffusion approximation → isotropic l l Volumetric models l l Very coarse Billboards or slices l Lots of overdraw Harris et. al.

Our Model

Our Model

Overview l What we assume: Stratiform → locally equivalent to a slab l Homogeneous

Overview l What we assume: Stratiform → locally equivalent to a slab l Homogeneous density l l What we want: Realistic l Real-time (GPU-friendly) l Allow animation l

Overview l Complex behavior l Rays with different orders of scattering l Our idea:

Overview l Complex behavior l Rays with different orders of scattering l Our idea: a study of the contribution of each order

Overview l Our analysis: l Narrow forward scattering only important on silhouettes (low orders)

Overview l Our analysis: l Narrow forward scattering only important on silhouettes (low orders) Low orders of scattering give anisotropic features (fogbow, glory, pseudo-specular) l Higher orders become diffusive (i. e. isotropic) l Sky and ground play a role l l Sky illuminance = ~25% of that of the sun l Standard floor reflectance = ~20%

Overview l Our analysis: l Narrow forward scattering only important on silhouettes (low orders)

Overview l Our analysis: l Narrow forward scattering only important on silhouettes (low orders) Low orders of scattering give anisotropic features (fogbow, glory, pseudo-specular) l Higher orders become diffusive (i. e. isotropic) l Sky and ground play a role l l Sky illuminance = ~25% of that of the sun l Standard floor reflectance = ~20%

Overview l Our analysis: l Narrow forward scattering only important on silhouettes (low orders)

Overview l Our analysis: l Narrow forward scattering only important on silhouettes (low orders) Low orders of scattering give anisotropic features (fogbow, glory, pseudo-specular) l Higher orders become diffusive (i. e. isotropic) l Sky and ground play a role l l Sky illuminance = ~25% of that of the sun l Standard floor reflectance = ~20%

Overview l Our analysis: l Narrow forward scattering only important on silhouettes (low orders)

Overview l Our analysis: l Narrow forward scattering only important on silhouettes (low orders) Low orders of scattering give anisotropic features (fogbow, glory, pseudo-specular) l Higher orders become diffusive (i. e. isotropic) l Sky and ground play a role l l Sky illuminance = ~25% of that of the sun l Standard floor reflectance = ~20%

Overview l Scattering: Strong forward scattering: special treatment l 1+2 orders: analytic l Higher

Overview l Scattering: Strong forward scattering: special treatment l 1+2 orders: analytic l Higher orders (3+) considered isotropic l l Environment: Take sky into account (diffuse source) l Clouds-ground radiosity (plane parallel) l l Shape: l Height field

Clouds representation l Clouds are stored as a height field Well fitted for stratiform

Clouds representation l Clouds are stored as a height field Well fitted for stratiform clouds l Lot of details in a small space l Procedural & animatable l

Phase function l Our Modified-Mie model Strong narrow (<5°) forward scattering moved into extinction

Phase function l Our Modified-Mie model Strong narrow (<5°) forward scattering moved into extinction function l Error negligible with multiple scattering l

Phase function l Modified-Mie model validation Monte-Carlo bench: generated reflection BRDFs 7+ 65 4

Phase function l Modified-Mie model validation Monte-Carlo bench: generated reflection BRDFs 7+ 65 4 7+ 3 1 2 4 6 5 3 2 1

Single scattering l Slab -> Local analytical function

Single scattering l Slab -> Local analytical function

Double scattering l Local approximation by convolution

Double scattering l Local approximation by convolution

3+ scattering Convolution = bad idea for high orders l Assume slab → 1

3+ scattering Convolution = bad idea for high orders l Assume slab → 1 D problem → column l

3+ scattering Assuming diffusion → simple interaction between column cells l Given scattering behavior

3+ scattering Assuming diffusion → simple interaction between column cells l Given scattering behavior of a cell → analytical solution for the column l

3+ scattering l How to know the multiple scattering behavior of one cell ?

3+ scattering l How to know the multiple scattering behavior of one cell ? Characteristic of the « cloud material » l Precompute Monte Carlo integration → reflectance & transmittance of a cell l

3+ scattering l Issue: l l Diffuse hypothesis broken on top cell: anisotropy still

3+ scattering l Issue: l l Diffuse hypothesis broken on top cell: anisotropy still plays a role Solution: 1 D model correction term dependant on the sun incident angle l Correction parameters fitted on Monte Carlo simulations l

Sky & ground contributions Previous: valid for directional L, V l Sky & ground:

Sky & ground contributions Previous: valid for directional L, V l Sky & ground: Assumed diffuse source l 1 D model used l → gives diffuse reflectance & transmittance l

Ground-clouds inter-reflections l l l Radiosity between two facing parallel planes → known form

Ground-clouds inter-reflections l l l 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 l Plane-plane → Form Factor (ring to

Ground-clouds inter-reflections Reflectances and radiosities in textures l Plane-plane → Form Factor (ring to d. S) l l → Using MIP-mapping = l - GPU-enhanced iterative algorithm Render-to-texture l Hardware MIP-mapping l

Validation l Validation of our 1 D model

Validation l Validation of our 1 D model

Validation l Comparison of our model with a Monte. Carlo integration 5 m-thick slab

Validation l Comparison of our model with a Monte. Carlo integration 5 m-thick slab Monte-Carlo bench: generated reflection BRDFs 3 1 2 100 m-thick slab 3 2 1

Implementation l Height field: advected textures [Ney 03] 16 km-wide landscape l 2 km-height,

Implementation l Height field: advected textures [Ney 03] 16 km-wide landscape l 2 km-height, 500 m-thick cloud layer l l Shaders + radiosity on GPU 512 x 512 clouds textures l 512 x 512 ground textures l 512 x 512 shadows textures l 16 x 16 radiosity textures l l 18 to 40 FPS on current hardware

Results

Results

Lighting contributions bottom view 1 and 2 scattering 3+ scattering Ground illumination (incl. radiosity)

Lighting contributions bottom view 1 and 2 scattering 3+ scattering Ground illumination (incl. radiosity) Sky illumination

Summing it all bottom view

Summing it all bottom view

Lighting contributions top view 1 and 2 scattering 3+ scattering Ground illumination Sky illumination

Lighting contributions top view 1 and 2 scattering 3+ scattering Ground illumination Sky illumination

Summing it all top view

Summing it all top view

Features Glory and fogbow

Features Glory and fogbow

Features Glory and fogbow

Features Glory and fogbow

Features Water sky

Features Water sky

Features Pseudo-specular reflection

Features Pseudo-specular reflection

Features Pseudo-specular reflection

Features Pseudo-specular reflection

Videos l Videos

Videos l Videos

Conclusion l Good Realistic l Reproduce all clouds visual features l Account for clouds-ground

Conclusion l Good Realistic l Reproduce all clouds visual features l Account for clouds-ground inter-reflections l Real-time l Animation-friendly l l Bad Poor lateral shading (clouds borders) l 3+ scattering can be improved l Limited to stratiform clouds l

Questions ?

Questions ?