Controlling Particles with Perlin Noise

May 3rd, 2008 9:34 am
by Nicholas Hillier | Posted in Tech

I’m working on this really kick-ass Particle System visualizer that uses Perlin Noise to control movement. It’s almost exactly what Robert Hodgin does in processing, and I’m finding it a great exploration into the sorts of performance and effects possible in a stressed out flash player.


These experiments have been accomplished in one form or another by loads of other ActionScript developers, but the concepts behind the idea are rad and I am looking for my own Frosty path through the woods. Also, the organic undulating effects achieved through Perlin Noise are completely mesmerizing, and in this industry I can only achieve the same relaxing effect by staring into a tropical fish tank.

Anyway, you can play with the first iteration of the application above. It’s really raw, and I haven’t built in any visual controls yet, but there are some keyboard commands and an output panel to display results. Make sure the application has focus by clicking on it, only then will you be able to use your keyboard to mess around.

You can toggle the perlin bitmap display using “0″ ( Zero ), and change bitmapChannels using 1,2,3,4,5,6,7.

Eight other values can be altered, shown in the list below:
First click the corresponding letter of the value you want to alter, and then use the arrow keys. Up and Right increases values (Boolean = True), Down and Left Decreases them (Boolean=false).

Value Data Type Key Stroke
Octaves uint “o”
Noise Velocity Number “v”
BaseX Number “x”
BaseY Number “y”
Random Seed int “r”
Stitch Boolean “s”
Fractal Noise Boolean “f”
Greyscale Boolean “g”

What I am doing? I’m testing the bitmapData in corresponding particle locations using the getPixel(x,y) method, and then plugging this result into a trumped up Trig expression that outputs magnitude. I’m going to keep pushing this project further, and when I’m finally satisfied with the results, I’ll release the source code.

Tags: , , , , ,

5 Responses to “Controlling Particles with Perlin Noise”

  1. myron Says:

    this is amazing.

  2. Amy Says:

    This is pretty awesome.

  3. andre Says:

    Shazaaam!

  4. Dayton Says:

    Very sweet Nic, it worked out really well. And runs super fast too, lets make it react to sound now and we will have a kick ass visualizer.

  5. Nicholas Hillier Says:

    Yeah… ActionsScript 3 is sweet for this sort of thing. I also took Joa Ebert’s advice from one of his talks at the FITC this year, and made sure all of my particles were casted. There are 1500 particles running through for-loops, and the casting made a real difference.

Leave a Reply