Creating a 3D explosion effect with cubes


  • Fuze Team

    Been trying to get the hang of making a 3D explosion effect. This will hopefully be used in a 3D pixel art style shooter I am working on. Forgive the very uniform angles, things should be a little more randomised for a better effect I think!



  • Not a bad start. You might wanna look into how particle systems work if you haven't already, since that's basically what you're making here.
    Indeed a better effect would come from randomising the direction, and velocity of the cubes.
    Also starting with all the cubes at a single point, rather than spread out in a grid will probably look more like an 'explosion', unless you're trying to imitate the look of something smashing through a brick wall, in which case it's pretty good. (just imagine a wrecking ball smashing into your cubes from behind and that's kinda what this looks like.)

    Basically a particle system consists of a bunch of 'particles' which you can draw as more or less anything you like. Their defining characteristic is they have a position and a velocity, and a lifetime (so you can hide them when not needed - typically particles are defined as a static array of a fixed number of particles which you re-use for all manner of effects, since this is more efficient than creating entirely now particles all the time - as long as the object that is treated as a particle isn't too different.)
    More advanced particle systems can change the colour of the particle over time, or even change animation frames (consider the spark from a firework turning to smoke later)

    You then have several other things in a particle system. An emitter, which creates particles according to certain rules, and possibly a bunch of colliders, which are optional, but used for effects such as a particle hitting a wall.

    The emitter is what defines the kind of effect you get, along with a few things like whether your particles obey gravity or some other force (and how strong this force is)

    For most explosion effects, the emitter is a point, and it creates a whole bunch of particles all in one go.
    It then assigns them a direction and speed.
    If you fire them all at a fairly regular speed in a sphere, you get an effect similar to fireworks or a shockwave.
    If you do the same thing but with all the particles confined to a 2d plane you get a 2d shockwave effect.
    If you use a sphere but vary the speeds quite a lot, you get a very chaotic explosion...
    And you can create shaped explosions and other effects through tweaking the directions that the particles go.
    Or... As your video demonstrates, you can create quite different looking effects by starting from something other than a point source.

    You have a great start to it though. Looking impressive, and I'm sure with more attempts you'll end up pretty good at it. XD


  • Fuze Team

    Maybe a misnomer on my part then - I'm certainly going for more of a "wrecking ball" effect as you put it!

    I'll do some homework on particle systems! Thank you for all the awesome pointers.


Log in to reply