Fog Basics: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(19 intermediate revisions by 14 users not shown)
Line 1: Line 1:
[[Category:Source_SDK_FAQ]]
#REDIRECT [[Fog tutorial]]
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.


'''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.
{{useful redirect|mind the page history}}
 
'''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|Fog tutorial]]

Latest revision as of 11:03, 29 May 2025

Redirect to:

This redirect is marked as something valuable for the following reason(s):
mind the page history