Animated Perlin Clouds in Papervision3D

The last Perlin noise experiments were fun but what’s the point of having 3D Perlin noise unless you render it in 3D?

So I thought I’d map the realtime generated perlin bitmaps onto 3D planes in PaperVision. And here it is :

[kml_flashembed movie=”/wp-content/uploads/manual/2007/perlinlayers02.swf” width=”440″ height=”385″ FVERSION=”9″ QUALITY=”medium” /]

In this example there are 8 planes, and I’m swapping the textures for each plane from the back to the front. Oh and I’m re-rendering the furthest bitmap with the new z texture. Hmm bit hard to explain that one…

Previous posts :
3D Perlin noise in Flash
Animated Plasma in Flash

19 replies on “Animated Perlin Clouds in Papervision3D”

You have the basis for a cool flying game there – the current motion reminds me of space harrier of yor

Hey C4L05, nice to see you here 🙂 And glad you like it. I’m thinking now about how to map this noise onto a skybox… watch this space 🙂

frank : Love the turbulences! I’m sure we can find a smarter way of softening the edges, after all the whole point of Perlin noise is to avoid the use of expensive smoothing algorithms. (one of the points anyway 🙂 )

Jon : Yeah would def be cool, if only it didn’t take up all the processor time… hmmm

thanks again for you wonderful example and your tips…

thanks for the tip of small z difference of .01 for the Perlin blobs…it worked I’ve been able to make it to step1 (“3D Perlin noise in Flash”) but unfortunately not step2 (“Animated Perlin Clouds in Papervision3D”).

How much are the planes themselves separated in the z-axis?

Are you using BitmapMaterial textures with corresponding BitmapData’s transparency option set to true? Does initial fill colour matter?

What is the best way to update the material on a plane since the plane object has no “replaceMaterial” method?

Any other tips or suggestions?



Hey Eric, glad it’s working out for you so far! 🙂

The planes are 5000 units wide and 400 units apart along the z axis.

I’m creating transparent bitmaps and it doesn’t matter about the initial fill colour, although it’s good practice to fill it with transparent. 0x00000000.

The trick is in the number that I get back from the Perlin function. I’m then converting it to a 32 bit colour with various bitshifting maths! And then setPixel32 on the relevant pixel.

I’m storing the materials for each plane in an array and accessing (and switching) the materials’ bitmap via the texture property. This is in the phunky build of PV3D.

hope this helps!


Thanks so much Seb! got it!!

also tried it with polar coordinates for a twist.

any ideas yet on the best way to soften the edges? is Frank’s suggestion of a blur filter too “expensive”? I tried using a bitmap effect layer with a blur filter but it didn’t seem to work… any wonder why?

Hey Evan,

Yeah I think a blur filter would be a bit of a costly move… my approach would be to make a mask which is a bit smaller than the rectangle, and feather the edges. Then when you draw the perlin noise into the bitmap, you could mask it so that it fades to transparent around the edges.

hope this helps, and please show us your work!


Hey Seb, all the static methods in the Perlin class tend to slow down the execution speed and the code gets rather hard to use in multiple instances. Did you modify Ron Valster’s Perlin class or use it as-is? Cheers // EP

Hey Eric-Paul!

Just using the static methods as-is. I don’t usually have a problem with static methods in terms of performance?




I’m not a flash developer but I found your site while searching informations about perlin noise and displacement map. From what I understand, with this method, it would be possible to do an underwater effect without using any pre rendered picture or video (ie : or ?

Hi Seb ! , Is there a way to get a sample code ? I am trying to reproduce the similar effect but can not get how the sequence works .
Thanks in advance

Hi Michael,

sorry not currently. (Although this may change when I finally get around to organising all my sources). All the information is here on the blog and in the previous post about 3D perlin noise.


Hello all,

Anyone have sources pr could point me towards good Perlin 3D resources? It would be HIGHLY appreciated.

Brad Sedito

Comments are closed.