interactive rendering of atmospheric scattering effects using graphics hardware
DESCRIPTION
Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware. Hokkaido University. Yoshinori Dobashi. Tsuyoshi Yamamoto. Hokkaido University. Tomoyuki Nishita. Tokyo University. Overview. Introduction. motivation previous work. Rendering Light Beams. basic Idea - PowerPoint PPT PresentationTRANSCRIPT
Atmospheric Effects
Interactive Rendering of Interactive Rendering of Atmospheric Scattering Effects Atmospheric Scattering Effects
Using Graphics HardwareUsing Graphics Hardware
Interactive Rendering of Interactive Rendering of Atmospheric Scattering Effects Atmospheric Scattering Effects
Using Graphics HardwareUsing Graphics Hardware
Tsuyoshi YamamotoTsuyoshi Yamamoto
Tomoyuki NishitaTomoyuki Nishita Tokyo UniversityTokyo University
Yoshinori DobashiYoshinori Dobashi Hokkaido UniversityHokkaido University
Hokkaido UniversityHokkaido University
Atmospheric Effects
OverviewOverview• 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
OverviewOverview• 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
OverviewOverview• 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 imagesReal-time rendering of realistic images
• Atmospheric Scattering Effects
MotivationMotivation
- spotlights- sunlight through windows- earth’s atmosphere
Real-time rendering of atmospheric effectsReal-time rendering of atmospheric effects Real-time rendering of atmospheric effectsReal-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 ofspotlight
edges ofshadows
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
OverviewOverview• 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
Ieye
viewpoint scattered light
T
ls dttgtHtII0
),()(),()(
Intensity at viewpointIntensity at viewpoint
Shading Model for Light Beams
Atmospheric Effects
Is
t
point light
viewpoint
P
Il
tH )( : visibility function
Shading Model for Light Beams
T
ls dttgtHtII0
),()(),()(
: intensity of lightl tI ),(
: attenuation functiontg ),(
Intensity at viewpointIntensity at viewpoint
Atmospheric Effects
Basic IdeaBasic IdeaIntensity at viewpointIntensity at viewpoint
[Dobashi00]
T
ls dttgtHtII0
),()(),()(
n
k 1l tI ),( tg ),( tH )(
screensampling planeviewpoint
point light
computed at lattices
Atmospheric Effects
n
k 1
Basic IdeaBasic Idea
l tI ),( tg ),(
Intensity at viewpointIntensity at viewpoint
T
ls dttgtHtII0
),()(),()( tH )(
light map
texture mapping
light map
viewpoint
point light
[Dobashi00]
Atmospheric Effects
n
k 1
Basic IdeaBasic Idea
l tI ),( tg ),(
Intensity at viewpointIntensity at viewpoint
T
ls dttgtHtII0
),()(),()( tH )(
viewpoint
point light
[Dobashi00]
object
shadowmapping
Atmospheric Effects
n
k 1
Basic IdeaBasic Idea
l tI ),( tg ),(
Intensity at viewpointIntensity at viewpoint
T
ls dttgtHtII0
),()(),()( tH )(
viewpoint
point light
render sampling planeswith additive blending
[Dobashi00]
object
shadowmapping
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
ProblemsProblems
• 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 errorspseudo-contours
Atmospheric Effects
High Quality RenderingHigh Quality Rendering
n
k 1s tI ),(
T
ls dttgtHtII0
),()(),()(
tt
tlks
k
k
dttgtHtItI ),()(),(),( Is
t
point light
P
Il
t
Intensity at viewpointIntensity at viewpoint
Atmospheric Effects
High Quality RenderingHigh Quality Rendering
n
k 1s tI ),(
T
ls dttgtHtII0
),()(),()(
tt
tlks
k
k
dttgtHtItI ),()(),(),( Is
t
point light
P
Il
t
Intensity at viewpointIntensity at viewpoint
changes severely changes smoothly
const. in t
Atmospheric Effects
High Quality RenderingHigh Quality Rendering
n
k 1s tI ),(
T
ls dttgtHtII0
),()(),()(
tt
tlks
k
k
dttgtHtItI ),()(),(),( Is
t
point light
P
Il
t
Intensity at viewpointIntensity at viewpoint
fh fl
tt
tl
k
k
dttHtI )(),( tt
t
k
k
dttg ),( x
Atmospheric Effects
High Quality RenderingHigh Quality Rendering
n
k 1s tI ),(
T
ls dttgtHtII0
),()(),()(
tt
tlks
k
k
dttgtHtItI ),()(),(),( Is
point light
Il
Intensity at viewpointIntensity at viewpoint
fh fl
tt
tl
k
k
dttHtI )(),( tt
t
k
k
dttg ),( x
= 1.0
scattered light
scattering component
Atmospheric Effects
High Quality RenderingHigh Quality Rendering
n
k 1s tI ),(
T
ls dttgtHtII0
),()(),()(
tt
tlks
k
k
dttgtHtItI ),()(),(),( Is
point light
Il
Intensity at viewpointIntensity at viewpoint
fh fl
tt
tl
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 RenderingHigh Quality Rendering
• Illumination component fh: tt
tl
k
k
dttHtI )(),(
• Scattering component fl: tt
t
k
k
dttg ),(
- changes smoothly- can be sampled at a large interval
- includes visibility H and intensity distribution Il
- must be sampled at a short interval
Atmospheric Effects
sub-planes for accurate sampling
use of texture to store pre-integrated values
High Quality RenderingHigh Quality Rendering
- changes smoothly- can be sampled at a large interval
- includes visibility H and intensity distribution Il
- must be sampled at a short interval
• Illumination component fh: tt
tl
k
k
dttHtI )(),(
• Scattering component fl: tt
t
k
k
dttg ),(
Atmospheric Effects
Textures for Scattering ComponentTextures for Scattering Component
tt
t
cckl
k
k
dts
tsFtf
2
))(exp(),(),(
(point light)
tk
viewpoint
point light
s
t
P’
tP
: phase function)(, F
c: density: attenuation ratio
: phase angle
s: distance between light and P’
t: distance between viewpoint and P’
tk: distance between viewpoint and P sampling
plane k
samplingplane k+1
Atmospheric Effects
P’P
tt
t
cckl
k
k
dts
tsFtf
2
))(exp(),(),(
s
point light
(point light)
samplingplane k
samplingplane k+1
tk
viewpoint
t
t
- local coordinate UV
P(u, v)
Q
P’(u’, v)
U
V
ktuut '
su /'cos 222 ' vus
Textures for Scattering ComponentTextures for Scattering Component
Atmospheric Effects
s
point light
P’(u’, v)
samplingplane k
samplingplane k+1
tk
viewpoint
t
tP(u, v)
),,(),,( vuqcvuf kl
)exp( kck tc
''
))''(exp(
)),'/'((cos),,(
22
22
221
duvu
uuvu
vuuFvuq
c
tu
uc
x
kc : constant for each sampling plane
vuq ),,( : 2D texture
fl is evaluated precisely since texture stores integrated values
fl is evaluated precisely since texture stores integrated values
Q
U
Vreducing quantization errorsreducing quantization errors
Textures for Scattering ComponentTextures for Scattering Component
Atmospheric Effects
sub-planes for accurate sampling
use of texture to store pre-integrated values
High Quality RenderingHigh Quality Rendering
- changes smoothly- can be sampled at a large interval
- includes visibility H and intensity distribution Il
- must be sampled at a short interval
• Illumination component fh: tt
tl
k
k
dttHtI )(),(
• Scattering component fl: tt
t
k
k
dttg ),(
Atmospheric Effects
light
Computation of Illumination ComponentComputation of Illumination Component
tt
tlkh
k
k
dttHtItf )(),(),(
viewpoint
sampling plane
sub-plane
- mk sub-planes between
sampling planes k and k+1
- mk is determined adaptively
strong intensity many sub-planes
1
0
)(),(1
),(km
jjjl
kkh rHrI
mtf
rj : distance between viewpoint and
sub-plane j
Atmospheric Effects
light
viewpoint
sampling plane
sub-plane
• Determining number of sub-planes, Determining number of sub-planes, mmkk
1. shoot a ray
2. compute intensity of scattered light
3. generate sub-planes in proportion to intensity
use textures forscattering component
Intensity of scattered light
mk
:user-specified threshold
same contribution same contribution of each sub-plane of each sub-plane to pixel intensityto pixel intensity
same contribution same contribution of each sub-plane of each sub-plane to pixel intensityto pixel intensity
Computation of Illumination ComponentComputation of Illumination Component
Atmospheric Effects
OverviewOverview• 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 AtmosphereRendering 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 AtmosphereRendering 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 AtmosphereRendering 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 AtmosphereRendering 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 viewpointIntensity at viewpoint
Rendering SkyRendering Sky
T
vlsunv dttgsgtFII0
),(),(),(),()()(
sunI )( : intensity of sunlight
l sg ),( : attenuation ratio between Ps and P
v tg ),( : attenuation ratio between P and Pv
F ),( : phase function
: density of particlest ),(
st
P viewpoint
earth
Ps
atmosphere
Pv
sunI
Atmospheric Effects
Rendering SkyRendering Sky• Intensity at viewpointIntensity at viewpoint
T
vlsunv dttgsgtFII0
),(),(),(),()()(
sunI )( : intensity of sunlight
v tg ),( : attenuation ratio between Ps and P
l sg ),( : attenuation ratio between P and Pv
F ),( : phase function
: density of particlest ),(
earth
viewpoint
atmosphere
Pv
Atmospheric Effects
Rendering SkyRendering Sky• Intensity at viewpointIntensity at viewpoint
earth
viewpoint
atmosphere
Pv
n
k
k
jjvlsunv tgsgtFII
1
1
1
),(),()(),()()( R
P
Ps
k
k+1sunI )( : intensity of sunlight
l sg ),( : attenuation ratio between Ps 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
sunI
Atmospheric Effects
earth
Rendering SkyRendering Sky
• AlgorithmAlgorithm• create textures of gl , gv , R• for k = n to 1, repeat:
- map gl , gv , R textures
onto sampling plane k
• Intensity at viewpointIntensity at viewpoint
n
k
k
jjvlsunv tgsgtFII
1
1
1
),(),()(),()()( R
viewpointPv
Atmospheric Effects
earth
Rendering SkyRendering Sky
• AlgorithmAlgorithm• create textures of gl , gv , R• for k = n to 1, repeat:
- map gl , gv , R textures
onto sampling plane k
• Intensity at viewpointIntensity at viewpoint
n
k
k
jjvlsunv tgsgtFII
1
1
1
),(),()(),()()( R
- compute IsunF at lattice points
viewpointPv
Atmospheric Effects
earth
Rendering SkyRendering Sky
• AlgorithmAlgorithm• create textures of gl , gv , R• for k = n to 1, repeat:
- map gl , gv , R textures
onto sampling plane k
- draw plane with blending:FB = FB x gv + F x R x gl (FB: frame buffer)
intensity of scattered lightattenuation
• Intensity at viewpointIntensity at viewpoint
n
k
k
jjvlsunv tgsgtFII
1
1
1
),(),()(),()()( R
viewpointPv
- compute IsunF at lattice points
Atmospheric Effects
earth
Rendering SkyRendering Sky
• AlgorithmAlgorithm• create textures of gl , gv , R• for k = n to 1, repeat:
- map gl , gv , R textures
onto sampling plane k
- draw plane with blending:FB = FB x gv + F x R x gl (FB: frame buffer)
intensity of scattered lightattenuation
• Intensity at viewpointIntensity at viewpoint
n
k
k
jjvlsunv tgsgtFII
1
1
1
),(),()(),()()( R
viewpointPv
- compute IsunF at lattice points
Atmospheric Effects
Rendering SkyRendering Sky• Textures of Textures of gl, gv , R
sunI
P viewpoint
earth
Ps
satmosphere: extinction coefficient (constant)
: density of particles)exp()( ahh (a: const)
sPPdll
0))()(exp( sl PPg ),(
Pv
h
Atmospheric Effects
Rendering SkyRendering Sky
sunI
P viewpoint
earth
Ps
atmosphere
h
l
s
• Textures of Textures of gl, gv , R
Pv
: extinction coefficient (constant): density of particles
)exp()( ahh (a: const)
sPPdll
0))()(exp( sl PPg ),(
),,(),( llsl hgPPg
Atmospheric Effects
),,(),( vvvv hgPPg
),,(),( vv hRPPR
),,(),( llsl hgPPg
Rendering SkyRendering Sky
sunI
P viewpoint
earth
Ps
atmosphere
h
v
• Textures of Textures of gl, gv , R
store as 2D texturesstore as 2D textures
Pv
: extinction coefficient (constant): density of particles
)exp()( ahh (a: const)
sPPdll
0))()(exp( sl PPg ),(
Atmospheric Effects
OverviewOverview• 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 ResultsExperimental Results
#planes: 40mesh: 60x60
#planes: 160mesh: 60x60
#planes: 30#sub-planes: 120 (ave.)
mesh: 10x10
previous method previous method proposed method
computer: Athlon 1.7GHz, GeForce3
Atmospheric Effects
Experimental ResultsExperimental Results
Image size: 300x450 computer: Athlon 1.7GHz, GeForce3
# of planes(sub-planes)
time
result
method
40
0.13 [sec.]
previous ray-tracing
29 [sec.]
-
interleaved[Keller01]
0.12 [sec.]
160
mesh 60x90 10x15 -
23 (174)
0.08 [sec.]
proposed
10x15
Atmospheric Effects
Experimental ResultsExperimental Results
# of planes(sub-planes)
time
result
method
40
0.13 [sec.]
previous ray-tracing
29 [sec.]
-
interleaved[Keller01]
0.12 [sec.]
160
Image size: 300x450 computer: Athlon 1.7GHz, GeForce3
mesh 60x90 10x15 -
23 (174)
0.08 [sec.]
proposed
10x15
Atmospheric Effects
ResultsResults
sampling plane: 9sub-plane:309
sampling plane: 30sub-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.]
ResultsResults
Image size: 720x480 computer: Athlon 1.7GHz, GeForce3
sampling sphere: 10
time: 0.06 [sec.]
Atmospheric Effects
DEMODEMO
• Real-time Animation Using Note PC• Pentium III (1.2 GHz)• Nvidia GeForce 2 Go
Atmospheric Effects
ConclusionConclusion
• 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