450 likes | 589 Views
Efficient Rendering of Lightning Taking into Account Scattering Effects due to Clouds and Atmospheric Particles. Yoshinori Dobashi. Tsuyoshi Yamamoto. ( Hokkaido University ). Tomoyuki Nishita. ( The University of Tokyo ). Overview. Introduction.
E N D
Efficient Rendering of Lightning Taking into Account Scattering Effects due to Clouds and Atmospheric Particles Yoshinori Dobashi Tsuyoshi Yamamoto (Hokkaido University) Tomoyuki Nishita (The University of Tokyo)
Overview • Introduction • Effects of Atmospheric Scattering due to Lightning • Clouds Illuminated by Lightning • Results • Conclusions
Photo-realistic Rendering of Natural Scenes • visual assessments • flight simulators • Simulations under bad weather conditions • windstorm, sandstorm, rain, lightning • Purposes • Realistic rendering of scenes including lightning • Development of efficient rendering method Introduction Previous methods: Clear/cloudy days
Shape of lightning • Illuminating clouds • Atmospheric scattering • Illuminating ground Important Elements
rendering speed atmospheric scattering clouds Modeling using particle systems [Reed94] slow Probabilistic modeling [Kruszewski99] fast DLA taking into account clouds [Sosorbaram01] slow Previous Methods • Methods related to lightning
rendering speed atmospheric scattering clouds Modeling using particle systems [Reed94] slow Probabilistic modeling [Kruszewski99] fast DLA taking into account clouds [Sosorbaram01] slow Previous Methods • Methods related to lightning
rendering speed atmospheric scattering clouds Modeling using particle systems [Reed94] slow Probabilistic modeling [Kruszewski99] fast DLA taking into account clouds [Sosorbaram01] slow Previous Methods • Methods related to lightning
rendering speed atmospheric scattering clouds Modeling using particle systems [Reed94] slow Probabilistic modeling [Kruszewski99] fast DLA taking into account clouds [Sosorbaram01] slow fast Our method Previous Methods • Methods related to lightning
shafts of light through trees and clouds [Max86] shafts of light produced by spotlights [Nishita87] extending radiosity method [Rushmeier87] photon map [Jansen98] hardware rendering of smokes [Stam99, Stam01] hardware rendering of shafts of light through clouds [Dobashi00] Previous Methods • Related to clouds and atmospheric scattering None of these takes into account scattering effects due to lightning flash.
Features of Proposed Method • Use of Reed‘s method for modeling • Use of Reed‘s method for modeling • User specifies Color of lightning • User specifies Color of lightning • Atmospheric scattering due to flash of lightning • Atmospheric scattering due to flash of lightning • Clouds illuminated by flash of lightning • Clouds illuminated by flash of lightning • Efficient rendering of clouds for fly- through animations • Efficient rendering of clouds for fly- through animations
Features of Proposed Method • Use of Reed‘s method for modeling • User specifies Color of lightning • Atmospheric scattering due to flash of lightning • Clouds illuminated by flash of lightning • Efficient rendering of clouds for fly- through animations
Overview • Introduction • Effects of Atmospheric Scattering due to Lightning • Clouds Illuminated by Lightning • Results • Conclusions
point sources Atmospheric Scattering • Placing point light sources clouds lightning viewpoint
- r k + exp( ( s t )) ¥ Ik ò ( ) k a a l = r a l I ( ) F (cos ) I ( ) dt l eye a k s 2 s 0 ra: density l : wavelength F : phase function a : phase angle t ka: extinction coefficient a s : distance between source and P t : distance between V and P Ik : intensity of point source Atmospheric Scattering • Placing point light sources • Consider a single source k P viewpoint V
- r k + exp( ( s t )) ¥ Ik ò ( ) k a a l = r a l I ( ) F (cos ) I ( ) dt l eye a k s 2 s 0 t a Atmospheric Scattering • Placing point light sources • Consider a single source k • No analytical solutions P viewpoint
- r k + exp( ( s t )) ¥ ò ( ) k a a l = r a l I ( ) F (cos ) I ( ) dt l eye a k 2 s 0 Ieye(k) Atmospheric Scattering • Placing point light sources • Consider a single source k Ik • No analytical solutions • Ray tracing • Computationally expensive • Use of look-up table viewpoint
Intensity due to a single source u (u, v) - r k + exp( ( s t )) ¥ ò ( ) k a a l = r a l I ( ) F (cos ) I ( ) dt l eye a k s 2 s 0 2 2 = + s u v P eye v = - t | u u | t eye a 2 2 a = - + cos 1 / u v - ¥ 1 ò eye l = r I ( u , v , ) F ( ) l ( ) k l eye eye a l = l I ( ) I I ( u , v , ) 2 2 u + u v eye eye k l eye eye eye 2 2 - r k + + - exp( ( u v | u u |)) (ueye, veye) a a eye eye du 2 2 + u v eye Efficient Computation Using Look-up Table • Creating look-up table • local coordinate uv
u (u, v) s P v t a ( ) k l = l I ( ) I I ( u , v , ) eye k l eye eye (ueye, veye) Efficient Computation Using Look-up Table • function of (ueye, veye , l) • preparing table by changing values of (ueye, veye , l) • -T < (ueye, veye) < T(T:specified by user) • l: sampled at R, G, B
u (u, v) s P v t a n å l = l D I ( ) I I ( u , v , ) l p k l p , k p , k = k 1 ( ) k l = l I ( ) I I ( u , v , ) eye k l eye eye (ueye, veye) Efficient Computation Using Look-up Table • function of (ueye, veye , l) • preparing table by changing values of (ueye, veye , l) • Intensity of pixel Can be computed efficientlyusing look-up table
Overview • Introduction • Effects of Atmospheric Scattering due to Lightning • Clouds Illuminated by Lightning • Results • Conclusions
center density q metaballs field function R effectiveradius metaball Intensity Calculation of Clouds • Density distribution [Dobashi00] • voxels • metaballs
metaball lightning point sources Intensity Calculation of Clouds • Density distribution [Dobashi00] • voxels • metaballs • Intensity Calculation • sum of intensity due to each point source • use of hardware • use of LOD
metaball lightning point sources Intensity Calculation of Clouds • Density distribution [Dobashi00] • 3D voxels • metaballs • Intensity Calculation • sum of intensity due to each point source • use of hardware • use of LOD
metaball point source k lightning Computing Attenuation Using Hardware • Attenuation to each metaball • use of hardware-accelerated splatting [Dobashi00] • limited to parallel • sources • extending to point • sources
box as six screens Computing Attenuation Using Hardware • Attenuation to each metaball metaball • placing a box as 6 screens point source k
Computing Attenuation Using Hardware • Attenuation to each metaball metaball • placing a box as 6 screens point source k box as six screens
attenuation ratio Computing Attenuation Using Hardware billboard (square polygon) • Attenuation to each metaball • placing a box as 6 screens • place billboards at centers of metaballs • project metaballs • pixel value of the centers point source k • Problem Using LOD:grouping metaballs hierarchically box as six screens cost ∝ no. of metaballs (realistic clouds:tens of thousands of metaballs)
Ikj r l - t I ( ) exp( ( r )) Ik k l = I ( ) kj 2 r Efficient Computation Using LOD • Light reaching metaball: metaballj • inversely proportional to square of distance point source k
Ikj r l - t I ( ) exp( ( r )) Ik k l = I ( ) kj 2 r Efficient Computation Using LOD • Light reaching metaball: metaball j • inversely proportional to square of distance • attenuation due to cloud particles point source k
l - t I ( ) exp( ( r )) k l = I ( ) kj 2 r Efficient Computation Using LOD • Light reaching metaball: metaball • inversely proportional to square of distance • attenuation due to cloud particles • intensity is small at distant regions, and almost uniform. point source k
l - t I ( ) exp( ( r )) k l = I ( ) kj 2 r Efficient Computation Using LOD • Light reaching metaball: metaball • inversely proportional to square of distance • attenuation due to cloud particles • intensity is small at distant regions, and almost uniform. point source k • Approximation by larger metaballs • Selecting appropriate metaballs depending on distances
larger metaball metaball Efficient Computation Using LOD • Representing metaballs using octree • Grouping neighboring metaballs • density:average • radius:twice • Selecting appropriate levels depending on distances
metaball j Ikj l - t I ( ) exp( ( r )) r k = dVj 2 r Ik point source k { } l - t max I ( ) exp( ( r )) k l dVj < e 2 r requires integration of density of cloud particles Efficient Computation Using LOD • Selection of appropriate levels • energy received by metaball j dVj Ej = (light reaching metaball) x (volume) • condition: (e : threshold)
metaball j Ikj l - t I ( ) exp( ( r )) r k = dVj 2 r Ik point source k { } { } l - t l max I ( ) exp( ( r )) max I ( ) k k l l e dVj dVj < < 2 2 r r energy when there are no particles between metaball and point source. ( ) exp(-t(r)) < 1.0 ∴ Efficient Computation Using LOD • Selection of appropriate levels • energy received by metaball j dVj Ej = (light reaching metaball) x (volume) • condition:
l max{ I ( )} k dVj l < e 2 r Efficient Computation Using LOD • Selection of appropriate levels clouds • condition: • check metaballs of highest level point source k
l max{ I ( )} k dVj l < e 2 r Efficient Computation Using LOD • Selection of appropriate levels clouds × • condition: • check metaballs of highest level • proceed to metaballs of lower levels ○ point source k
l max{ I ( )} k dVj l < e 2 r Efficient Computation Using LOD • Selection of appropriate levels clouds ○ • condition: • check metaballs of highest level • proceed to metaballs of lower levels × point source k
l max{ I ( )} k dVj l < e 2 r Efficient Computation Using LOD • Selection of appropriate levels clouds selected metaballs • condition: • check metaballs of highest level • proceed to metaballs of lower levels point source k Reducing number of metaballs to be processed
Overview • Introduction • Features of Our method • Effects of Atmospheric Scattering due to Lightning • Clouds Illuminated by Lightning • Results • Conclusions
(T: 1.5 [km]) table size: 128x128 Results • Verification using simple example • Parameter settings: no. of point sources: 50 attenuation ratio: 0.03 density of atmospheric particles: 0.15 threshold e : 0.2 no. of metaballs: 250,000
Computation time • with LOD : 8 [s] • without LOD : 400 [s] computer:PentiumIII (733MHz), GeForce2GTS Image size: 720X480 Results with LOD without LOD 50 times faster!
Results (a) lightning in clouds (b) multiple lightning (c) colored lightning (pink) (d) lightning at sunset
Example Animation(VIDEO) • Simulation of lightning under different conditions • Flight simulation • On animating lightning: • Initial points are determined randomly in clouds. • Periods from occurrence to the extinction are determined randomly, less than 0.5 seconds. • Intensity is determined randomly.
Conclusions • Realistic image synthesis of scenes including lightning • atmospheric scattering due to flash of lightning • clouds illuminated by flash of lightning • efficient rendering using look-up table and idea of LOD • hierarchical imposters for efficient rendering of clouds
Future Work • Automatic determination of parameters • Automatic determination of lightning color • Further speeding up for real-time simulations