Atmospheric Effects Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware Tsuyoshi Yamamoto Tomoyuki Nishita Tokyo University Yoshinori Dobashi Hokkaido University
Atmospheric Effects Overview Introduction Rendering Light Beams Rendering the Earth’s Atmosphere - motivation - previous work - basic Idea - problems - high quality rendering - rendering sky - rendering the earth viewed from space Results Conclusion
Atmospheric Effects Overview Introduction Rendering Light Beams Rendering the Earth’s Atmosphere - motivation - previous work - basic Idea - problems - high quality rendering - rendering sky - rendering the earth viewed from space Results Conclusion Introduction - motivation - previous work Rendering Light Beams - basic Idea - problems - high quality rendering Rendering the Earth’s Atmosphere - rendering sky - rendering the earth viewed from space Results Conclusion
Atmospheric Effects Overview Introduction Rendering Light Beams Rendering the Earth’s Atmosphere - motivation - previous work - basic Idea - problems - high quality rendering - rendering sky - rendering the earth viewed from space Results Conclusion
Atmospheric Effects Real-time rendering of realistic images Real-time rendering of realistic images Atmospheric Scattering Effects Motivation - spotlights - sunlight through windows - earth’s atmosphere Real-time rendering of atmospheric effects Real-time rendering of atmospheric effects Our Goal: requires long computation time - scattering and absorption of light due to small particles
Atmospheric Effects Previous Work - use of voxels to store the intensity of light Volume rendering [e.g. Behrens98, Westermann98] - consuming texture memory for volume data - difficult to capture the edges of shafts of light edges of spotlight edges of shadows
Atmospheric Effects Previous Work Interleaved sampling [Keller01] - a general and efficient solution to the sampling problem - not optimal for rendering atmospheric scattering 2D texture based approach [Dobashi01, Everitt99] Earth’s atmosphere - no methods for real-time rendering of realistic images - use of shadow and projective texture mapping - artifacts due to sampling errors
Atmospheric Effects Proposed Method Rendering light beams - point/infinite light sources - uniform density of atmospheric particles Rendering earth’s atmosphere - sky - density decreases exponentially according to the height from the ground - the earth viewed from space Precise and efficient rendering of atmospheric effects
Atmospheric Effects Overview Introduction Rendering Light Beams Rendering the Earth’s Atmosphere - motivation - previous work - basic Idea - problems - high quality rendering - rendering sky - rendering the earth viewed from space Results Conclusion
Atmospheric Effects point source I eye viewpoint scattered light T ls dttgtHtII 0 ),()(),()( Intensity at viewpoint Shading Model for Light Beams
Atmospheric Effects IsIs t point light viewpoint P IlIl tH)( : visibility function Shading Model for Light Beams T ls dttgtHtII 0 ),()(),()( : intensity of light l tI),( : attenuation function tg),( Intensity at viewpoint
Atmospheric Effects Basic Idea Intensity at viewpoint [Dobashi00] T ls dttgtHtII 0 ),()(),()( n k1 l tI),( tg),( tH)( screen sampling plane viewpoint point light computed at lattices
Atmospheric Effects n k1 Basic Idea l tI),( tg),( Intensity at viewpoint T ls dttgtHtII 0 ),()(),()( tH)( light map texture mapping light map viewpoint point light [Dobashi00]
Atmospheric Effects n k1 Basic Idea l tI),( tg),( Intensity at viewpoint T ls dttgtHtII 0 ),()(),()( tH)( viewpoint point light [Dobashi00] object shadow mapping
Atmospheric Effects n k1 Basic Idea l tI),( tg),( Intensity at viewpoint T ls dttgtHtII 0 ),()(),()( tH)( viewpoint point light render sampling planes with additive blending [Dobashi00] object shadow mapping
Atmospheric Effects accumulation of errors in proportion to number of sampling planes quantization with 8 bit precision in most hardware - artifacts due to quantization errors Problems Many planes/lattices for high quality image Accuracy number of planes number of lattice points - increase in rendering time rendering time number of planes number of lattice points sampling errors pseudo-contours
Atmospheric Effects High Quality Rendering n k1 s t II ),( T ls dttgtHtII 0 ),()(),()( tt t lks k k dttgtHtItI),()(),(),( IsIs t point light P IlIl tt Intensity at viewpoint
Atmospheric Effects High Quality Rendering n k1 s t II ),( T ls dttgtHtII 0 ),()(),()( tt t lks k k dttgtHtItI),()(),(),( IsIs t point light P IlIl tt Intensity at viewpoint changes severely changes smoothly const. in t
Atmospheric Effects High Quality Rendering n k1 s t II ),( T ls dttgtHtII 0 ),()(),()( tt t lks k k dttgtHtItI),()(),(),( IsIs t point light P IlIl tt Intensity at viewpoint fhfh flfl tt t l k k dttHtI)(),( tt t k k dttg),( x
Atmospheric Effects High Quality Rendering n k1 s t II ),( T ls dttgtHtII 0 ),()(),()( tt t lks k k dttgtHtItI),()(),(),( IsIs point light IlIl Intensity at viewpoint fhfh flfl tt t l k k dttHtI)(),( tt t k k dttg),( x = 1.0 scattered light scattering component
Atmospheric Effects High Quality Rendering n k1 s t II ),( T ls dttgtHtII 0 ),()(),()( tt t lks k k dttgtHtItI),()(),(),( IsIs point light IlIl Intensity at viewpoint fhfh flfl tt t l k k dttHtI)(),( tt t k k dttg),( x scattering component ratio of reached light object Illumination component
Atmospheric Effects sub-planes for accurate sampling use of texture to store pre-integrated values High Quality Rendering Illumination component fh:fh: tt t l k k dttHtI)(),( Scattering component fl:fl: tt t k k dttg),( - changes smoothly - can be sampled at a large interval - includes visibility H and intensity distribution I l - must be sampled at a short interval
Atmospheric Effects sub-planes for accurate sampling use of texture to store pre-integrated values High Quality Rendering - changes smoothly - can be sampled at a large interval - includes visibility H and intensity distribution I l - must be sampled at a short interval Illumination component fh:fh: tt t l k k dttHtI)(),( Scattering component fl:fl: tt t k k dttg),(
Atmospheric Effects Textures for Scattering Component tt t c ckl k k dt s ts Ftf 2 ))(exp( ),(),( (point light) tktk viewpoint point light s t P’ tt P : phase function )( , F cc : density : attenuation ratio : phase angle s : distance between light and P’ t : distance between viewpoint and P’ tktk : distance between viewpoint and P sampling plane k sampling plane k+1
Atmospheric Effects P’ P tt t c ckl k k dt s ts Ftf 2 ))(exp( ),(),( s point light (point light) sampling plane k sampling plane k+1 tktk viewpoint t tt - local coordinate UV P(u, v) Q P’(u’, v) U V k tuut ' su/'cos 222 'vus Textures for Scattering Component
Atmospheric Effects s point light P’(u’, v) sampling plane k sampling plane k+1 tktk viewpoint t tt P(u, v) ),,(),,( vuqcvuf kl )exp( kck tc ' ' ))''(exp( )),'/'((cos),,( du vu uuvu vuuFvuq c tu u c x k c : constant for each sampling plane vuq),,( : 2D texture f l is evaluated precisely since texture stores integrated values Q U V reducing quantization errors Textures for Scattering Component
Atmospheric Effects sub-planes for accurate sampling use of texture to store pre-integrated values High Quality Rendering - changes smoothly - can be sampled at a large interval - includes visibility H and intensity distribution I l - must be sampled at a short interval Illumination component fh:fh: tt t l k k dttHtI)(),( Scattering component fl:fl: tt t k k dttg),(
Atmospheric Effects light Computation of Illumination Component tt t lkh k k dttHtItf)(),(),( viewpoint sampling plane sub-plane - m k sub-planes between sampling planes k and k+1 - m k is determined adaptively strong intensity many sub-planes 1 0 )(),( 1 ),( k m j jjl k kh rHrI m tf r j : distance between viewpoint and sub-plane j
Atmospheric Effects light viewpoint sampling plane sub-plane Determining number of sub-planes, m k Determining number of sub-planes, m k 1. shoot a ray 2. compute intensity of scattered light 3. generate sub-planes in proportion to intensity use textures for scattering component Intensity of scattered light mkmk :user-specified threshold same contribution of each sub-plane to pixel intensity Computation of Illumination Component
Atmospheric Effects Overview Introduction Rendering Light Beams Rendering the Earth’s Atmosphere - motivation - previous work - basic Idea - problems - high quality rendering - rendering sky - rendering the earth viewed from space Results Conclusion
Atmospheric Effects Rendering Earth’s Atmosphere No shadows of objects Rendering Sky - extending method for light beams Rendering the earth viewed from space earth viewpoint atmosphere
Atmospheric Effects Rendering Earth’s Atmosphere No shadows of objects Rendering Sky - extending method for light beams Rendering the earth viewed from space atmosphere viewpoint earth - atmosphere is very thin layer covering the earth
Atmospheric Effects Rendering Earth’s Atmosphere No shadows of objects Rendering Sky - extending method for light beams Rendering the earth viewed from space atmosphere viewpoint earth sampling spheres - use of sampling spheres instead of sampling plane - atmosphere is very thin layer covering the earth
Atmospheric Effects Rendering Earth’s Atmosphere No shadows of objects Rendering Sky - extending method for light beams Rendering the earth viewed from space - atmosphere is very thin layer covering the earth - use of sampling spheres instead of sampling plane atmosphere viewpoint earth sampling spheres
Atmospheric Effects Intensity at viewpoint Intensity at viewpoint Rendering Sky T vlsunv dttgsgt FII 0 ),(),(),(),()()( sun I)( : intensity of sunlight l sg),( : attenuation ratio between P s and P v tg),( : attenuation ratio between P and P v F),( : phase function : density of particles t ),( s t P viewpoint earth PsPs atmosphere PvPv sun I
Atmospheric Effects Rendering Sky Intensity at viewpoint Intensity at viewpoint T vlsunv dttgsgt FII 0 ),(),(),(),()()( sun I)( : intensity of sunlight v tg),( : attenuation ratio between P s and P l sg),( : attenuation ratio between P and P v F),( : phase function : density of particles t ),( earth viewpoint atmosphere PvPv
Atmospheric Effects Rendering Sky Intensity at viewpoint Intensity at viewpoint earth viewpoint atmosphere PvPv n k k j jvlsunv tgsgtFII ),(),()(),()()( R P PsPs k k+1 sun I)( : intensity of sunlight l sg),( : attenuation ratio between P s and P F),( : phase function ),( kv tg : attenuation between sampling planes k and k+1 t)( R : cumulative density of particles between sampling planes k and k+1 sun I
Atmospheric Effects earth Rendering Sky Algorithm Algorithm create textures of g l, g v, R for k = n to 1, repeat: - map g l, g v, R textures onto sampling plane k Intensity at viewpoint Intensity at viewpoint n k k j jvlsunv tgsgtFII ),(),()(),()()( R viewpoint PvPv
Atmospheric Effects earth Rendering Sky Algorithm Algorithm create textures of g l, g v, R for k = n to 1, repeat: - map g l, g v, R textures onto sampling plane k Intensity at viewpoint Intensity at viewpoint n k k j jvlsunv tgsgtFII ),(),()(),()()( R - compute I sun F at lattice points viewpoint PvPv
Atmospheric Effects earth Rendering Sky Algorithm Algorithm create textures of g l, g v, R for k = n to 1, repeat: - map g l, g v, R textures onto sampling plane k - draw plane with blending: FB = FB x g v + F x R x g l ( FB : frame buffer) intensity of scattered light attenuation Intensity at viewpoint Intensity at viewpoint n k k j jvlsunv tgsgtFII ),(),()(),()()( R viewpoint PvPv - compute I sun F at lattice points
Atmospheric Effects earth Rendering Sky Algorithm Algorithm create textures of g l, g v, R for k = n to 1, repeat: - map g l, g v, R textures onto sampling plane k - draw plane with blending: FB = FB x g v + F x R x g l ( FB : frame buffer) intensity of scattered light attenuation Intensity at viewpoint Intensity at viewpoint n k k j jvlsunv tgsgtFII ),(),()(),()()( R viewpoint PvPv - compute I sun F at lattice points
Atmospheric Effects Rendering Sky Textures of Textures of g l, g v, R sun I P viewpoint earth PsPs s atmosphere : extinction coefficient (constant) : density of particles )exp()(ahh ( a : const) s PP dll 0 ))()(exp( sl PPg),( PvPv h
Atmospheric Effects Rendering Sky sun I P viewpoint earth PsPs atmosphere h ll s Textures of Textures of g l, g v, R PvPv : extinction coefficient (constant) : density of particles )exp()(ahh ( a : const) s PP dll 0 ))()(exp( sl PPg),( ),,(),( llsl hgPPg
Atmospheric Effects ),,(),( vvvv hgPPg ),,(),( vv hRPPR ),,(),( llsl hgPPg Rendering Sky sun I P viewpoint earth PsPs atmosphere h vv Textures of Textures of g l, g v, R store as 2D textures PvPv : extinction coefficient (constant) : density of particles )exp()(ahh ( a : const) s PP dll 0 ))()(exp( sl PPg),(
Atmospheric Effects Overview Introduction Rendering Light Beams Rendering the Earth’s Atmosphere - motivation - previous work - basic Idea - problems - high quality rendering - rendering sky - rendering the earth viewed from space Results Conclusion
Atmospheric Effects Experimental Results #planes: 40 mesh: 60x60 #planes: 160 mesh: 60x60 #planes: 30 #sub-planes: 120 (ave.) mesh: 10x10 previous method proposed method computer: Athlon 1.7GHz, GeForce3
Atmospheric Effects Experimental Results Image size: 300x450 computer: Athlon 1.7GHz, GeForce3 # of planes (sub- planes) time result method [sec.] previous ray-tracing 29 [sec.] - interleaved [Keller01] 0.12 [sec.] 160 mesh 60x9010x (174) 0.08 [sec.] proposed 10x15
Atmospheric Effects Experimental Results # of planes (sub- planes) time result method [sec.] previous ray-tracing 29 [sec.] - interleaved [Keller01] 0.12 [sec.] 160 Image size: 300x450 computer: Athlon 1.7GHz, GeForce3 mesh 60x9010x (174) 0.08 [sec.] proposed 10x15
Atmospheric Effects Results sampling plane: 9 sub-plane:309 sampling plane: 30 sub-plane:263 Image size: 720x480 computer: Athlon 1.7GHz, GeForce3 time: 0.32 [sec.] time: 0.12 [sec.]
Atmospheric Effects sampling plane: 100(sky) 30(shaft) sub-plane:135 time: 0.16 [sec.] Results Image size: 720x480 computer: Athlon 1.7GHz, GeForce3 sampling sphere: 10 time: 0.06 [sec.]
Atmospheric Effects DEMO Real-time Animation Using Note PC Pentium III (1.2 GHz) Nvidia GeForce 2 Go
Atmospheric Effects Conclusion Fast rendering of atmospheric effects - 2D textures to store intensities of scattered light - sub-planes for precise sampling of shadows - rendering of sky Rendering of light beams Extension to rendering earth’s atmosphere - rendering of earth viewed from space