Call of Duty 5: Fog: Difference between revisions

From COD Modding & Mapping Wiki
Jump to navigation Jump to search
mNo edit summary
 
mNo edit summary
 
Line 21: Line 21:
'''Parameters:'''
'''Parameters:'''


*{{Color|<startDist>|yellow}} The distance, in world units, at which the fog begins.  
*{{Color|<startDist>|blue}} The distance, in world units, at which the fog begins.  
*{{Color|<halfwayDist>|yellow}} The distance, beyond the startDist, at which the scene will be 50% fogged.  
*{{Color|<halfwayDist>|blue}} The distance, beyond the startDist, at which the scene will be 50% fogged.  
*{{Color|<red>|yellow}} The red component of the fog as a value between 0.0 and 1.0  
*{{Color|<red>|blue}} The red component of the fog as a value between 0.0 and 1.0  
*{{Color|<green>|yellow}} The green component of the fog as a value between 0.0 and 1.0  
*{{Color|<green>|blue}} The green component of the fog as a value between 0.0 and 1.0  
*{{Color|<blue>|yellow}} The blue component of the fog as a value between 0.0 and 1.0  
*{{Color|<blue>|blue}} The blue component of the fog as a value between 0.0 and 1.0  
*{{Color|<transition time>|yellow}} transition time in seconds
*{{Color|<transition time>|blue}} transition time in seconds


===Implementation in Levels===
===Implementation in Levels===
Line 57: Line 57:
'''Parameters:'''
'''Parameters:'''


*{{Color|<startDist>|yellow}} The distance, in world units, at which the fog begins.  
*{{Color|<startDist>|blue}} The distance, in world units, at which the fog begins.  
*{{Color|<halfwayDist>|yellow}} The distance, beyond the startDist, at which the scene will be 50% fogged.  
*{{Color|<halfwayDist>|blue}} The distance, beyond the startDist, at which the scene will be 50% fogged.  
*{{Color|<halfwayHeight>|yellow}} The height, in world units, at which the fog will be fogged
*{{Color|<halfwayHeight>|blue}} The height, in world units, at which the fog will be fogged
*{{Color|<baseHeight>|yellow}} The height, in world units, at which the fog will begins
*{{Color|<baseHeight>|blue}} The height, in world units, at which the fog will begins
*{{Color|<red>|yellow}} The red component of the fog as a value between 0.0 and 1.0  
*{{Color|<red>|blue}} The red component of the fog as a value between 0.0 and 1.0  
*{{Color|<green>|yellow}} The green component of the fog as a value between 0.0 and 1.0  
*{{Color|<green>|blue}} The green component of the fog as a value between 0.0 and 1.0  
*{{Color|<blue>|yellow}} The blue component of the fog as a value between 0.0 and 1.0  
*{{Color|<blue>|blue}} The blue component of the fog as a value between 0.0 and 1.0  
*{{Color|<transition time>|yellow}} transition time in seconds
*{{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:

With:


Without:


  • 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)
SetExpFog is the function used to create Nightmode in many mods for COD4.

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.

With:


Without:

  • 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)