interactive rendering of atmospheric scattering effects using graphics hardware

52
Atmospheric Effects Interactive Rendering of Interactive Rendering of Atmospheric Scattering Atmospheric Scattering Effects Using Graphics Effects Using Graphics Hardware Hardware Tsuyoshi Yamamoto Tsuyoshi Yamamoto Tomoyuki Nishita Tomoyuki Nishita Tokyo University Tokyo University Yoshinori Dobashi Yoshinori Dobashi Hokkaido University Hokkaido University Hokkaido University Hokkaido University

Upload: jescie-stein

Post on 31-Dec-2015

48 views

Category:

Documents


1 download

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 Presentation

TRANSCRIPT

Page 1: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 2: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 3: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 4: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 5: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 6: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 7: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 8: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 9: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 10: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

Atmospheric Effects

point source

Ieye

viewpoint scattered light

T

ls dttgtHtII0

),()(),()(

Intensity at viewpointIntensity at viewpoint

Shading Model for Light Beams

Page 11: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 12: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 13: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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]

Page 14: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 15: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 16: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 17: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 18: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 19: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 20: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 21: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 22: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 23: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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 ),(

Page 24: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 25: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 26: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 27: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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 ),(

Page 28: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 29: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 30: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 31: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 32: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 33: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 34: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 35: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 36: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 37: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 38: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 39: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 40: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 41: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 42: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 43: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 44: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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 ),(

Page 45: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 46: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 47: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 48: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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

Page 49: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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.]

Page 50: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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.]

Page 51: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

Atmospheric Effects

DEMODEMO

• Real-time Animation Using Note PC• Pentium III (1.2 GHz)• Nvidia GeForce 2 Go

Page 52: Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware

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