Particle Engines Revisited

Hold on there! This blog article is taken from my previous website and quite old. It may be not as interesting or relevant as it used to be, a lot of information may be deprecated.

While researching the new and exciting Cinder C++ Library some time ago I also came across the excellent starting guide 'Hello Cinder' by Robert Hodgin. It starts with a quick note on how to dive in, how to load images and how to draw shapes. After that, the fun begins, Robert explains how build a simple Particle Engine (and this is still in chapter 1). Chapters 2 trough 5 build on this particle engine and show how to use this technique in different ways. There's nothing new about this technique, but the way Robert guides you gives you great insight in how they could be used. This made me want to revisit the topic again, and try some stuff out.

Note: the guide is of course about using a particle engine within a Cinder app (C++), but it's easy to use the methods and principles in any programming language.

After reading the whole guide I started to experiment and coding in OpenFrameworks, creating a simple Particle and ParticleController class. No interaction, or other interesting stuff was added in this stage, so it's not really worth posting pictures/code.

The second program contained some more attributes, like the lifetime of each particle. Also some basic 'spawn' interaction was added. Although it's still very basic, it already looking pretty cool :)

As always you may download the win32 executable or the source code.

The third program has no interaction, but acts as a template for something I could use more often. The ParticleController acts as a Emitter, and has several attributes that define it's appearance. You can control the emitting direction and it's radius, as well as the emitting speed and min/max size of the particles.


You may also download this programs executable or source code.

Next I'll be checking into the use of textures, but that's for another post!