Game Development Community

Water problem

by Dennis Saarela · in Torque Game Engine · 06/21/2004 (10:22 am) · 3 replies

Hi!
I have some problems with my underwater world. It contains a huge(maximized) water block (2048x2048). To decrease visibility I use the fog layers, like so:
fogVolume1 = "40 0 50";
fogVolume2 = "90 50 140";
fogVolume3 = "150 140 340";

and the ordninary fog and visibleDistance:
visibleDistance = "400";
fogColor = "0.0500000 0.150000 0.150000 1.000000";
fogDistance = "100";

Now I seem to get a problem when deep down in the fog, the surface "edge" is seen in the distance. It is even more visible when having a sun above. (See screenshots).

greasebeat.gamemaker.nu/tmp/se2.jpg
greasebeat.gamemaker.nu/tmp/se1.jpg
One of my levelcreators even told me that when the fog isn't setup the sky is seen under the water surface horizon.

Any ideas?

#1
06/21/2004 (8:18 pm)
You may not want fogDistance to be less than your highest fog volume - IE, one of your volumes sets the fog to 150, while your fogDistance is 100. Try setting fogDistance to 200 - this probably wont fix your specific problem but I do know it makes some things look strange.
#2
06/22/2004 (12:06 am)
Ok. But I'm sorry to inform that this didn't work :(
It seems to have something to do with visibleDistance some how, because the problem is worse when I go like 380 units down from the surface (visibleDistance = 400).
#3
06/22/2004 (7:33 am)
This is probably an artifact of the clipping plane. You'll probably need to find a way to "fake" the water extending to infinity. One possibility would be to have it fade out based on distance from the clip plane. Another would be to draw imposter geometry to make it look like it extends to infinity. Or you could clip the sun billboard in some way to give a better interaction.