Fog tutorial: Difference between revisions
(cleanup, please check....you get the idea) |
m (fixed image flow) |
||
Line 1: | Line 1: | ||
{{Tutorial Cleanup}} | {{Tutorial Cleanup}} | ||
Line 8: | Line 7: | ||
To create fog successfully your fog color must match the skybox' color as closely as possible. Furthermore, if your skybox texture does not appear to have fog on it, things look strange. You could make your own skybox that has the appearance of fog which would solve this problem but as a quick fix these settings will work fine. | To create fog successfully your fog color must match the skybox' color as closely as possible. Furthermore, if your skybox texture does not appear to have fog on it, things look strange. You could make your own skybox that has the appearance of fog which would solve this problem but as a quick fix these settings will work fine. | ||
First, you have to use <code>sky_day02_10</code> as your [[Skybox (2D)#Changing the displayed skybox|skybox]] texture (if you look at it, it actually is foggy on the texture which is why it works). For a list of skies, see [[ | First, you have to use <code>sky_day02_10</code> as your [[Skybox (2D)#Changing the displayed skybox|skybox]] texture (if you look at it, it actually is foggy on the texture which is why it works). For a list of skies, see [[Sky List]]. | ||
Then, your | Then, your [[env_fog_controller]] should be something like this: | ||
Primary fog color: <code>176 192 202</code><br/> | Primary fog color: <code>176 192 202</code><br/> | ||
Line 17: | Line 16: | ||
These are the exact settings used in the bridge crossing part of [[Highway 17]] in [[HL2]]. | These are the exact settings used in the bridge crossing part of [[Highway 17]] in [[HL2]]. | ||
[[Image:Fogtute02.jpg|thumb|300px|right|An example of a successful fog.]] | [[Image:Fogtute02.jpg|thumb|300px|right|An example of a successful fog, due to the fog color matching the 2D skybox.]]<br style="clear:both"> | ||
==3D skybox== | ==3D skybox== |
Revision as of 12:20, 6 March 2006
Fog with 2D skyboxes

To create fog successfully your fog color must match the skybox' color as closely as possible. Furthermore, if your skybox texture does not appear to have fog on it, things look strange. You could make your own skybox that has the appearance of fog which would solve this problem but as a quick fix these settings will work fine.
First, you have to use sky_day02_10
as your skybox texture (if you look at it, it actually is foggy on the texture which is why it works). For a list of skies, see Sky List.
Then, your env_fog_controller should be something like this:
Primary fog color: 176 192 202
Secondary fog color: 206 216 222
These are the exact settings used in the bridge crossing part of Highway 17 in HL2.
3D skybox
With the use of a 3D skybox this problem can be solved using the sky_camera entity's fog settings.