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.
Entry Filed under: flash