• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

All about fog

Level 15
Joined
Jan 16, 2008
Messages
1,244
All about fog

You are having troubles getting that fog to blend in with your terrain? No matter what you do, the colors just don't fit in? Your fog looks unnatural? This brief tutorial may help.

1. Fog options

In order to use the fog, you need to enable it first. Fog options are accesed by pressing scenario -> Map options.
This is the map options window:
Fog options.JPG
As you see, the fog has been disabled in this case. In order to enable it, just thick the 'Use terrain fog'. Once enabled, you will gain access to the fog options.

First option is the fog style. The three styles available are Linear, exponential 1 and exponential 2. Exponential fog styles are very agressive and tend to give unwanted results so i would advise using the linear style.

As second comes the Z start. It is a real value determining how far from the ground the fog will start. The lesser this value is, the more fog you will get in the end.

Next is the Z end. Just like Z start, it is a real number determining how far from the ground the fog ends. The amount of fog is inversely proportional with this number.

The relation between the two numbers above is very important as the difference between them directly affects fog density in the overal outcome. The fog density is inversely proportional with the difference(as difference increases, density lowers). If Z end is lower then Z start, the result is a firm wall of fog. This wall can be useful for hiding the real sky.
Sky hidden by a dark teal wall of fog:
Fog wall.JPG

The same result can be acchieved by making the Z difference positive but very small, however, in that case, the wall will be softer.

Density number, as stated by it's name, affects density. As useful as it may seem, i find it way easier to adapt the fog density via the Z difference(this value has greater effect on the exponential styles).

2. Coloring

This is probably the most awkward thing to set as it has the greatest visual effect. Let's take a look at an example and try to correct it:

Bad:
Wrong fog.JPG

The blending problem is obvious; Red background conflicts with the teal-fogged hill. The first step we can take is to set the fog color to approximately match the background. In this case, we need dark red. The dark red color is in the presets so we will not have to adjust it additionally.
Let's see the results:
Ok fog.JPG

Now that's better. The hill color now does well but the density seems problematic. Now that we have chosen a more intensive fog color, we get to see that the fog starts suddenly and gets intensive right away. That points us to the fact that our Z difference is too small. Let us try to spread the fog a bit. In this particular case, i will reduce the Z start from 1000 to 0(this increases the amount of fog a little) and the Z end from 3000 to 4000(this decreases the amount of fog). Now i have brought the fog closer to the camera but i have also increased the Z difference, reducing the fog density. The result is a softer field of fog for better blending:
Nice fog.JPG

Dough these simple steps can make your fog look better, each terrain is specific and it's fog options may require different approaches. As with everything, the key is excercise and experimenting. Good luck with your fog!
 
Level 4
Joined
Aug 7, 2010
Messages
74
Was hoping to see Area/Dungeon Fogs as well but somehow everyone only explains the easy map property fog... So this post is missing it.
 
Top