Clouds – Perlin Noise

March 6th, 2007

I saw a post in Sitepoint’s flash forum looking for a ‘clouds circulating a planet look’. I’d pondered this problem in creating shiny ‘pearls’ for a navigational device for this site – how to create a good illusion of shinyness – In this case I did it by simulating a ‘reflection map’ (the environment around the viewer reflected off the object). I accomplished this by using the Flash 8 BitmapData class Perlin Noise method which creates noise based patterns, then mapped it to a spherical surface using the displacementMapFilter. A couple of extra lines of code using threshold to eliminate some of the darker ‘clouds’ and I think we have created a useful imitation of orbiting clouds. for the swf below (Click the sphere to swap to the different method).

If you use perlin noise to fill a larger area and are generating it per frame, it’s an idea to copy as much imagery as needed to a bitmap with the stitch parameter set to true (so it can loop easily), this will free up some cpu, particularly if you’re using a lot of octaves in the noise generation.

download fla

Entry Filed under: flash

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed

Calendar

December 2017
M T W T F S S
« Feb    
 123
45678910
11121314151617
18192021222324
25262728293031

Categories

Most Recent Posts

Feeds