Realistic Explosions

From Red Faction Wiki

NOTE: This tutorial was originally posted on redtechnologies, which is no longer available.

Introduction

This tutorial will teach you how to create realistic explosions in RED, the map editor for Red Faction. By following this tutorial you will be able to make geo-mod explosion events with a spray of dust and dirt to make it seem more realistic. Please keep in mind that this tutorial is mearly a guide and most values shown can be changed to suit your map better.

Step 1: Placing an explode event and trigger.

You should already know how to do this much, but I'll give you an overview. Place a "Trigger Door" event at the point you want the player to be when the explosion occurs. Next, place the "Explode" object (found in "Event > Level" subsection) behind the wall you want to destroy. Note: be sure "Do Geomod" is selected. It is a good idea to give the explosion a larger radius than needed as geomod tends to be fairly random. Damage is not needed unless you intend to hurt the player; damage should never be used if the explosion includes some sort of AI action (e.i. guards run through the destroyed wall) as it will likely kill your entities. Lastly, link the trigger to the explode event.

Step 2: Particle emitter placement and properties.

The particle emitter is the meat and potatoes of this effect. Place a "Particle Emitter" near your explode event. The particle emitter should be placed in the center of the explosion while still keeping it behind the exploding wall. As for properties, you will most likely want to use the "smokedark.tga" texture and a large particle radius, maybe 1-1.5 meters. There are a few steps we need to take to make our emitter seem more life-like. Under "Particle Flags" we need to check "Colide with world" and unckeck "Play colission sounds". Lastly, check "Gravity" and set it to 0.50 times earth's normal. Under "Emitter Flags" there are a couple things we want to change. We want to uncheck "Emitter is initially on" flag, this will make sense soon. Also, we want to change "Random direction:" to 90.00 degrees. This will make the dust/smoke scatter much more realistically. The rest is up to you and should be selected via trial-and-error.

Step 3: Particle_State and linking.

Place a "Particle_State" modifier and a "Remove_Object" modifier into your level. Leave the particle_state as-is and open the properties of the remove_object. We need to give this one a delay, anything between 0.75 and 0.50 seconds should work fine. This will switch the particle emitter on and off as needed. Now we link the trigger to both the particle_state and the remove_object separately (be sure to fully unselect everything in between linking). Also, we need to link the particle_state and the remove_object to the particle emitter (again, separately). Make sure your trigger is also linked to your explode event and then you're done.

End Result

As the player walks through the trigger the wall should explode and our particle emitter is turned on. This makes a flurry of dust come out of the hole, as it would in real-life. Then after 0.50 seconds or so the particle emitter is turned off and the dust stops flying through the hole. This can be used in surprise attacks in single-player maps.