Height fog is a great way to add atmosphere to your level. It can help set the mood, and make distant objects really feel like they’re in the distance.
You can add height fog to your level by placing a Height Fog actor. Open your level, then go to the Actor Classes tab of the Generic Browser. Height Fog can be found under the Info category. Select Height Fog, then add it to your level (Right-click somewhere in the level and choose “Add HeightFog Here”)
You may not notice the effects of the fog right away, especially if you placed the actor on the floor. That’s because the position of the height fog actor you just placed controls where the fog starts – and if you placed it low (or on the floor), the fog starts too low to affect your level.
Grab the HeightFog actor and move it up near the ceiling, or higher. The fog still isn’t very thick, but you should be able to see its affect on the level as the actor moves.
Bring up the properties of the height fog, and open up the HeightFog->Component category. Let’s look at ways to control the look of the fog.
Try playing with the Density first. This controls how thick the air appears. If you couldn’t see the effects of the fog before, you definitely can now!
Next, tweak the LightColor parameter. The results should be pretty obvious. LightBrightness is a multiplier against the LightColor, and can make the fog appear brighter or darker. Notice that you can add colored fog, or even black fog for a surreal effect.
StartDistance controls how far away the fog begins to render. Plug in a StartDistance of 300 with a Density of 0.05, and you’ll see right away how this parameter works.
You can get a variety of effects out of a HeightFog actor. Ultimately, the look you’ll want for your fog is tied closely with the lighting and postprocessing you apply to your scene, but these examples should give you a good starting point.
Use a low density, a light bluish color, and possibly a high StartDistance to make objects in the distance appear hazy. Play with the vertical position of the HeightFog actor to tweak the look – placing it high in the air may yield better results.
Use a high density combined with a low position to make localized ground fog.
A high density combined with a high position will fill the whole scene with fog – and you can tint the color to give the scene and eerie feeling.
Height fog isn’t always the best way to get atmosphere into your scene. It tends to have kind of a flat look, and it’s applied evenly to the whole level, which makes it hard to customize for individual areas.
Spend some time looking at Unreal levels that have the kind of atmosphere you want. Open them in the editor – in a lot of cases, you’ll see that localized atmosphere effects are created by a static mesh with a custom material applied to it. For instance, DM-Sanctuary has some pretty nifty light beam effects inside the caves. No need to recreate this effect from scratch – select the mesh, and you can copy and paste it into your own map. (Ctrl-C to copy, Ctrl-V to paste.)
Look around, and once you know what to look for, you’ll see atmospheric meshes everywhere. Reuse anything that you think will fit your level! But be careful – the quickest way to kill performance is to have too many overlapping atmospheric meshes. Make sure that you can only see through 1 or 2 of these meshes at a time, from any camera angle. (In other words, don’t make a hallway with 30 haze cards staggered down its length.)