Fog tutorial
When you have fog in your map, you will most likely run into the problem that, while the geometry and models get affected by the fog, the skybox will not. You have several ways of fixing this.
Contents
Matching Fog Settings with the Skybox
For good looking fog, you'll need to match the fog colors with the skybox colors. You can always fall back on the settings Valve used in their official maps.
For our example, we'll be using sky_day02_10
. If you're using this skybox, your env_fog_controller settings would need to be set like this.
Primary fog color: 176 192 202
Secondary fog color: 206 216 222
The settings above were used for the bridge section of Highway 17.
Alternate Method using tools/toolsblack
Alternatively, you can change the skybox brushes to the tools/toolsblack texture. The sky will no longer be visible, allowing your fog settings to color the sky.
Creating a Custom Skybox Texture
Understanding the creation of 2D skyboxes is important. A more in-depth tutorial on creating one is available here.
Much like a regular skybox, you'll want to create six UnlitGeneric
textures, each named corresponding to their direction. Leave off the $nofog parameter, however. This allows the fog to overdraw the skybox, without the need for it blending in.