Particle Viewer

Posted by

In a similar vein to my mesh viewer tool, I've spent a bit of time writing a particle effect viewer. This tool is probably even more useful than the mesh viewer, because (as I've learned over the last few days) it can be quite tiresome tweaking a particle effect, reloading the game, cause the effect to "go off" and going back and tweaking it a bit more.

Explosion So the particle effect viewer (screenshots don't do particle effects justice, of course, so you can see a couple of videos if you click the thumbnail to the right) was a very useful tool. Basically, it just displays the effect and it has a "reset" button which, when you click it, will re-load the effect from disk. In this way, I could set up the initial effect file, play it in the viewer, adjust it and click "reset" without having to exit, tweak, reload every time.

For my first real particle effect, I did an explosion (what else?) and given than I'm a horrible artist, I borrowed the concept from the recent Make a Particle Explosion Effect article over on gamedev.net. I'll admit that I even "borrowed" the particle texture he had made for that article - I swear as soon as I find an artist, I'll replace that texture! - but I think the overall effect is pretty cool!

I've tried to make my particle system powerful, but that does tend to make editing effect files quite complicated. Basically, the files are XML and they simply describe a series of "emitters" that go together to make up the whole effect. For example, my explosion effect here has 6 separate emitters - one for the bright flash, one for the actual firey part, one for the radiating sparks, one for radiating smoke trails, one for the flying debris and one for the little circular sparks. For each emitter, you can set things like the texture, colour scheme, movement and so on, and it all comes together to create some pretty neat effects.

Currently, the vast majority of the processing for the particles is done on the CPU. Obviously that's probably not that great going forward (though I'm thinking if I at least do it on a separate thread, it might scale better than it does currently?) but I'll have to look into doing more of them on the GPU in the future. I think for the time being, it's pretty good, though.

blog comments powered by Disqus