Tsuyoshi Yamamoto

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)

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

Transcript of Tsuyoshi Yamamoto

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