45
Hokkaido University Efficient Rendering of Efficient Rendering of Lightning Taking into Lightning Taking into Account Scattering Effects Account Scattering Effects due to Clouds and due to Clouds and Atmospheric Particles Atmospheric Particles Tsuyoshi Yamamoto Tsuyoshi Yamamoto Tomoyuki Nishita Tomoyuki Nishita (The University of Tokyo) Yoshinori Dobashi Yoshinori Dobashi (Hokkaido University)

Tsuyoshi Yamamoto

Embed Size (px)

DESCRIPTION

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. - PowerPoint PPT Presentation

Citation preview

Page 1: Tsuyoshi Yamamoto

Hokkaido University

Efficient Rendering of Lightning Efficient Rendering of Lightning Taking into Account Scattering Taking into Account Scattering

Effects due to Clouds and Effects due to Clouds and Atmospheric ParticlesAtmospheric Particles

Tsuyoshi YamamotoTsuyoshi Yamamoto

Tomoyuki NishitaTomoyuki Nishita(The University of Tokyo)

Yoshinori DobashiYoshinori Dobashi

(Hokkaido University)

Page 2: Tsuyoshi Yamamoto

Hokkaido University

OverviewOverview

• Introduction• Introduction

• Effects of Atmospheric Scattering due to Lightning• Effects of Atmospheric Scattering due to Lightning

• Clouds Illuminated by Lightning• Clouds Illuminated by Lightning

• Results• Results

• Conclusions• Conclusions

Page 3: Tsuyoshi Yamamoto

Hokkaido University

IntroductionIntroduction• Photo-realistic Rendering of Natural Scenes• Photo-realistic Rendering of Natural Scenes

- visual assessments- flight simulators

- visual assessments- flight simulators

Previous methods:Clear/cloudy days

• Simulations under bad weather conditions• Simulations under bad weather conditions

- windstorm, sandstorm, rain, lightning- windstorm, sandstorm, rain, lightning

- Realistic rendering of scenes including

lightning

- Development of efficient rendering method

• Purposes• Purposes

Page 4: Tsuyoshi Yamamoto

Hokkaido University

Important ElementsImportant Elements

• Shape of lightning• Shape of lightning • Illuminating clouds• Illuminating clouds

• Atmospheric scattering• Atmospheric scattering• Illuminating ground• Illuminating ground

Page 5: Tsuyoshi Yamamoto

Hokkaido University

Previous MethodsPrevious Methods

• Methods related to lightning• Methods related to lightning

Modeling using particle systems [Reed94]

Probabilistic modeling [Kruszewski99]

DLA taking into account clouds [Sosorbaram01]

cloudsatmospheric

scatteringrendering

speed

-

-

-

-

- slow

fast

slow

Page 6: Tsuyoshi Yamamoto

Hokkaido University

Previous MethodsPrevious Methods

Modeling using particle systems [Reed94]

Probabilistic modeling [Kruszewski99]

DLA taking into account clouds [Sosorbaram01]

cloudsatmospheric

scatteringrendering

speed

-

-

-

-

- slow

fast

slow

• Methods related to lightning• Methods related to lightning

Page 7: Tsuyoshi Yamamoto

Hokkaido University

Previous MethodsPrevious Methods

Modeling using particle systems [Reed94]

Probabilistic modeling [Kruszewski99]

DLA taking into account clouds [Sosorbaram01]

cloudsatmospheric

scatteringrendering

speed

-

-

-

-

- slow

fast

slow

• Methods related to lightning• Methods related to lightning

Page 8: Tsuyoshi Yamamoto

Hokkaido University

Previous MethodsPrevious Methods

Modeling using particle systems [Reed94]

Probabilistic modeling [Kruszewski99]

DLA taking into account clouds [Sosorbaram01]

cloudsatmospheric

scatteringrendering

speed

-

-

-

-

- slow

fast

slow

• Methods related to lightning• Methods related to lightning

fast Our method

Page 9: Tsuyoshi Yamamoto

Hokkaido University

hardware rendering of smokes

shafts of light through trees and clouds[Max86]

[Dobashi00]hardware rendering of shafts of light through clouds

[Jansen98]photon map[Rushmeier87]extending radiosity method[Nishita87]shafts of light produced by spotlights

[Stam99, Stam01]

Previous MethodsPrevious Methods• Related to clouds and atmospheric scattering• Related to clouds and atmospheric scattering

None of these takes into account scattering effects due to lightning flash.

None of these takes into account scattering effects due to lightning flash.

Page 10: Tsuyoshi Yamamoto

Hokkaido University

• 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 MethodFeatures 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

Page 11: Tsuyoshi Yamamoto

Hokkaido University

• 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 MethodFeatures of Proposed Method

Page 12: Tsuyoshi Yamamoto

Hokkaido University

OverviewOverview

• Introduction• Introduction

• Effects of Atmospheric Scattering due to Lightning• Effects of Atmospheric Scattering due to Lightning

• Clouds Illuminated by Lightning• Clouds Illuminated by Lightning

• Results• Results

• Conclusions• Conclusions

Page 13: Tsuyoshi Yamamoto

Hokkaido University

Atmospheric ScatteringAtmospheric Scattering

viewpoint

clouds

lightning

point sources

• Placing point light sources

Page 14: Tsuyoshi Yamamoto

Hokkaido University

viewpoint V

P

• Consider a single source k

s

t

Ik

dtIs

tsFI k

aaa

keye )(

))(exp()(cos)(

20

)(

a: density

F : phase function: phase anglea: extinction coefficient

s : distance between source and P

t : distance between V and P

Ik : intensity of point source

: wavelength

Atmospheric ScatteringAtmospheric Scattering• Placing point light sources

Page 15: Tsuyoshi Yamamoto

Hokkaido University

viewpoint

P

s

t

Ik

dtIs

tsFI k

aaa

keye )(

))(exp()(cos)(

20

)(

• No analytical solutions

Atmospheric ScatteringAtmospheric Scattering

• Consider a single source k

• Placing point light sources

Page 16: Tsuyoshi Yamamoto

Hokkaido University

dtIs

tsFI k

aaa

keye )(

))(exp()(cos)(

20

)(

• No analytical solutions

Atmospheric ScatteringAtmospheric Scattering

• Consider a single source k

• Placing point light sources

viewpoint

Ik

Ieye(k)

• Ray tracing

• Computationally expensive• Computationally expensive

• Use of look-up table• Use of look-up table

Page 17: Tsuyoshi Yamamoto

Hokkaido University

Efficient Computation Using Look-up TableEfficient Computation Using Look-up Table

• Creating look-up table

• Intensity due to a single sourcedtI

s

tsFI k

aaa

keye )(

))(exp()(cos)(

20

)(

s

t

(ueye, veye)

P

(u, v)- local coordinate uv

),,()()( eyeeyelkk

eye vuIII

22eyevus || eyeuut

22/1cos eyevu

duvu

uuvu

vuFvuI

eye

eyeeyeaa

ueye

aeyeeyeleye

22

22

22

|))|(exp(

)1

(),,(

u

v

Page 18: Tsuyoshi Yamamoto

Hokkaido University

• function of (ueye, veye , )

• preparing table by changing values of (ueye, veye , )

• -T < (ueye, veye) < T  (T:specified by user)• : sampled at R, G, B

Efficient Computation Using Look-up TableEfficient Computation Using Look-up Table

s

t

(ueye, veye)

P

(u, v)

u

v

),,()()( eyeeyelkk

eye vuIII

Page 19: Tsuyoshi Yamamoto

Hokkaido University

Efficient Computation Using Look-up TableEfficient Computation Using Look-up Table

n

kkpkplkp lvuIII

1,, ),,()(

• Intensity of pixel

Can be computed efficientlyusing look-up table

• function of (ueye, veye , )

• preparing table by changing values of (ueye, veye , )

s

t

(ueye, veye)

P

(u, v)

u

v

),,()()( eyeeyelkk

eye vuIII

Page 20: Tsuyoshi Yamamoto

Hokkaido University

OverviewOverview

• Introduction• Introduction

• Effects of Atmospheric Scattering due to Lightning• Effects of Atmospheric Scattering due to Lightning

• Clouds Illuminated by Lightning• Clouds Illuminated by Lightning

• Results• Results

• Conclusions• Conclusions

Page 21: Tsuyoshi Yamamoto

Hokkaido University

- voxels

Intensity Calculation of CloudsIntensity Calculation of Clouds• Density distribution• Density distribution

- metaballs

[Dobashi00]metaballs

R

q

effectiveradius

center density

metaball

field function

Page 22: Tsuyoshi Yamamoto

Hokkaido University

pointsources

lightning

- voxels

Intensity Calculation of CloudsIntensity Calculation of Clouds• Density distribution• Density distribution

- metaballs

[Dobashi00]metaball

- use of LOD

- use of hardware

• Intensity Calculation• Intensity Calculation

- sum of intensity due to each point source

Page 23: Tsuyoshi Yamamoto

Hokkaido University

pointsources

lightning

- 3D voxels

Intensity Calculation of CloudsIntensity Calculation of Clouds• Density distribution• Density distribution

- metaballs

[Dobashi00]metaball

- use of LOD

- use of hardware

• Intensity Calculation• Intensity Calculation

- sum of intensity due to each point source

Page 24: Tsuyoshi Yamamoto

Hokkaido University

Computing Attenuation Using HardwareComputing Attenuation Using Hardware

• Attenuation to each metaball• Attenuation to each metaball- use of hardware-accelerated splatting [Dobashi00]

- limited to parallel sources- limited to parallel sources

- extending to point sources- extending to point sources

metaball

lightning

pointsource k

Page 25: Tsuyoshi Yamamoto

Hokkaido University

box as sixscreens

metaball- placing a box as 6 screens

Computing Attenuation Using HardwareComputing Attenuation Using Hardware

• Attenuation to each metaball• Attenuation to each metaball

pointsource k

Page 26: Tsuyoshi Yamamoto

Hokkaido University

box as sixscreens

metaball- placing a box as 6 screens

Computing Attenuation Using HardwareComputing Attenuation Using Hardware

• Attenuation to each metaball• Attenuation to each metaball

pointsource k

Page 27: Tsuyoshi Yamamoto

Hokkaido University

box as sixscreens

- place billboards at centers of metaballs

billboard(square polygon)

- project metaballs

- pixel value of the centers

attenuation ratio

• Problem• Problem

cost no. of metaballs∝cost no. of metaballs∝(realistic clouds : tens of thousands of metaballs)

Using LODUsing LOD ::grouping metaballs grouping metaballs hierarchicallyhierarchically

Using LODUsing LOD ::grouping metaballs grouping metaballs hierarchicallyhierarchically

- placing a box as 6 screens

Computing Attenuation Using HardwareComputing Attenuation Using Hardware

• Attenuation to each metaball• Attenuation to each metaball

pointsource k

Page 28: Tsuyoshi Yamamoto

Hokkaido University

Efficient Computation Using LODEfficient Computation Using LOD

metaballj

Ik

Ikj

r

• Light reaching metaball :• Light reaching metaball :

- inversely proportional to square of distance- inversely proportional to square of distance

pointsource k

22

))))((exp(exp())(())((

rr

rrIIII kk

kjkj

Page 29: Tsuyoshi Yamamoto

Hokkaido University

- attenuation due to cloud particles- attenuation due to cloud particles

metaball j

Ik

Ikj

r

pointsource k

Efficient Computation Using LODEfficient Computation Using LOD

• Light reaching metaball :• Light reaching metaball :

- inversely proportional to square of distance- inversely proportional to square of distance

22

))))((exp(exp())(())((

rr

rrIIII kk

kjkj

Page 30: Tsuyoshi Yamamoto

Hokkaido University

metaball

- intensity is small at distant regions, and almost uniform.- intensity is small at distant regions, and almost uniform.

Efficient Computation Using LODEfficient Computation Using LOD

• Light reaching metaball :• Light reaching metaball :

pointsource k

- attenuation due to cloud particles- attenuation due to cloud particles

- inversely proportional to square of distance- inversely proportional to square of distance

22

))))((exp(exp())(())((

rr

rrIIII kk

kjkj

Page 31: Tsuyoshi Yamamoto

Hokkaido University

metaball

• Approximation by larger metaballs• Approximation by larger metaballs• Selecting appropriate metaballs depending on distances• Selecting appropriate metaballs depending on distances

Efficient Computation Using LODEfficient Computation Using LOD

• Light reaching metaball :• Light reaching metaball :

pointsource k

- intensity is small at distant regions, and almost uniform.- intensity is small at distant regions, and almost uniform.

- attenuation due to cloud particles- attenuation due to cloud particles

- inversely proportional to square of distance- inversely proportional to square of distance

22

))))((exp(exp())(())((

rr

rrIIII kk

kjkj

Page 32: Tsuyoshi Yamamoto

Hokkaido University

• Representing metaballs using octree• Representing metaballs using octree

• Selecting appropriate levels depending on distances

• Selecting appropriate levels depending on distances

metaball

larger metaball• Grouping neighboring metaballs• Grouping neighboring metaballs

- density : average- radius : twice- density : average- radius : twice

Efficient Computation Using LODEfficient Computation Using LOD

Page 33: Tsuyoshi Yamamoto

Hokkaido University

• Selection of appropriate levels• Selection of appropriate levels- energy received by metaball j

- condition :

( : threshold)

metaball j

point source k Ik

Ikj

r

Ej = (light reaching metaball) x (volume)dVj

Efficient Computation Using LODEfficient Computation Using LOD

dVj2

))(exp()(

r

rIk

2

))(exp()(max

r

rIkdVj

requires integration of density of cloud particlesrequires integration of density of cloud particles

Page 34: Tsuyoshi Yamamoto

Hokkaido University

exp(-(r)) < 1.0( )

2

)(max

r

IkdVj

• Selection of appropriate levels• Selection of appropriate levels- energy received by metaball j metaball j

point source k Ik

Ikj

r

dVj

Efficient Computation Using LODEfficient Computation Using LOD

- condition :

energy when there are no particles between metaball and point source.energy when there are no particles between metaball and point source.

2

))(exp()(max

r

rIkdVj

Ej = (light reaching metaball) x (volume)

dVj2

))(exp()(

r

rIk

Page 35: Tsuyoshi Yamamoto

Hokkaido University

clouds

point source k

2

)}(max{

r

Ik

dVj- condition :- check metaballs of highest level

• Selection of appropriate levels• Selection of appropriate levels

Efficient Computation Using LODEfficient Computation Using LOD

Page 36: Tsuyoshi Yamamoto

Hokkaido University

- proceed to metaballs of lower levels

×

2

)}(max{

r

Ik

dVj- condition :- check metaballs of highest level

• Selection of appropriate levels• Selection of appropriate levels

Efficient Computation Using LODEfficient Computation Using LOD

clouds

point source k

Page 37: Tsuyoshi Yamamoto

Hokkaido University

×

- proceed to metaballs of lower levels

2

)}(max{

r

Ik

dVj- condition :- check metaballs of highest level

• Selection of appropriate levels• Selection of appropriate levels

Efficient Computation Using LODEfficient Computation Using LOD

clouds

point source k

Page 38: Tsuyoshi Yamamoto

Hokkaido University

Reducing number of metaballs to be processedReducing number of metaballs to be processed

- proceed to metaballs of lower levels

2

)}(max{

r

Ik

dVj- condition :- check metaballs of highest level

• Selection of appropriate levels• Selection of appropriate levels

Efficient Computation Using LODEfficient Computation Using LOD

clouds

point source k

selected metaballs

Page 39: Tsuyoshi Yamamoto

Hokkaido University

OverviewOverview• Introduction• Introduction

• Features of Our method• Features of Our method

• Effects of Atmospheric Scattering due to Lightning• Effects of Atmospheric Scattering due to Lightning

• Clouds Illuminated by Lightning• Clouds Illuminated by Lightning

• Results• Results

• Conclusions• Conclusions

Page 40: Tsuyoshi Yamamoto

Hokkaido University

ResultsResults

• Verification using simple example• Verification using simple example

density of atmospheric particles : 0.15density of atmospheric particles : 0.15

• Parameter settings:• Parameter settings:

attenuation ratio : 0.03attenuation ratio : 0.03

threshold : 0.2threshold : 0.2

no. of point sources : 50no. of point sources : 50

table size : 128x128table size : 128x128(T: 1.5 [km])(T: 1.5 [km])

no. of metaballs: 250,000no. of metaballs: 250,000

Page 41: Tsuyoshi Yamamoto

Hokkaido University

ResultsResults

50 times faster!50 times faster!

with LOD without LOD

• Computation time• Computation time- with LOD : 8 [s]

- without LOD : 400 [s]

computer : PentiumIII (733MHz), GeForce2GTSImage size: 720X480

Page 42: Tsuyoshi Yamamoto

Hokkaido University

ResultsResults

(a) lightning in clouds (b) multiple lightning

(c) colored lightning (pink) (d) lightning at sunset

Page 43: Tsuyoshi Yamamoto

Hokkaido University

Example Example AnimationAnimation (( VIDEO)VIDEO)

• On animating lightning:• On animating lightning:

• Simulation of lightning under different conditions• Simulation of lightning under different conditions

• Flight simulation• Flight simulation

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

Page 44: Tsuyoshi Yamamoto

Hokkaido University

ConclusionsConclusions

• Realistic image synthesis of scenes including lightning• 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

Page 45: Tsuyoshi Yamamoto

Hokkaido University

Future WorkFuture Work

• Further speeding up for real-time simulations• Further speeding up for real-time simulations

• Automatic determination of parameters• Automatic determination of parameters

• Automatic determination of lightning color• Automatic determination of lightning color