UED2 Main

UED2 Tutorial - Zone, Fog

In this fog tutorial we will simply look at how fog looks and how
the engine treat zones.

First start by creating a 256x256x256 sized room.
Create another room, also 256x256x256. Place this one 128 units to the right
of the first room.
Now add a 128x128x128 sized room and make it connnect the two rooms.
Add texture and lights.
Screenshot

When that is done create a sheet 128x128 with AX_Xaxis.
Place it in the middle of our passage add press the "Add Special Brush" button.
Select "Zone Portal" and let the rest be. Press "Ok".
Screenshot

Now open the actor browser. Expand "Info" and select "ZoneInfo".
Add this "ZoneInfo" inside the room to the right.
Screenshot

Now to the creating of the fog itself.

You can do this by either using true fog or fake fog.

True fog looks real good and you can adjust thickness, covered area and color.
On the other hand true fog is very ressource demanding and can slow a level
down drasticly.

Fake fog actually only adjust the screen brightness and color fade to give
the illusion of fog. It has no depth whatsoever but demand no extra processing.

True fog:
In the properties window for the zoneinfo actor you need to adjust a property.
Under "ZoneInfo" you have "bFogZone". You must set it to true.

True fog comes from light sources and we have three properties that we can adjust.
Open the properties window for the light in the same room we have the zoneinfo actor.
Adjust the following values:
Lighting, VolumeBrightness: 8
Lighting, VolumeFog: 128
Lighting, VolumeRadiusz: 24

If you want to change the color of this fog/haze, just change the color
of the light.

Note that the light have two radius values. One for the light itself and one
for the fog (LightRadius and VolumeRadius).

Fake fog:
Open the properties for the zoneinfo actor and adjust the following values under "ZoneLight"
ViewFlash X : -0.5
ViewFlash Y : -0.5
ViewFlash Z : -0.5
ViewFog X : 0.5
ViewFog Y : 0.5
ViewFog Z : 0.5

Add a playerstart in the first room, rebuild and test it.

You can see that you are unable to see the fog, unless you
actually are inside the zone (this goes for any type).

Seeing fog, cross zoned:
You are able to make true fog appear in more than the zone you created it in.

First you should understand that fog is the same as 'Volumetric' light and
need the "bFogZone" set true to be rendered.
This means that all zones that have this property false will never render/show
volumetric light (fog).

By setting "bFogZone" in all zones that players should be able to see volumetric
light, in or from, will allow fog to be seen across zones.

This also works perfectly ok with a skyzone.

Rendering true fog:
I do not know if this is standard, but for some people UT set by default
that voulmetric light (fog) should not be rendered.

To fix this open the advanced properties, expand "Rendering" and make sure
that for each render device (Glide, Direct3D...) have "VolumetricLight" set
True.