Create Fog Tutorial

From AAManual

Jump to: navigation, search

Created by Thomas "GameMakerThomas" Horner

In this tutorial I will show you how to create fog that is best suited for your level.

Part I - Overview

Step 1

Creating fog is simple. Open up the AGP_ZoneInfo properties for the zone you want to have fog for, and make sure bDistanceFog under the ZoneInfo group is true.

The fog settings are in the group ZoneLight. AmbientLight is the ambient light that the zone has. Setting it to 0 makes it pitch black, the only sources of illumination coming from lights. Ambient hue and saturation deal with the color of the ambient light. This is important! The hue and saturation should be similar to the color of the fog for best effect! Here's a diagram I made that should help you get the right color:

image:fog02.jpg

Step 2

The distance fog color is the color of the fog. Open up the color selector by clicking on DistanceFogColor and selecting the button on the right that says "...".

image:fog03.jpg

Once you have the color sorted out, you can now set the distance properties, which determines the density of the fog. DistanceFogEnd is the distance in which the fog is completely visible. So this is the maximum distance you can see. DistanceFodEndMin does nothing. DistanceFogStart determines the distance the fog starts at, 0 being it is fully clear at the player but increases from there.

Here are some diagrams:

Normal fog (Start: 0, End: 3000+)
Normal fog (Start: 0, End: 3000+)
Bad Fog (Start: ~2000, End: ~2200)
Bad Fog (Start: ~2000, End: ~2200)
Stormy Fog, Regular Fog (Start: Negative Value, End: < 4000)
Stormy Fog, Regular Fog (Start: Negative Value, End: < 4000)

Now there's a problem. With some fog settings you can see meshes or terrain popping up in the distance. To remedy that you need to put a tube that is the same color of your fog in the skybox.

Part II - Examples

Here I will tell you some settings you may want for various conditions.

Clear, daytime, hills/mountains:

Fog Color: Light gray (R: 200-240, G: 200-240, B: 200-240)
Fog End: 4000 - 10000
Fog Start: -10 - 10

Foggy, daytime, hills/mountains:

Fog Color: Light gray (R: 200-240, G: 200-240, B: 200-240)
Fog End: 2000 - 5000
Fog Start: -200 - 10

Stormy, daytime, hills/mountains:

Fog Color: Dark gray (R: 80-140, G: 280-140 , B: 80-140)
Fog End: 2000 - 5000
Fog Start: -200 - 10

You can do the same for swamps, jungles, and bogs, but the fog color should be more brownish. At night time the fog should be darker and the ambient brightness turned way down.

Urban, desert, clear:

Fog Color: Very light yellow-gray (ex: R: 230, G: 230, B: 200)
Fog End: 2000 - 6000
Fog Start: -10 - 1000

Urban, clear:

Fog Color: Light gray (R: 200-240, G: 200-240, B: 200-240)
Fog End: 3000 - 7000
Fog Start: -10 - 1000

For more foggy environments, turn down the End and Start. Also, the time of day effects the color of the fog, so if it's sunset in a clear urban environment, the fog might be salmon colored.

For snow conditions, you want a whitish blue fog, at night you want a dark grayish-blue fog.

In the desert, you might want anything from a light blue to a rich yellow, depending on how foggy it is and the time of day.

Play around with it, experiment, until you get it right.


Views

Personal tools