Fog tutorial: Difference between revisions
SirYodaJedi (talk | contribs) |
SirYodaJedi (talk | contribs) |
||
Line 19: | Line 19: | ||
==Alternate Method using tools/toolsblack== | ==Alternate Method using tools/toolsblack== | ||
[[File:3-D Sky Fog Example.jpg|thumb|150px|right|Using tools/toolsblack can be more effective at achieving proper fog]] | [[File:3-D Sky Fog Example.jpg|thumb|150px|right|Using tools/toolsblack can be more effective at achieving proper fog]] | ||
Alternatively, you can change the skybox brushes to the [[Tool texture|tools/toolsblack]] texture. The sky will no longer be visible, allowing your fog settings to color the sky. | Alternatively, you can change the skybox brushes to the [[Tool texture|tools/toolsblack]] texture. The sky will no longer be visible, allowing your fog settings to color the sky. | ||
{{note|Since toolsblack won't cast sun/moonlight, it may be preferable to use a skybox such as {{mono|black}}, {{mono|blacksky}}, or {{mono|skyblack}} or create a custom UnlitGeneric skybox with all sides pointing to {{mono|vgui/black}}.}} | |||
==Creating a Custom Skybox Texture== | ==Creating a Custom Skybox Texture== |
Revision as of 05:26, 20 March 2025
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.

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
materials, 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.
