Design 1, Design 3 (Computer and Video Games)
Unit 6 - 12th, 14th November 2002

H ow to create Fog

In order to see fog and other volumetric light effects, it is important to have the "Volumetric Lighting" variable in UnrealTournament.ini to be set to true. The volumetric lighting property is a feature which is not enabled by software alone, but which has to be supported by hardware.

I you have an XPERT 2000 Pro graphics card in your computer and use Direct3D as a rendering method your UnrealTournament.ini's RenderDevice section might look like that:

[D3DDrv.D3DRenderDevice]
Translucency=True
VolumetricLighting=True
ShinySurfaces=True
Coronas=True
HighDetailActors=True
UseMipmapping=True
UseTrilinear=False
UseMultitexture=True
UsePageFlipping=True
UsePalettes=True
UseFullscreen=True
UseGammaCorrection=True
DetailTextures=False
Use3dfx=False
UseTripleBuffering=True
UsePrecache=True
Use32BitTextures=False
DescFlags=1
dwDeviceId=20550
dwVendorId=4098
Use32BitZBuffer=False
UseVertexFog=False
UseAGPTextures=False
UseVideoMemoryVB=False
UseVSync=False
Description=XPERT 2000 PRO AGP 4X

How to build a Fog-Zone

The first step to get fog into your level is to build a zone and a zone portal. This zone can be created by sealing a section of your level with a sheet. Seal this section "air-tight", i.e. with no spaces in between the sheet and the neighbouring walls. Place the sheet brush in such a way that it separates the regions where you want fog to be there fromanother which should not have any fog. Add the brush with the "Add special ..." tool.

You specify fog in the "ToggleZoneInfo" actor class. Open your "Actor Class Browser" and open the subclasses called "Info" and "ZoneInfo". Once you are in "ZoneInfo" select "ToogleZoneInfo".

 


Now you can move the cursor to the 3D view window of UnrealEd and point at the location where there should be fog. Right mouse click and specify "Add ToggleZoneInfo here". You should now see an icon as shown above. Right click on this icon and look at the popup menu that show up now: "ToggleZoneInfo Properties (1 selected)..."

 

 


The crucial parameter is "bFogZone". You have to set this parameter to "True" as is shown in the image to the left. Only if "bFogZone" is set to true, the changes of the parameters descibed underneath will result in visible effects. Fog is a property which is always connected to a light which works as a fog emitter. If there is no light there is no fog.

These are the parameters defining how your fog will look like. Note that these are properties of the light you want to be surrounded by fog, not the zone. Their meaning in regard to fog are:

 

Light Color 

LightBrightness

brightness of fog
(0=dark / 255=light)

 

LightHue

colour of light (and fog)
(vou can move the slide ruler to the left and right to arrive at rather yellowish or purple colours)

 

LightSaturation

saturation of light
(0=maximum colour intensity/ 255=white light, no colour)

Lighting

Volume Brightness

visibility of fog (144 means that the fog is visible quite well)

Volume Fog

density of fog (0=clear air with no fog, high values=foggy) (122 causes a quite dense fog)

Volume Radius

radius of the volumetric fog (8 results in a rather small ball of fog)

If everything went well, you should have fog around the light you connected it with. In any case the zone boundaries ar the boundaries for the fog as well. Fog cannot travel through zone portals.

Take care! Fog uses up a lot of computing power. Even if you have a fast machine and fog works fine on that machine, it might be that few people can play your level on slower machines. If you design games for multiuser setups, fog might cause remarkably differing performance on the machines connected to each other.