Tuesday 17 March 2009

Particle Playground



Well this is the release of my latest little saunter into the world of particles and shaders in flash 10. It started off as and idea to use the new pixel bender shaders of flash 10 as a more efficient method of updating particle simulations.

Well after a few struggling evenings I managed to get a little prototype going. I was so amazed at some of the beautiful patterns and effects that the particles were making I thought it may be nice rather than just releasing a tech demo, to add abit more to it and release it for others to enjoy.

I will be releasing the source code in the coming weeks along with a blog post which should explain in detail how the technical aspects of updating and rendering tens of thousands of particles per frame works.

The tool features a gallery tab which you can use to take screenshots then upload them to my picassa account (proxyed via php). The hope is to get some realy beautiful images in here, perhaps if some are good enough ill get them printed and framed ;)

I hope to come back to this project regularly to add new features so stay tuned. For now some of the images I have made with this so far:

7 comments:

  1. wow. flash is getting pretty speedy, ain't it?
    nice work!

    ReplyDelete
  2. [...] have mad a few small changes to Particle Playground [...]

    ReplyDelete
  3. the game doesnt work it says:"game jacket" and never loads and i downloaded flash 10

    ReplyDelete
  4. Do you have a version of the particle engine without shaders or filters running at 40k at 25fps? I have been toying with a particle engine of my own and have it up to 20k at 30fps. Was going to start looking into shaders as well for the next speed bump. But beyond 20k I'm not sure what else could be done and am curious what you did to pull off the same feat. Thanks!

    ReplyDelete
  5. Hi Gabriel,

    No i dont have a version without shaders. Looking at it from a technical perspective the shaders only offer speed improvements when applied to multiple cores due to the highly parallel nature of pixel shaders. If you are running it on one core you probably wont see much if any improvements.

    For an extension of my work I was planning on doing something like this: http://www.unitzeroone.com/blog/2009/03/18/flash-10-massive-amounts-of-3d-particles-with-alchemy-source-included/ .

    Using the new op-codes introduced in flash 10 to optomize the speed of the system running within a byte array. I infact started some work on this using haXe as it has access to the op-codes rather than going to all the hasstle of coding in C++.

    As usual however I never got round to finishing my work, tho I hope to pick it up again soon!

    Cheers,
    Mike

    ReplyDelete
  6. Just wanted to post back on this. I managed to incorporate some of the ideas Ralph (unitzeroone) put together. My engine now supports up to 150k particles. It's crazy what pure AS3 alone can do!

    http://blog.coursevector.com/orion-2-0-preview

    I'll be posting my source code and such soon.

    ReplyDelete
  7. [...] Was doing some more playing around on Harmony this evening, so relaxing. It kinda reminds me of some of the stuff I did on Particle Playground. [...]

    ReplyDelete