Atmospheric Scattering

advertisement
Real-Time Rendering of Planets
with Atmospheres
Tobias Schafhitzel, Martin Falk, Thomas Ertl
Universität Stuttgart, Germany
Motivation
Tobias Schafhitzel – Real-Time Rendering of Planets with Atmospheres
2
Outline






Introduction
Atmospheric scattering
Computation of the scattering texture
Rendering
Results
Conclusion and future work
Tobias Schafhitzel – Real-Time Rendering of Planets with Atmospheres
3
Outline






Introduction
Atmospheric scattering
Computation of the scattering texture
Rendering
Results
Conclusion and future work
Tobias Schafhitzel – Real-Time Rendering of Planets with Atmospheres
4
Introduction
 Rendering a planet’s atmosphere
 Physically based computation
 color shifts, light attenuation
 Sunset, sunrise, midday
 Combination with terrain rendering
 Real-time approach
 Games
 CAD
 Explorative tools (i.e. Google Earth,…)
Tobias Schafhitzel – Real-Time Rendering of Planets with Atmospheres
5
Previous Work
 Atmospheric Scattering
 Atmospheric Scattering Effects of the Earth [Nishita et al. 93]
 Real-Time Atmospheric Scattering [O’Neil 04]
 Interactive Rendering of atmospheric Scattering Effects using
Graphics Hardware [Dobashi et al. 02]
 Accurate Atmospheric Scattering [O’Neil 05]
 Terrain Rendering
 Real-Time continuous Level of Detail Rendering of Height Field
[Lindstrom et al. 96]
 Real-Time Generation of continuous Level of Detail for Height Fields
[Röttger et al. 98]
Tobias Schafhitzel – Real-Time Rendering of Planets with Atmospheres
6
Outline






Introduction
Atmospheric scattering
Computation of the scattering texture
Rendering
Results
Conclusion and future work
Tobias Schafhitzel – Real-Time Rendering of Planets with Atmospheres
7
Atmospheric Scattering
Pv
Pc
Pa
atmosphere
φ
Pb
earth
 Light scattering equation:
Iv ( )  I s ( )
KFr ( )

4
Pb
   exp( t ( PPc ,  )  t ( PPa ,  )) ds
Pa
Tobias Schafhitzel – Real-Time Rendering of Planets with Atmospheres
8
Outline






Introduction
Atmospheric scattering
Computation of the scattering texture
Rendering
Results
Conclusion and future work
Tobias Schafhitzel – Real-Time Rendering of Planets with Atmospheres
9
Computation of the scattering texture
 Parametrization of the 3D scattering texture:
φ
Pv
θ
h
 Arbitrary height h = |Pv|
 For each h Arbitrary view angle θ
 For each θ an arbitrary angle to the sun φ
Tobias Schafhitzel – Real-Time Rendering of Planets with Atmospheres
10
Intersection Tests
 Camera inside the atmosphere
→ use 1st intersection
 Camera outside
→ no scattering
→ move camera to outer boundary
→ constant height for parameterization
→ use 2nd intersection
 Two textures for intersections with
PV
PV
 Inner sphere
 Outer sphere
 Easy to switch when rendering
Tobias Schafhitzel – Real-Time Rendering of Planets with Atmospheres
11
Outline






Introduction
Atmospheric scattering
Computation of the scattering texture
Rendering
Results
Conclusion and future work
Tobias Schafhitzel – Real-Time Rendering of Planets with Atmospheres
12
Rendering the sky
Pc
Pg
φ
Pv
θ
Rv
 Sky: tessellated sphere
 View ray Rv
 connect vertex Pg with camera Pv
 Compute h, θ and φ and map to [0,1]
 φ is constant (directional light)
 Fetch the scattering texture (simple lookup)
Tobias Schafhitzel – Real-Time Rendering of Planets with Atmospheres
13
Rendering the terrain
 More complex
 Consider structure of the terrain
 Naive computation fails
 Distance too long
 Terrain color not considered
 Solution
PV
Pg
 Compute scattering along PvPb
 Subtract contribution along PgPb
Pb
 Two texture lookups:
P
Pb

KFr ( )  b

Iv( )  I s ( )

exp(

t

t
)


exp(

t

t
)
l
v
l
v
P

4  Pv
g


Tobias Schafhitzel – Real-Time Rendering of Planets with Atmospheres
14
Rendering the terrain II
 Considering the terrain color
 Illumination of the terrain
 Incident light is attenuated:
Ig ( )  I s ( )
KFr ( )

4
Pc
 exp( t ( Pg Pc ,  )) ds
 Reflected light is attenuated
I gv ()  I g cos( ) exp(t ( Pg Pv ,  ))ds
Ig
PV
Igv
Pg
 Overall light contribution:
I ()  I gv ()  Iv ()
*
v
Tobias Schafhitzel – Real-Time Rendering of Planets with Atmospheres
15
Outline






Introduction
Atmospheric scattering
Computation of the scattering texture
Rendering
Results
Conclusion and future work
Tobias Schafhitzel – Real-Time Rendering of Planets with Atmospheres
16
Results
 Earth dataset (2572 x 24 x 12)
 Mars dataset (652 x 24 x 12)
Earth
Mars
Outside
67.26
83.51
Inside
30.31
56.02
Terrain outside
76.44
102.37
Terrain inside
35.83
61.19
All measurements in fps
Tobias Schafhitzel – Real-Time Rendering of Planets with Atmospheres
17
Europe at morning
Tobias Schafhitzel – Real-Time Rendering of Planets with Atmospheres
18
Alps at morning
Tobias Schafhitzel – Real-Time Rendering of Planets with Atmospheres
19
Alps at midday
Tobias Schafhitzel – Real-Time Rendering of Planets with Atmospheres
20
Sunrise
Tobias Schafhitzel – Real-Time Rendering of Planets with Atmospheres
21
Questions ?
Download