Env fog controller: Difference between revisions
Jump to navigation
Jump to search
Cargo Cult (talk | contribs) (Added a fogblend example - maybe move to overall description?) |
mNo edit summary |
||
Line 11: | Line 11: | ||
* {{kv dxlevelchoice}} | * {{kv dxlevelchoice}} | ||
* '''fogcolor''' | * '''fogcolor''' | ||
: | : {{color}} | ||
* '''fogcolor2''' | * '''fogcolor2''' | ||
: | : {{color}} | ||
* '''fogdir''' | * '''fogdir''' | ||
: <vector> A vector (given by three space-separated numbers X Y Z) which points from the secondary fog color ''fogcolor2'' towards the primary fog color ''fogcolor''. | : <vector> A vector (given by three space-separated numbers X Y Z) which points from the secondary fog color '''fogcolor2''' towards the primary fog color '''fogcolor'''. | ||
* '''fogstart''' | * '''fogstart''' | ||
: <float> How far from the point-of-view the fog should start. | : <float> How far from the point-of-view the fog should start. | ||
Line 27: | Line 27: | ||
: {{boolean}} This will enable blending between two fog colors, based on the direction the player is looking. If the player's viewpoint is equal to the ''fogdir'' vector, the fog will be drawn with the secondary color; if facing in the complete opposite direction, the fog will be drawn with the primary color. | : {{boolean}} This will enable blending between two fog colors, based on the direction the player is looking. If the player's viewpoint is equal to the ''fogdir'' vector, the fog will be drawn with the secondary color; if facing in the complete opposite direction, the fog will be drawn with the primary color. | ||
: This can be used to approximate the aesthetic effect of diffuse light filtering through the fog, but since the fog effect color is changed for the entire rendered scene, it is best to keep the two colors relatively close to make the blending less obvious. | : This can be used to approximate the aesthetic effect of diffuse light filtering through the fog, but since the fog effect color is changed for the entire rendered scene, it is best to keep the two colors relatively close to make the blending less obvious. | ||
: For example, sunlight with a yaw of 45 degrees and a pitch of -45 degrees could be enhanced using a ''fogdir'' of '-1 -1 1', a ''fogcolor'' of '120 110 100' and a ''fogcolor2'' of '80 70 60'. | : For example, sunlight with a yaw of 45 degrees and a pitch of -45 degrees could be enhanced using a '''fogdir''' of '-1 -1 1', a '''fogcolor''' of '120 110 100' and a '''fogcolor2''' of '80 70 60'. | ||
* '''use_angles''' | * '''use_angles''' | ||
: {{boolean}} | : {{boolean}} | ||
Line 41: | Line 41: | ||
* '''TurnOff''' | * '''TurnOff''' | ||
: Turn the fog off. | : Turn the fog off. | ||
* '''SetColor | * '''SetColor {{color}} | ||
: Set the primary fog color. | : Set the primary fog color. | ||
* '''SetColorSecondary | * '''SetColorSecondary {{color}} | ||
: Set the secondary fog color. | : Set the secondary fog color. | ||
* '''SetFarZ <integer>''' | * '''SetFarZ <integer>''' |
Revision as of 23:22, 8 August 2005
Entity Description
The env_fog_controller entity controls fogging in a level. This has both aesthetic and functional purpose. Functionally, by adding fog to a level, you can hide a far clip plane, and reduce the amount of rendered geometry, improving game performance.
Keyvalues
- ⇆#000000rgb(0,0,0)⇆
- fogcolor2
- ⇆#000000rgb(0,0,0)⇆
- fogdir
- <vector> A vector (given by three space-separated numbers X Y Z) which points from the secondary fog color fogcolor2 towards the primary fog color fogcolor.
- fogstart
- <float> How far from the point-of-view the fog should start.
- fogend
- <float> How far from the point-of-view the view should be completely fogged.
- farz
- <integer> This is the distance from the point-of-view that the level geometry should stop being drawn at. This can be used to control engine performance.
- fogenable
- <boolean>
- fogblend
- <boolean> This will enable blending between two fog colors, based on the direction the player is looking. If the player's viewpoint is equal to the fogdir vector, the fog will be drawn with the secondary color; if facing in the complete opposite direction, the fog will be drawn with the primary color.
- This can be used to approximate the aesthetic effect of diffuse light filtering through the fog, but since the fog effect color is changed for the entire rendered scene, it is best to keep the two colors relatively close to make the blending less obvious.
- For example, sunlight with a yaw of 45 degrees and a pitch of -45 degrees could be enhanced using a fogdir of '-1 -1 1', a fogcolor of '120 110 100' and a fogcolor2 of '80 70 60'.
- use_angles
- <boolean>
Inputs
- Template:I targetname
- SetStartDist <float>
- Set the fog start distance.
- SetEndDist <float>
- Set the fog end distance.
- TurnOn
- Turn the fog on.
- TurnOff
- Turn the fog off.
- SetColor ⇆#000000rgb(0,0,0)⇆
- Set the primary fog color.
- SetColorSecondary ⇆#000000rgb(0,0,0)⇆
- Set the secondary fog color.
- SetFarZ <integer>
- Set the far clip plane distance.
- SetAngles <string>
- Set the angles to use for the secondary fog direction.