There’s a problem with the standard BGE mist, it can’t be changed in game since blender 2.49b.
For anyone who wants to make a weather or time system with dynamic changing mist this is a big hurdle.
I hear that soon we may get back world control settings via python, but until now here’s a quick and dirty hack for realtime GLSL shaded mist.
Here’s the Blend file:
controllable_colored_mist.blend (457 KB)
To test it press the left mouse button to change mist color.
From the discussion thread:
Far and Near are your controls. A higher far setting (about 5.0) will thin the mist towards the horizon. A lower near value (-2.0) will cause the mist to start nearer the camera. If near and far values are close together (-0.2,0.2) you’ll get quite thick mist. Far apart values will give thin mist (-12.0,12.0).
You can set the color with the r,g and b values.
Play around with the settings and see what gives you the best results. I’m not glsl expert so I can’t tell you if this is an optimal solution, but it seems to work OK on my computer.