BIT-101 [2003-2017]

Ghost on the Lake: AS3, Particles, Attractors, Pretty


Well, this is the artsiest thing I’ve done in quite a while. I was playing around with AS3, decided to do a particle system. Got that working quickly so I started adding things to it. Plugged in a strange attractor algorithm, started coloring it, adding bitmap filters, etc. Started to look good and was just crying out for some musical accompaniment. Hopefully Moby won’t sue me.


screenshot

Ghost on the Lake

Some cool things to note:

1. Althought it may sometimes appear to sync to the music, there is no relation. The shape is evolved using a single algorithm, varying a single property over time (plus 3D rotation). I just set the initial params and let it run. I did do some tweaking to find a good starting point, which param to change, and how much to change it, so that you get some decent shapes for the majority of the song, but once it starts, it's on its own.

2. That's 10,000 particles being rendered there! On very frame I plot them all out using the new parameters in the attractor algorithm, rotate them all on two axes, determine a color for each one, and then render it to a buffer bitmap, draw it to the main bitmap and the reflection and apply some filters. 10,000. Every frame. Yeah, it cooks your cpu, but it runs pretty decent even on my older mac mini. God I love AS3.

3. The whole thing (minus the music which streams) comes in at under 3k! Again, God I love AS3.

« Previous Post
Next Post »