Call of Duty 5: Fog: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 21: | Line 21: | ||
'''Parameters:''' | '''Parameters:''' | ||
*{{Color|<startDist>| | *{{Color|<startDist>|blue}} The distance, in world units, at which the fog begins. | ||
*{{Color|<halfwayDist>| | *{{Color|<halfwayDist>|blue}} The distance, beyond the startDist, at which the scene will be 50% fogged. | ||
*{{Color|<red>| | *{{Color|<red>|blue}} The red component of the fog as a value between 0.0 and 1.0 | ||
*{{Color|<green>| | *{{Color|<green>|blue}} The green component of the fog as a value between 0.0 and 1.0 | ||
*{{Color|<blue>| | *{{Color|<blue>|blue}} The blue component of the fog as a value between 0.0 and 1.0 | ||
*{{Color|<transition time>| | *{{Color|<transition time>|blue}} transition time in seconds | ||
===Implementation in Levels=== | ===Implementation in Levels=== | ||
Line 57: | Line 57: | ||
'''Parameters:''' | '''Parameters:''' | ||
*{{Color|<startDist>| | *{{Color|<startDist>|blue}} The distance, in world units, at which the fog begins. | ||
*{{Color|<halfwayDist>| | *{{Color|<halfwayDist>|blue}} The distance, beyond the startDist, at which the scene will be 50% fogged. | ||
*{{Color|<halfwayHeight>| | *{{Color|<halfwayHeight>|blue}} The height, in world units, at which the fog will be fogged | ||
*{{Color|<baseHeight>| | *{{Color|<baseHeight>|blue}} The height, in world units, at which the fog will begins | ||
*{{Color|<red>| | *{{Color|<red>|blue}} The red component of the fog as a value between 0.0 and 1.0 | ||
*{{Color|<green>| | *{{Color|<green>|blue}} The green component of the fog as a value between 0.0 and 1.0 | ||
*{{Color|<blue>| | *{{Color|<blue>|blue}} The blue component of the fog as a value between 0.0 and 1.0 | ||
*{{Color|<transition time>| | *{{Color|<transition time>|blue}} transition time in seconds | ||
===Implementation in Levels=== | ===Implementation in Levels=== |
Latest revision as of 15:11, 16 December 2010
There are now 2 type of scripted fog in COD:WW, here is a quick tutorial on how to use them and what they do.
SetExpFog
Theory
This function has been present in previous COD games, it creates an exponential fog on your level:
- The functions is of this form:
SetExpFog( <startDist>, <halfwayDist>, <red>, <green>, <blue>, <transition time> )
Parameters:
- <startDist> The distance, in world units, at which the fog begins.
- <halfwayDist> The distance, beyond the startDist, at which the scene will be 50% fogged.
- <red> The red component of the fog as a value between 0.0 and 1.0
- <green> The green component of the fog as a value between 0.0 and 1.0
- <blue> The blue component of the fog as a value between 0.0 and 1.0
- <transition time> transition time in seconds
Implementation in Levels
- To add SetExpFog to your level open up your Map GSC and anywhere after maps\mp\_load::main() add this:
setExpFog(100, 1000, 0.4, 0.425, 0.44, 0.0);
- Replace the values to your liking of course (Values above are the one used in the example pictures on top)
SetVolFog
Theory
This function is new to COD games, it creates an volumetric fog on your level. Main difference with the above SetExpFog is that SetVolFog has 2 extra parameters for the height of the fog.
- The functions is of this form:
setVolFog(<startDist>, <halfwayDist>, <halfwayHeight>, <baseHeight>, <red>, <green>, <blue>, <transition time>)
Parameters:
- <startDist> The distance, in world units, at which the fog begins.
- <halfwayDist> The distance, beyond the startDist, at which the scene will be 50% fogged.
- <halfwayHeight> The height, in world units, at which the fog will be fogged
- <baseHeight> The height, in world units, at which the fog will begins
- <red> The red component of the fog as a value between 0.0 and 1.0
- <green> The green component of the fog as a value between 0.0 and 1.0
- <blue> The blue component of the fog as a value between 0.0 and 1.0
- <transition time> transition time in seconds
Implementation in Levels
- To add SetVolFog to your level open up your Map GSC and anywhere after maps\mp\_load::main() add this:
setVolFog(200, 1500, 350, 100, 0.4, 0.425, 0.44, 0.0);
- Replace the values to your liking of course (Values above are the one used in the example pictures on top)