Game Development Community

Water Fog Distance

by Quest Johnny · in Torque Game Engine · 04/06/2005 (10:00 am) · 5 replies

I'm wondering if it's possible to have a visible fog effect for under water, to simulate the way we can't see as far under water than in air. This depends a great deal on the clarity of the water and so on, of course. Now, there is the "volumetric fog" and that's fine for the large main waterblock (ocean) but I also have two lakes and there is no "bounded" volumetric fog box.

Does anyone now a way to simulate this visual effect?

#1
04/06/2005 (11:42 am)
There aren't any really good ways to do it. You could add some code to "add" a fog effect whenever one is under water.
#2
04/06/2005 (11:44 am)
Are there any variables set when you are underwater by the engine? If so you could use that to change the $pref fog values, which would make it foggy under water and then use it to go back when you're not underwater.

What about using a fog layer, and using a trigger a little ways away from the lake (along hte shore) to activate / deactivate the fog layer?
#3
04/06/2005 (12:32 pm)
In game.cc i changed the glcolor when you are submerged.
Its no fog but its works for distans and color.
#4
04/06/2005 (8:47 pm)
@Billy what do you mean by "it works for distance?" Does it make things harder to see if they are farther away?
#5
04/07/2005 (4:19 pm)
What i mean is if you change the alfa value you dont see so far .