a simple, efficient method for realistic animation of clouds yoshinori dobashi * kazufumi kaneda **...

27
A Simple, Efficient A Simple, Efficient Method for Realistic Method for Realistic Animation of Clouds Animation of Clouds Yoshinori Dobashi Yoshinori Dobashi * Kazufumi Kaneda Kazufumi Kaneda ** ** Hideo Hideo Yamashita Yamashita ** ** Tsuyoshi Okita Tsuyoshi Okita * * Tomoyuki Nishita Tomoyuki Nishita *** *** * Hiroshima City University Hiroshima City University ** ** Hiroshima University Hiroshima University *** *** University of Tokyo University of Tokyo

Post on 22-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

A Simple, Efficient Method for A Simple, Efficient Method for Realistic Animation of CloudsRealistic Animation of Clouds

Yoshinori DobashiYoshinori Dobashi** Kazufumi Kaneda Kazufumi Kaneda** ** Hideo YamashitaHideo Yamashita****

Tsuyoshi OkitaTsuyoshi Okita* * Tomoyuki NishitaTomoyuki Nishita******

**Hiroshima City University Hiroshima City University ****Hiroshima University Hiroshima University ******University of TokyoUniversity of Tokyo

Page 2: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

ContentsContents

Introduction and MotivationIntroduction and Motivation

SimulationSimulation

RenderingRendering

ResultsResults

ConclusionConclusion

Page 3: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

IntroductionIntroduction

Page 4: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

Problem OverviewProblem Overview

Realistic modeling and animation of Realistic modeling and animation of (cumulus-type) clouds(cumulus-type) clouds

Two sub-problems:Two sub-problems: Simulation of cloud formation, extinction Simulation of cloud formation, extinction

and advection by windand advection by wind Rendering of the clouds, shadows and Rendering of the clouds, shadows and

shafts of lightshafts of light

Page 5: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

Previous Work - SimulationPrevious Work - Simulation

Two categories of simulation methods:Two categories of simulation methods:

1.1. Physical process of fluid dynamicsPhysical process of fluid dynamics Very accurateVery accurate Computationally expensiveComputationally expensive

2.2. Heuristic approachHeuristic approach (procedural modeling) (procedural modeling) Computationally inexpensiveComputationally inexpensive Easier to implementEasier to implement Parameters neededParameters needed

Page 6: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

Previous Work - RenderingPrevious Work - Rendering

Accounting for multiple scattering of lightAccounting for multiple scattering of light Computationally expensiveComputationally expensive

Using 3-D textures for volume densityUsing 3-D textures for volume density Does not handle atmospheric effects such as Does not handle atmospheric effects such as

shafts of lightshafts of light

Rendering shafts of light using ray-tracing or Rendering shafts of light using ray-tracing or a similar methoda similar method Computationally expensiveComputationally expensive

Page 7: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

GoalsGoals

Simple and efficient simulation methodSimple and efficient simulation method

Support of effects such as ...Support of effects such as ... Cloud color by single scattering of lightCloud color by single scattering of light Shadows of clouds cast on the groundShadows of clouds cast on the ground Shafts of light through cloudsShafts of light through clouds

Hardware-accelerated renderingHardware-accelerated rendering

Visually convincing resultVisually convincing result

Page 8: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

Simulation – Basic IdeaSimulation – Basic Idea

Cellular automaton with binary statesCellular automaton with binary states

Page 9: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

Nagel‘s MethodNagel‘s Method

Water vapor turns to water to form cloudsWater vapor turns to water to form clouds

Use Nagel‘s method to simulate cloud Use Nagel‘s method to simulate cloud formation:formation: Divide 3-D space evenly into 3-D cellsDivide 3-D space evenly into 3-D cells Assign boolean variables to each cell:Assign boolean variables to each cell:

cldcld indicates whether cell contain clouds indicates whether cell contain clouds humhum indicates whether cell has enough water vapor to indicates whether cell has enough water vapor to

form cloudsform clouds actact indicates whether phase transition is ready to occur indicates whether phase transition is ready to occur

Page 10: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

Nagel‘s Method Nagel‘s Method (cont‘d)(cont‘d)

Cell properties in the current animation frame tCell properties in the current animation frame t ii

are used to compute the cell properties in the are used to compute the cell properties in the next frame tnext frame ti+1i+1::

hum(x, y, z, thum(x, y, z, ti+1i+1) = hum(x, y, z, t) = hum(x, y, z, tii) ) act(x, y, z, tact(x, y, z, tii))

cld(x, y, z, tcld(x, y, z, ti+1i+1) = cld(x, y, z, t) = cld(x, y, z, tii) ) act(x, y, z, tact(x, y, z, tii))

act(x, y, z, tact(x, y, z, ti+1i+1) = ) = act(x, y, z, tact(x, y, z, tii) ) hum(x, y, z, thum(x, y, z, tii) ) actact(x, y, z , t(x, y, z , tii))

actact is a boolean function and its value is calculated by the status is a boolean function and its value is calculated by the status

of of actact in the surrounding cells. in the surrounding cells.

Page 11: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

Cloud ExtinctionCloud Extinction

Extension to Nagel‘s method:Extension to Nagel‘s method:

cld(x, y, z, tcld(x, y, z, ti+1i+1) = cld(x, y, z, t) = cld(x, y, z, tii) ) IS(rnd > pIS(rnd > pextext(x, y, z, t(x, y, z, tii))))

hum(x, y, z, thum(x, y, z, ti+1i+1) = hum(x, y, z, t) = hum(x, y, z, tii) ) IS(rnd < pIS(rnd < phumhum(x, y, z, t(x, y, z, tii))))

act(x, y, z, tact(x, y, z, ti+1i+1) = act(x, y, z, t) = act(x, y, z, tii) ) IS(rnd < pIS(rnd < pactact(x, y, z, t(x, y, z, tii))))

rnd : rnd : uniform random numberuniform random number ppextext : : probability of cloud extinctionprobability of cloud extinction pphumhum : : probability of vapor formingprobability of vapor forming ppactact : : probability of phase transition occurenceprobability of phase transition occurence

Page 12: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

Advection by WindAdvection by Wind

Clouds move, blown by windsClouds move, blown by winds

Wind velocity is different depending on the Wind velocity is different depending on the height from the groundheight from the ground

cld(x, y, z, tcld(x, y, z, ti+1i+1) = cld(x – v(z), y, z, t) = cld(x – v(z), y, z, tii))

hum(x, y, z, thum(x, y, z, ti+1i+1) = hum(x – v(z), y, z, t) = hum(x – v(z), y, z, tii) )

act(x, y, z, tact(x, y, z, ti+1i+1) = act(x – v(z), y, z, t) = act(x – v(z), y, z, tii))

v(z) : v(z) : wind velocity, piecewise linear functionwind velocity, piecewise linear function Assumption: wind blows towards the direction of x-axisAssumption: wind blows towards the direction of x-axis

Page 13: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

Controlling Cloud MotionControlling Cloud Motion

Ellipsoids simulate air parcelsEllipsoids simulate air parcels

Vapor and phase transition probability:Vapor and phase transition probability: higher at center / lower at edgehigher at center / lower at edge

Cloud extinction probability:Cloud extinction probability: Lower at center / higher at edgeLower at center / higher at edge

Ellipsoids move in direction of windEllipsoids move in direction of wind

Different kinds of clouds by controlling Different kinds of clouds by controlling ellipsoid parameters (sizes and position)ellipsoid parameters (sizes and position)

Page 14: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

Fast Simulation using BitfieldsFast Simulation using Bitfields

Each cell state (cld, act, hum) can be Each cell state (cld, act, hum) can be stored in a single bitstored in a single bit

Low memory requirementsLow memory requirements

Fast computation of simulation processFast computation of simulation process

Problem: Random numbersProblem: Random numbers

Solution: Precalculated look-up tablesSolution: Precalculated look-up tables

Page 15: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

Rendering – Basic IdeaRendering – Basic Idea

Smoothing and volume renderingSmoothing and volume rendering Splatting method for cloudsSplatting method for clouds Spherical shells for shafts of lightSpherical shells for shafts of light

Page 16: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

Continuous Density Continuous Density Distribution CalculationDistribution Calculation

Simulation output is a binary distributionSimulation output is a binary distribution

Continuous density distribution results from Continuous density distribution results from smoothing the binary distributionsmoothing the binary distribution

Cloud density of a cell is the weighted average Cloud density of a cell is the weighted average of the surrounding cellsof the surrounding cells

Each cell contributes a density distribution over Each cell contributes a density distribution over an effective radius (an effective radius (Metaballs)Metaballs)

Cloud density of an arbitrary point is therefore a Cloud density of an arbitrary point is therefore a weighted sum of a simple basis functionweighted sum of a simple basis function

Page 17: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

Metaball BillboardsMetaball Billboards

Generate 2-D texture of metaballsGenerate 2-D texture of metaballs

Page 18: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

Rendering - Step 1Rendering - Step 1

Set up parallel projection with sun at Set up parallel projection with sun at viewpoint and initialize framebuffer to 1.0viewpoint and initialize framebuffer to 1.0

Place billboards at centers of metaballs with Place billboards at centers of metaballs with their normals toward the suntheir normals toward the sun

Starting with billboard closest to the sun, Starting with billboard closest to the sun, project and blend billboards to framebufferproject and blend billboards to framebuffer

Read back value at projected billboard center Read back value at projected billboard center to get attenuation ratio between sun and to get attenuation ratio between sun and metaball metaball

Page 19: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

Rendering – Step 1 Rendering – Step 1 (cont‘d)(cont‘d)

After all metaballs have been projected, After all metaballs have been projected, framebuffer contains shadow textureframebuffer contains shadow texture

Page 20: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

Rendering – Step 2Rendering – Step 2

Render all world objects except cloudsRender all world objects except clouds

Place billboards at centers of metaballs Place billboards at centers of metaballs with their normals toward the observerwith their normals toward the observer

Project and blend billboards to Project and blend billboards to framebuffer starting with those farthest framebuffer starting with those farthest from viewpointfrom viewpoint

Page 21: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

Rendering – Step 2 Rendering – Step 2 (cont‘d)(cont‘d)

Page 22: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

Shafts of Light Shafts of Light

Render using spherical shells (made of Render using spherical shells (made of polygons)polygons)

Modify Rendering – Step 2 to:Modify Rendering – Step 2 to: Calculate colors of vertices of shell Calculate colors of vertices of shell

polygons (atmospheric conditions)polygons (atmospheric conditions) Repeat for all shells (back-to-front):Repeat for all shells (back-to-front):

Render shell k with additive blending function Render shell k with additive blending function and shadow texture mappingand shadow texture mapping

Render billboards between shell k-1 and shell kRender billboards between shell k-1 and shell k

Page 23: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

Shafts of Light Shafts of Light (cont‘d)(cont‘d)

Page 24: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

ResultsResults

Page 25: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

Results Results (cont‘d)(cont‘d)

Page 26: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

ConclusionConclusion

Advantages:Advantages: Simulation requires little computationSimulation requires little computation Memory requirements are smallMemory requirements are small Rendering is fast by making use of graphics Rendering is fast by making use of graphics

hardwarehardware Shadows of clouds and shafts of light can also be Shadows of clouds and shafts of light can also be

renderedrendered

Possible improvements:Possible improvements: Effects of terrain under cloudsEffects of terrain under clouds Level of detailLevel of detail

Page 27: A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi * Kazufumi Kaneda ** Hideo Yamashita ** Tsuyoshi Okita * Tomoyuki Nishita

The EndThe End

Questions?Questions?