Post feature Report RSS KABOOM - how we make explosions in our games

In this article, we show you how we approach the creation of explosions and other particle effects for our games.

Posted by on

1   0tZPaob mp4 snapshot 00 06 3

GIF version: Imgur.com

When a Steam user left a review on the X-Morph: Defense Store Page saying that the game looked as if it was directed by Michael Bay, it dawned on us - there are lots of explosions in our games. We never gave that much thought, to be honest, but taking a look back it has always been true for all our projects. We love blowing things up, so we would like to tell you what goes into creating realistic-looking explosions (and other effects) for our games.

2   mlqYNqt mp4 snapshot 00 00 0

GIF version: Imgur.com

The explosions you see in our games are realized through the extensive use of the particle effects system. The particles are prepared by our artist in a specialized tool and then imported into the game. They consist of quadrilaterals (two-dimensional shapes, often referred to as ‘quads’) with a texture and set transparency. The artist can give each of the quads different properties, changing their overall appearance and how they behave in relation to other quads within the same effect, but it is the texture that is the base of it all. In much simpler terms - we set flat images in motion, make them see-through and add some eye candy.

3   pUsI8tT

The explosions you see in our games are realized through the extensive use of the particle effects system. The particles are prepared by our artist in a specialized tool and then imported into the game. They consist of quadrilaterals (two-dimensional shapes, often referred to as ‘quads’) with a texture and set transparency. The artist can give each of the quads different properties, changing their overall appearance and how they behave in relation to other quads within the same effect, but it is the texture that is the base of it all. In much simpler terms - we set flat images in motion, make them see-through and add some eye candy.

4   eYpBVr3 mp4 snapshot 00 00 0

GIF version: Imgur.com

Every effect consists of sub effects. They are lower-level structures that allow you to group quads together and apply some properties to them - more on those properties later, but in general - you can individually move the sub effects and make them behave in a certain way. Of course, it is extremely important to position the sub effects right. You don’t want a large cloud of black smoke to cover up all the fire, sparks and debris from the remaining ones. In general, you need to start creating an effect with a clear end goal in mind. Reference videos and images are very useful at this point.

5   PUFJHw1 mp4 snapshot 00 08 1

GIF version: Imgur.com

Another important piece of the puzzle is the emitter. Every sub effect contains one. It can be seen as the ‘starting point’ of the particle. It controls the spatial properties of the effect. The quads are spawned from the emitter, and the artist specifies all their properties. The particles can be rendered at any given angle, or they can be set to always face the camera. They can be moved in any direction and at any speed, giving the creator complete control over the end result. That’s already a lot of steps, and we’re not done yet.

6   ivVJQ4c mp4 snapshot 00 02 1

GIF version: Imgur.com

What you can add on top of the quads rendered by the emitter are the so-called affectors. An affector is a function that can change the quad you’ve already rendered, for example by changing its transparency or color over time. Take a cloud of smoke as an example. The affector will change it in a couple of ways over its lifetime. First, it will be quite small and opaque, growing larger over time and becoming more transparent, just like smoke in real life. Thanks to the affectors we can control when and how quickly it happens and which direction should the quad move.

7   QX6EGIk mp4 snapshot 00 02 0

GIF version: Imgur.com

Now that you know how we prepare particle effects in our games, let’s move on to some practical applications of those. Single explosions, bullets, blood splats or wood splinters flying around look fun, but our possibilities do not end there. We very often combine multiple effects into sequences. Thanks to this technique it is possible to achieve massive, spectacular cascades of fire, sparks, and debris that look as if they were taken from a Hollywood action film. It’s quite an interesting process, which requires some creativity and destructive imagination, so let’s take a look!

Most objects that you see in our games can be either damaged or completely destroyed during regular gameplay. Some of those objects are small and relatively insignificant - a tree, for example. It can either stand perfectly healthy or be destroyed. Entities with the health point system are a little different. Apart from the “100% OK” state (max health) and the “dead” state (0 health) we also have a ‘damaged” state - anywhere between 1% and 99% health (approximately, of course ;)). The bigger an entity is, the more HP it is likely to have - and if it has a lot of HP, we might give it destruction levels.

8   vmVTyd0 mp4 snapshot 00 03 0

GIF version: Imgur.com

Destruction levels are damage thresholds that we use to trigger certain effects. For example, the Headquarters in The Riftbreaker look different when they are at 100%, 75% or 10% health, with more smoke and fire breaking out as the building becomes damaged. This system is not exclusive to buildings and applies to creatures as well - they get wounded and bloody as the damage increases. The purpose of the destruction level system is to give players feedback. We want you to know that your attacks are hurting the creature you’re hunting. We want you to know that the creatures hunting you can hurt you too.

There are usually several destruction levels for a destructible entity. When the health drops below a threshold specified by one of the destruction levels, a group of effects is triggered. Physical parts are spawned, each with individual properties, such as weight, dimensions, buoyancy, friction upon hitting the ground - you name it. The parts are given the texture of the object they were spawned from in order to maintain consistency. What is also important - the parts do not just appear out of nowhere - they are pushed out by a force at the center of the object that randomly changes the direction and power (maintaining a vector aiming away from the object). This way you can’t predict what the debris will do once it starts flying.

9   e7cKpLv mp4 snapshot 00 08 0

GIF version: Imgur.com

When the destruction level is reached, the material on the object changes as well. Cracks, impact holes and other damage starts to show. To reach the level of visual polish we aim for it’s necessary to add particle effects. They are attached to specific points on the model and we try to set them up as realistically as possible. If there is a structural vulnerability, a pipe, or some exposed wires - we set it on fire. Each model requires manual setup when it comes to attaching effects.

10   W9W44wq mp4 snapshot 00 11

GIF version: Imgur.com

An important aspect of this feature is that we can control when a particle effect starts its ‘playback’. This allows us to prepare sequences of explosions. For example, when the Headquarters in The Riftbreaker reaches 0 HP, a sequence of multiple explosions will start. They happen all over the place, varying in intensity, culminating in the complete destruction of the building in a big bang.

We hope you enjoyed our little articles. If you did, join us on Discord: www.discord.gg/exorstudios

Other social media:

Store.steampowered.com
www.facebook.com/exorstudios
www.twitter.com/exorstudios
www.mixer.com/exor_studios
www.twitch.tv/exorstudios
www.youtube.com/exorstudios

Comments
OrangeNero
OrangeNero

Perfect as I have a video about your games planned in the following days.

You're really remarkable, not just the explosions, the destruction as well. I created a bunch of posts on Steam about it like me just flying around the map blowing these buildings up and letting them collapse into each other and playing with the gravity.

Physics!

You are more next gen than Destiny.

The art of your explosion craft reminds me quite a bit of Gunship_Mark_II

Reply Good karma Bad karma+3 votes
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Feature
Related Games
The Riftbreaker
The Riftbreaker Real Time Strategy
X-Morph: Defense
X-Morph: Defense Tower Defense
Zombie Driver
Zombie Driver Car Combat
Related Engines
Ogre Engine
Ogre Engine MIT
Schmetterling
Schmetterling Proprietary
Related Groups
Exor Studios
Exor Studios Developer & Publisher