390 likes | 553 Views
A Simple, Efficient Method for Realistic Animation of Clouds. Yoshinori Dobashi ( Hiroshima City University ). Tsuyoshi Okita ( Hiroshima City University ). Kazufumi Kaneda ( Hiroshima University ). Tomoyuki Nishita ( University of Tokyo ). Hideo Yamashita ( Hiroshima University ).
E N D
A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi (Hiroshima City University) Tsuyoshi Okita (Hiroshima City University) Kazufumi Kaneda (Hiroshima University) Tomoyuki Nishita (University of Tokyo) Hideo Yamashita (Hiroshima University)
[1] D. Blythe, “Advanced … [2] Y. Dobashi, T. Nishita, … [1] Y. Dobashi, T. Nishita, … [2] Y. Dobashi, T. Nishita, … [1] D. Blythe, “Advanced … [2] Y. Dobashi, T. Nishita, … [3] Y. Dobashi, T. Nishita, … [4] Y. Dobashi, T. Nishita, … Incorrect Numbering of Reference Typo: Incorrect (Proceedings) Correct (CD-ROM)
examples: • clouds • fire • ocean waves Realistic animation of clouds • Goal: • movies/commercial films • flight simulators • computer games applications: Introduction • Simulation of natural phenomena using computer graphics
Introduction Important elements for realistic animation of clouds • complex motion • easy to implement • fast simulation of cloud motion • photorealistic images • fast image generation
Introduction Important elements for realistic rendering of clouds atmospheric effects (shafts of light) cloud color shadows
Our method Previous Work: Simulation of Cloud Motion Imple-ment speed motion Simulation methods Numerical simulation [Kajiya84] Textured ellipsoids [Gardener85] Diffusion process[Stam93,Stam95] Fractal [Ebert97] Qualitative simulation[Neyret97] Particle system [Kikuchi98] Stable fluids[Stam99]
Previous Work: Rendering of Clouds shafts of light shadows colors Rendering methods speed Ray-tracing method e.g. [Kajiya84] Scanline method [Ebert90] 2D texture mapping e.g. [Gardener85] 3D texture mapping [Stam99]
Our method Previous Work: Rendering of Clouds shafts of light shadows colors Rendering methods speed Ray-tracing method e.g. [Kajiya84] Scanline method [Ebert90] 2D texture mapping e.g. [Gardener85] 3D texture mapping [Stam99]
shadows on the ground • shafts of light through clouds Proposed Method • Simulation process • 3D cellular automaton • complex cloud motion • small amount of computation • Rendering process • hardware-accelerated • cloud color taken into account single scattering model
Three logical variables at each cell ti ti+1 time time ‘hum’: there is enough vapor. hum :humidity phase transition is ready to occur. act ‘act’: :activation cld :cloud ‘cld’: clouds exist or not. Simulation Process Basic idea • Voxels correspond to cells
ti ti+1 time time hum :humidity act :activation cld :cloud Simulation Process Basic idea • Status of variables: 0 or 1 by Boolean operations • Simple transition rules • cloud growth • cloud extinction • advection by wind
Disadvantages • cloud extinction never occurs • complex motion cannot be realized ti+1 ti time time :activation act hum cld :cloud phase transition effects cld propagation of activation variables (cloud growth) act z z y y x x act=0 hum=0 cld=0 act=1 hum=1 cld=1 hum :humidity Growth Simulation[Nagel’92] Cloud formation process: Water vapor becomes water droplets (clouds) due to phase transition.
humid active/humid cloud empty supply ‘hum’ & ‘act ‘ Formation and extinction occur repeatedly. Realizing Complex Motion act=0 hum=0 cld=0 State transition of a cell: act=1 hum=1 cld=1
1 humid area (spheres/elipsoids in 3D) 2 change ‘hum’ & ‘act’ from 0 to 1 Realizing Complex Motion
3 clouds are formed 4 change ‘cld’ from 1 to 0 Controlling red area Controlling cloud shapes & motion Realizing Complex Motion 1 humid area (spheres/elipsoids in 3D) 2 change ‘hum’ & ‘act’ from 0 to 1
hum act cld wind direction Advection by Wind • Clouds move in one direction, blown by wind. • Shifting all variables following the wind direction.
filtering continuous image volume rendering 1 Calculating density distribution 2 Rendering clouds 3 Rendering shafts of light through clouds Rendering Process Basic idea 0 or 1
q center density field function R effective radius metaball metaball ( cell width x 1.5 in our case) • radius: specified by user Calculation of Density Distribution Create continuous distribution using metaballs • center density: filtered value
scattered light Splatting method using billboard technique Rendering Clouds Color of clouds (single scattering only) sunlight clouds background color viewpoint
1 calculate intensity reaching each metaball 2 clouds viewed from the viewpoint billboard Rendering Clouds Preprocess compute billboard texture metaball virtual plane (billboard) Calculation steps 1 calculate intensity reaching each metaball 2 clouds viewed from the viewpoint
1 Divide billboard into mesh • cumulative density • attenuation ratio 2 Assume a ray passing through each mesh element 3 Compute cumulative density and attenuation ratio 4 Store the values as billboard texture Preprocess: Computing Billboard Texture 1 Divide billboard into mesh 2 Assume a ray passing through each mesh element 3 Compute cumulative density and attenuation ratio metaball 4 Store the values as billboard texture billboard
billboard 2 Sort metaballs 1 3 2 3 Place billboards 4 5 4 Initialize frame buffer Initialized to 1.0 Step 1: Light Reaching at Each Metaball sun 1 Set camera at the sun, parallel projection 1 Set camera at the sun, parallel projection 2 Sort metaballs 3 Place billboards 4 Initialize frame buffer metaball 5 Project billboards 5 Project billboards frame buffer
attenuation, sun metaball 1 • multiply attenuation read intensity • read pixel value multiply attenuation Step 1: Light Reaching at Each Metaball sun 5 Project billboards • multiply attenuation • read pixel value 1 3 6 Store shadow texture 2 4 5 projection
attenuation, sun ground Step 1: Light Reaching at Each Metaball sun 5 Project billboards • multiply attenuation • read pixel value 1 3 6 Store shadow texture 6 Store shadow texture 2 4 5
1 Render background render background 2 Sort metaballs 2 4 3 Rotate billboards 1 3 5 Step 2: Clouds Viewed from Viewpoint 1 Render background metaball 2 Sort metaballs viewpoint 3 Rotate billboards 4 Project billboards frame buffer
multiply attenuation • add color projection • multiply attenuation • add billboard color • attenuate background • add cloud colors Step 2: Clouds Viewed from Viewpoint 1 Render background metaball 2 Sort metaballs viewpoint 2 4 3 Rotate billboards 1 3 5 4 Project billboards
rendered image • multiply attenuation • add color Step 2: Clouds Viewed from Viewpoint 1 Render background 2 Sort metaballs viewpoint 2 4 3 Rotate billboards 1 3 5 4 Project billboards
b b : attenuation, atmosphere : attenuation, atmosphere ò Is = Ieye= I dt b g g : attenuation, clouds : attenuation, clouds ( t ) b g F ( a ) ( t' ) ( t' ) s F F : phase function : phase function I sun Is b, F are obtained analytically Rendering Shafts of Light Intensity at viewpoint sun S Isun clouds t' P t V a
b b : attenuation, atmosphere : attenuation, atmosphere ò Is = Ieye= I dt b g g : attenuation, clouds : attenuation, clouds ( t ) b g F ( a ) ( t' ) ( t' ) s F F : phase function : phase function I sun Is sample points b, F are obtained analytically ray-tracing Rendering Shafts of Light Intensity at viewpoint sun S Isun clouds t' P t V a time-consuming
ò I dt b ( t ) s b g ( t' ) ( t' ) F ( a ) I sun Rendering Shafts of Light Ieye= sun S Is = clouds 1.Place spherical shells 2.Compute Isunb(t’)F(a) b(t) V 3.Map shadow texture 4.Draw shells with additive blending
ò I dt b ( t ) s b g ( t' ) ( t' ) F ( a ) I sun vertices Rendering Shafts of Light Ieye= sun S Is = clouds 1.Place spherical shells spherical shells 2.Compute Isunb(t’)F(a) b(t) V 3.Map shadow texture 4.Draw shells with additive blending
ò I dt b ( t ) s b g ( t' ) ( t' ) F ( a ) I sun shadow texture Rendering Shafts of Light Ieye= sun S Is = clouds 1.Place spherical shells spherical shells 2.Compute Isunb(t’)F(a) b(t) V 3.Map shadow texture 4.Draw shells with additive blending
ò I dt b ( t ) s b g ( t' ) ( t' ) F ( a ) I sun shadow texture texture mapping Rendering Shafts of Light Ieye= sun S Is = clouds 1.Place spherical shells spherical shells 2.Compute Isunb(t’)F(a) b(t) V 3.Map shadow texture 4.Draw shells with additive blending
ò I dt b ( t ) s b g ( t' ) ( t' ) F ( a ) I sun shadow texture texture mapping Rendering Shafts of Light Ieye= sun S Is = clouds 1.Place spherical shells spherical shells 2.Compute Isunb(t’)F(a) b(t) V 3.Map shadow texture 4.Draw shells with additive blending
Examples simulation: 0.3 [sec] rendering: 10 [sec] image size: 640x480 voxel size: 256x256x10 (PentiumIII 733Mhz, NVIDIA GeForce256)
Examples shafts of light (daytime) shafts of light (evening) simulation: 0.5 [sec] rendering: 15 [sec] image size: 640x480 voxel size: 256x256x20 (PentiumIII 733Mhz, NVIDIA GeForce256)
Conclusion Simulation using 3D cellular automaton • complex motion • easy implementation • fast simulation by Boolean operations Realistic rendering of clouds • uses graphics hardware • two-pass method using billboards for colors and shadows • virtual spherical shells for shafts of light
Future Work Further acceleration for real-time animation • use of LOD techniques • hierachical representation of voxels Creating various kinds of clouds • taking into account effects under terrain • handling multiple wind direction, wind field