[TML] cloud making math

Tom Naro tomnaro at yahoo.com
Tue Jul 1 15:47:47 MDT 2008


From: Knapp magick.crow at gmail.com

>Evyn MacDude <infojunky at ceecom.net> wrote:
>> On Jun 28, 2008, at 12:35 AM, Knapp wrote:
>>> I am making a planet with clouds. The Earth seems to have 3 
>>>bands of wind starting at the equator and going towards the 
>>>poles (the counting not the wind).
>>
>> It's more like five, look up Hadley cells. Which will give the
>> general pressure cells with the Earth's atmosphere. But this is only
>> the base set of mechanics. Surface temp plays a big roll in wind flow
>> also. For this look are the area covered by the Monsoon.
>How are you counting those 5? I only counted one half the globe.
>The thing is that I don't need a weather sim. I just need something that
>will make clouds that look about right on a planet.

Here is a good pic of the weather (Hadley) cells.
http://en.wikipedia.org/wiki/Image:Earth_Global_Circulation.jpg

OK enough theory.  Here is a way to make your clouds look good....
 
You should look at using a "perlin noise" function.  (Several layers of noise are combined to result in a semi random arrangement of values.)  That will give you clouds that are thick in the center and softer on the edges.
 
Here is an article on generating clouds http://freespace.virgin.net/hugo.elias/models/m_clouds.htm
Here is some code: http://www.sepcot.com/blog/2006/08/PDN-PerlinNoise2d
 
Wrapping a perlin noise bitmap around a weather cell should give you a fairly realistic sky. You will probably get better results if you overlap the cells a bit.  (A little post blending wound help too.)
 
You still might want to drop in a few stencils (like swirling hurricanes) into the mix.
 
For the best animation results you should use many layers of clouds all rotating around the planet at (very) slightly different speeds. A little (very tiny) random wobble in each layer wouldn't hurt either.  Layers closer to the surface should be the most opaque (but don't go overboard) and darker. The top layer should be mostly transparent with just a few wispy clouds.
 
(if you do the layering correctly the additive effect should cast shadows on the ground which will make your clouds appear better from above.)  The last time I did this process, we a lot of layers, but you can still get good results using as little as three layers.


      


More information about the TML mailing list