Fog tutorial: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(cleanup, please check....you get the idea)
Line 1: Line 1:
{{TutPOV}}[[Category:Level Design Tutorials]]
{{TutPOV}}
{{Tutorial Cleanup}}
{{Tutorial Cleanup}}


{{hl2}} I’ve written this because it took me a long time to work out and had a lot of people coming up with allsorts of crazy answers that didn’t work for me so this is my solution to the problem.
==Fog with 2D skyboxes==


The problem is that the [[env_fog_controller]] does not affect the skybox and will come out looking like this:<br/>
[[Image:Fogtute01.jpg|thumb|300px|right|The most common problem with fog is that the [[env_fog_controller]] does not affect the skybox and will come out looking like this.]]
[[Image:Fogtute01.jpg]]


The solution is to make your fog color match the skybox as closely as possible, but a problem arises that if the skybox texture does not appear to have fog on it, things look strange.<br/>
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.
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 thing you have to use "sky_day02_10" for your sky map. (If you look at it, it actually is fogy on the texture which is why it works.For a list of skies, see [[Sky_List]].
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 "env_fog_controller" should be something like this: <br/>
Then, your ''env_fog_controller'' should be something like this:
primary fog color: 176 192 202 <br/>
Secondary fog color: 206 216 222 <br/>


These are the exact settings used on the bridge level in HL2.<br/>
Primary fog color: <code>176 192 202</code><br/>
This is an example of how it can look:<br/>
Secondary fog color: <code>206 216 222</code>
[[Image:Fogtute02.jpg]]


Apparently with the use of a [[3D skybox|3D skybox]] this problem can be solved using the sky_camera’s fog settings. Someone will need to clarify that because I couldn’t get it to work.
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.]]
 
==3D skybox==
 
{{stub}}
 
With the use of a [[3D skybox|3D skybox]] this problem can be solved using the [[sky_camera]] entity's fog settings.
 
==See also==
 
[[Dust, Fog, & Smoke]]
 
[[Category:Level Design Tutorials]]
[[Category:Abstract Mapping]]

Revision as of 09:17, 6 March 2006

Broom icon.png
This article or section should be converted to third person to conform to wiki standards.

Template:Tutorial Cleanup

Fog with 2D skyboxes

The most common problem with fog is that the env_fog_controller does not affect the skybox and will come out looking like this.

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.

An example of a successful fog.

3D skybox

Stub

This article or section is a stub. You can help by expanding it.

With the use of a 3D skybox this problem can be solved using the sky_camera entity's fog settings.

See also

Dust, Fog, & Smoke