Simulation of  Cloud Formation
Pingfei Chen

1. Introduction

Modeling clouds is very difficult because of their complex, amorphous structure [1]. A Model based on laws of fluid mechanisms is impractical because solving the Navier-Stokes equation in 3D is very costly [6]. The surface-based cloud models can be used to simulate the overall shape of clouds but it couldn't describe 3D structure. Therefore,  a volumetric model must be used [1]. However,  a volumetric denisity-based technique for clouds is impractical because it is extremely difficult for an animator to specify the detailed 3D density of a cloud model.  Dr. Ebert has proposed a new powerful cloud model called volumetric procedural modeling, which combines traditional volumetric procedural models with implicit functions [1]. It takes the advantages of both these techniques . The model proposed by Dr. Ebert describes the cloud as two level structures: its macrostructure and its microstructure, which are modeled by implicit function and turbulence, respectively.
    In this project, a modified particle system is used to generate ``band''  clouds, which are altocumulus.  The basic idea is to allow only part of particle to move. The dynamic and static features of this approach make it possible to control inserting, merging and splitting waves, but there are some artifacts in the final image.  Another type of a cloud simulated is a cloud which I call ``puffy'' cloud because of its appearance. To simulate the blocks of  ``puffy'' cloud, a group of sub particles are used to describe a block and  its attributes  are controlled  in order to get realistic images. However, the results have some artifacts.
     The other more important part of the project is to simulate the formation of cumulus. A particle system is used to simulate high level structure of a cloud. Then, the powerful rendering program ``avoid''  provided by Dr. Ebert is used to produce the final images.

2.  Background

 The earlier geometric models, such as polygonal models, patches, points and lines, which work well in some situations, can not deal with the complexities of natural objects such as highly detailed mountains and clouds [7]. Therefore, higher level modeling techniques have been developed to provide an abstraction of the models. Most of these advanced modeling approaches use code segments or algorithms to abstract  the details of model in order to avoid explicitly storing vast numbers of low-level primitives. These advanced modeling approaches provide great flexibility and data amplification.   Another important feature of these approaches is to allow us to go beyond the law of physics and to generate more realistic images. There are several types of procedural advanced geometric modeling techniques, including fractals, grammar-based models, volumetric procedural models, implicit surfaces and particle systems [7]. Fractals, grammar-based models, and implicit surfaces are surface-based modeling techniques. Volumetric procedural models and particle systems are volumetric modeling techniques.
        In order to model a cloud, semi-transparent surfaces were used to produce convincing images of clouds in many previous approaches. Gardner[10] proposed textured ellipsoids covered with a procedural noise opacity which fades on the horizon of the shape. However,  the generated cloud is inaccessible. To capture the three-dimensional structure of the cloud, volumetric density-based models must be used [1]. Kajiya produced the first volumetric cloud model in computer graphics, but the results were not realistic. Stam, Fosterm and Ebert have produced convincing models of smoke and steam. Neyret has recently proposed a way to model connective cloud based on general physical characteristics. However, Neyret didn't use volumetric modeling [6].
        Dr. Ebert [1] has proposed a powerful, flexible approach called volumetric procedural modeling, which combines traditional volumetric procedural models with implicit functions to create a model that has the advantages of both these techniques. Implicit surface [7] is surface of constant value, created from blending primitives represented by implicit equation. Implicit functions have been used for many years as a modeling tool for creating solid objects and smoothly blended surfaces. However, modeling complex shapes is still a difficult task for volumetric shapes. Volumetric density-based models have been used effectively to capture the three-dimensional structure of clouds, but it is extremely difficult to specify and control the detailed three-dimensional density of a cloud model. Dr. Ebert has combined these two techniques to get a new  model which has two main components: the cloud macrostructure and the cloud  microstructure. These two main components are modeled by implicit functions and turbulent volume densities.  A particle system is suggested  to be used for volumetric procedural implicit particles.

3. Simulations of Clouds

3.1 The general knowledge of clouds

The cloud is comprised of visible ice crystals and/or water droplets suspended in air [4]. Clouds can be big or little, thick or thin, existing in a seemingly endless array of shapes and sizes. The clouds can be classified as high cloud mid level clouds, low-level clouds, connective clouds, and other types of clouds [4].

3.2   ``Band'' Cloud

To simulate the band clouds, several approaches can be used. The straightforward way is to use sine function. By using sine function, the initial shape of a cloud is formed, then turbulence is added at original positions. However, there are some drawbacks in this approach . First, the number of waves is fixed. But, when you take a close look at the picture, you will note that  the number of waves is actually variable. Second, it is difficult to insert a new wave between consecutive waves because of  turbulence. Third, it is hard to merge two consecutive waves.
    In this project, a modified particle system approach is proposed to solve the above mentioned problems.  A particle system is a collection of primitives which has the following typical attributes: position, velocity, color, lifetime and transparency. In this  approach, only part of particles, which I call "fresh" particles, are allowed to move  instead of all  particles. Three rules for the movement of a particle are defined in this approach.
    The first one is that, suppose a particle P moves from position p1 to p2, then the particle leaves a copy of P at the position p1 and the copy lost its ability for further movement. Here, assume that a small turbulence is allowed. The particle at position p2 which is "fresh" can move at the next time and its lifetime decreases by 1. The next time, suppose the particle at position p2 moves from p2 to p3. By using the same way that used for the movement from P1 to P2, one more copy leaves at the position p2 and it can not move anymore and the particle at position p3 becomes "fresh" and its lifetime decreases by 1.
    The second one is that a  particle may be split into several particles first, then these particles move to different positions, where "fresh" particles are born, and only one copy is left at the original position.
    The third one is that two or more "fresh" particles may merge into a  new particle according to the relative distances among them.
    Based on the above three rules, a "band" cloud can be simulated like this:  start with several particles, which have the same  coordinate x  (y and z can be arbitrarily). In order to compute the vertical distance easily,  the same speed are assigned in X coordinate for these particles so that, at the next time, the particles can arrive at the same plane. Thus,  it is easy to add a new wave or merge two waves according to the vertical distance. The experiments in this project demonstrate the feasibility of this  approach for solving insertion and merging but the final image produced by this approach has some artifacts.

3.3   ``Puffy'' Cloud

A "puffy'' cloud can be described as following:
    a "puffy" cloud consists of a lot of thick blocks which are separated by a lot of holes. These blocks have very complex shapes and different sizes. Also they are connected as a whole.
    To simulate the holes, a lattice is used to make some of locations empty and a parameter, which represents the ratio( blocks / holes ), is also used to control this ratio. Particles can be  used to describe the blocks. If  a  block is  represented just by one particle, it may fail to describe block's complexity. A group of particles are needed to describe a block. The reason is that the complexity of a block's shape might be described  by a few of sub particles instead of one particle. In the project, several  attributes such as number of sub particles,  relative location to the original position for each sub particle, and  size, are used for each block.

3.4    Simulation of Cumulus

Qualitative simulations of convective cloud formation and evolution have been made by Neyret. These simulations are based on some specific structures such as Rayleigh-Taylor instability, bubbles, columns, turrets, Lelvin-Helmholtz instability, vortices, and Benard cells. This macroscopic approach may not be physically-accurate, but it reduces the cloud complexity. The model he proposed includes bubble generation, cloud evolution, and small scale shape. We simulated the cloud macrostructure based on Neyret's model and a particle system.
     The formation of clouds can be described as the following:  a bubble is generated on the ground, then it rises due to the force generated by the gradient temperature difference. As it rises, it grows and may merge with other bubbles. At some altitude, it cools off and can be separated into small visible particles. Then it keeps going until it can't move. A bubble can be described by a particle, which has several attributes such as position, radius, velocity, and lifetime. By generating new particles and moving particles according to their speed, a high level structure of a cloud can be obtained. The control of their speeds is very important to the shape of a cloud. My simulation program is based on the above formation process. It produces data files for "avoid" program to generate images. The procedure of this program is listed as the following:

 produce some initial small bubbles with  lifetimes, radius, position, and speed
For each frame
For each bubble
update each primitive particle according to its speed increase its radius if its lifetime is greater than zero
reduce its up speed a little bit due to friction
decrease its lifetime maybe produce new child bubble and initialize the new bubble's attribute
end for each bubble

write out all the bubbles for this frame.

End for
The particle's attributes are updated  according to the following assumptions:

4. Results

Figure 1 is a generated  image for a "band" cloud.  In this experiment, the number of initial particles is 8 and total number of particle finally goes to about 600. You can see the new waves are added naturally, the two waves are merged naturally, and the waves are split ted to more waves, but there are some artifacts.
       Figure 2 is a generated image for a ``puffy'' cloud. In this experiments, the number of particles is about 4 or 5. The sizes of sub particles range from 0.2 to 0.5. The result isn't good.
       Some selected images from my last animation can be seen from Figure 3 to Figure 8. The cloud formation is shown
in these images.

5. Conclusion

In this project,  a``band'' cloud  is  generated  using a  modified particle system approach, which  makes it possible to control  inserting, merging and splitting waves. However, there are some artifacts in the final image.
     By using a particle system and ``avoid'' program,    it is possible to get  natural clouds.
     The experiments in this  project demonstrate that the volumetric procedural modeling is powerful to model very complex clouds .

6. Acknowledgments

 The author would like to thank David Ebert  for offering constructive suggestions and evaluations.


[1] David Ebert, ``A Volumetric Procedural Cloud Model'' Spring 1998

[2] David Ebert, F.kenton Musgrave, Darwyn Peachey, Ken Perlin, and Steve Worley. `` Texturing and Modeling : A Procedural Approach,'' Academic Press, Oct. 1994.

[3] David S. Ebert. Advanced modeling techniques for computer graphics. In CRC Handbook of Computer Science and Engineering, chapter 56. CRC,1997


[5] "Particle Systems - A Technique for Modeling a class of Fuzzy Objects,'' SIGGRAPH', 1983, pp. 359-376. SIGGRAPH', 1983, pp. 359-376.

[6] Fabrice Neyret, ``Qualitative Simulation of Connective Cloud Formation and Evolution'' In Eighteen International Workshop on Computer Animation and Simulation. Eurographics, Sept., 1997.

[7] David S. Ebert. Advanced modeling techniques for computer graphics. In CRC Handbook of Computer Science and Engineering, chapter 56. CRC,1997

[8] A. Watt and M. Watt, ``Advanced Animation and Rendering Techniques,'' Addison-Wesley, 1992.


Figure   1

Figure 2

Figure  3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8