Mist Color

I’m trying to change the color of the mist in my game using the python function

bge.render.setMistColor()

I’m not getting any errors in the console, but the mist color stays the same as the original world settings. Am I doing something wrong or is there another way to do this? Thanks.

if im not mistaken the mist color, and all other mist setting dont work with python. But i havent attemped to use any of that since 2.49 or so. could function now in 2.61 but im not sure

Here is a great resorce for diffrent commands withing blenders python. only problem is it hasent been updated from 2.49b (i think)

http://www.tutorialsforblender3d.com/GameFunctions/ClassIndex_1.html

I’ve tried repeatedly, but no, it doesn’t seem to work on any of the current versions of blender, along with some other functions, like changing the horizon colour.

its quite a paint in the rear i think, that is a very niffty sett of commands for some very good effects

Well, after trying meself, I found that, in order for it to work, you need to disable the world mist… and set your own star and end values…

http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.62/Game_Engine

In 2.62 there are “More mist settings accessible” under ‘Python’ - But if I follow the link it looks like falloff and intensity have been added to the gui rather then a python api change… Guess we find out soon.

Torkusama, any chance of a demo blend for that?

Sure, rembember, that it doesn’t work on GLSL…
Mist

o, well that explains alot, well thats as usefull as a flat tire, o well guess i wait for the next release, not like the game will be released before that anyway

Thanks for the help everyone. Bummer that those settings can’t be changed. But if the functions exist in Python, I assume that the powers-that-be must plan on implementing them in the future.

I’m creating a day/night cycle and I wanted the mist to be set to the same color as my skybox, but I might need to use a work-around. I think in Fallout 3 (and NV), they just have a permanent gray-ish fog on the horizon regardless of the sky color. I might have to just do that and make the mist the same gray-ish color.