Fog Basics: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
m (typo)
Line 1: Line 1:
[[Category:Source_SDK_FAQ]]
[[Category:Source_SDK_FAQ]]
Add a <code>env_fog_controller</code> point entity to your level. For basic fog, you need to set the '''Fog Enable''' to "Yes", change the '''Primary Fog Color''' to the color of the fog you wish. Set the '''Fog Start''' and '''Fog End''' values to a distance in world units for how far away the fog will render. The Fog Start distance is how far away the fog will appear from the player, and '''Fog End''' is the distance the for will appear totally opaque.
Add a <code>env_fog_controller</code> point entity to your level. For basic fog, you need to set the '''Fog Enable''' to "Yes", change the '''Primary Fog Color''' to the color of the fog you wish. Set the '''Fog Start''' and '''Fog End''' values to a distance in world units for how far away the fog will render. The Fog Start distance is how far away the fog will appear from the player, and '''Fog End''' is the distance the fog will appear totally opaque.


'''Fog Blend''', '''Primary Fog Color''' and '''Secondary Fog Color''' allow you to change the color of the fog depending on the direction that the player is facing. Create a <code>env_fog_controller</code> entity, set the primary fog color to red, the secondary color to blue, and keep the fog direction as <code>1 0 0</code> (i.e. East aka Right aka 0 degrees). In-game, the player will see red fog when they look east, blue fog when they look west, and purple fog if they look north or south.
'''Fog Blend''', '''Primary Fog Color''' and '''Secondary Fog Color''' allow you to change the color of the fog depending on the direction that the player is facing. Create a <code>env_fog_controller</code> entity, set the primary fog color to red, the secondary color to blue, and keep the fog direction as <code>1 0 0</code> (i.e. East aka Right aka 0 degrees). In-game, the player will see red fog when they look east, blue fog when they look west, and purple fog if they look north or south.

Revision as of 13:43, 6 September 2005

Add a env_fog_controller point entity to your level. For basic fog, you need to set the Fog Enable to "Yes", change the Primary Fog Color to the color of the fog you wish. Set the Fog Start and Fog End values to a distance in world units for how far away the fog will render. The Fog Start distance is how far away the fog will appear from the player, and Fog End is the distance the fog will appear totally opaque.

Fog Blend, Primary Fog Color and Secondary Fog Color allow you to change the color of the fog depending on the direction that the player is facing. Create a env_fog_controller entity, set the primary fog color to red, the secondary color to blue, and keep the fog direction as 1 0 0 (i.e. East aka Right aka 0 degrees). In-game, the player will see red fog when they look east, blue fog when they look west, and purple fog if they look north or south.

Far Z clip plane This setting is used for optimizing your map. Anything beyond this distance (in world units) will not be rendered. It is recommended to keep this number higher then your Fog End

Fog tutorial