
Foggy Water?
-
- Posts: 41
- Joined: Sun Apr 02, 2006 6:57 pm
Foggy Water?
Is there such a thing? I have started looking at some effects in gtk and I made this haze type shader over my map, but when I put water into the map, it looks like the water stops the fog, how can I make a foggy water shader so it fades with the fog?


-
- Posts: 41
- Joined: Sun Apr 02, 2006 6:57 pm
-
- Posts: 41
- Joined: Sun Apr 02, 2006 6:57 pm
-
- Posts: 41
- Joined: Sun Apr 02, 2006 6:57 pm
Ok heres what I'v got. I used a ready made water shader for now, and simple added the fog parms. Heres the code...
I also took a screenshot of this in action. As you can see, im still having some graphic problems. Is there a way I can make this look good?

If you notice, theres a graphic problem where the light runs out at the end of the tunnel. Its almost like the ambience from the fog, is ignored in the water.
Now im no genius when it comes to anything, so it could be something really basic.. please please can someone help because I'v been working on this for ages.
Code: Select all
textures/liquids/sewerwater
{
qer_editorimage textures/liquids/pool3d_3c.tga
qer_trans .5
q3map_globaltexture
surfaceparm trans
surfaceparm nonsolid
surfaceparm water
cull disable
deformVertexes wave 64 sin .5 .5 0 .5
{
map textures/liquids/pool3d_5c.tga
blendFunc GL_dst_color GL_one
rgbgen identity
tcmod scale .5 .5
tcmod transform 1.5 0 1.5 1 1 2
tcmod scroll -.05 .001
}
{
map textures/liquids/pool3d_6c.tga
blendFunc GL_dst_color GL_one
rgbgen identity
tcmod scale .5 .5
tcmod transform 0 1.5 1 1.5 2 1
tcmod scroll .025 -.001
}
{
map textures/liquids/pool3d_3c.tga
blendFunc GL_dst_color GL_one
rgbgen identity
tcmod scale .25 .5
tcmod scroll .001 .025
}
{
map $lightmap
blendFunc GL_dst_color GL_zero
rgbgen identity
}
fogparms ( .76 .73 .54 ) 30000
}

If you notice, theres a graphic problem where the light runs out at the end of the tunnel. Its almost like the ambience from the fog, is ignored in the water.
Now im no genius when it comes to anything, so it could be something really basic.. please please can someone help because I'v been working on this for ages.
-
- Posts: 284
- Joined: Thu Feb 16, 2006 3:48 pm
-
- Posts: 41
- Joined: Sun Apr 02, 2006 6:57 pm
- Remember, fog needs a "chimney" to work properly.
- You can't have any deformation effects on the water surface.
- Possibly, you may need to enclose the water with both fog brushes.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
-
- Posts: 41
- Joined: Sun Apr 02, 2006 6:57 pm
Ok.. first off, I did get it working.. I used the shader above but remembered to include the surfaceparm for the fog and it worked. Then I started playing with the lighting and a few other things to get it looking better. When I compiled it, it worked. Then I changed something simple like a light.. and it stopped working, then it worked and stopped again and I can't get it to work at all now.
After reading your post obsidian, i thought it could have been the chimney thing, could you explain a little further please.
After reading your post obsidian, i thought it could have been the chimney thing, could you explain a little further please.
Fog volumes often have problems determining the "top" of the fog - that is, the side that you enter into the fog. So often times, the results are unpredictable, since the fog tries to determine a direction on it's own. It needs one surface to be open to the "air", so you construct a small hidden chimney somewhere in your map so your fog has 1 enterable surface.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
-
- Posts: 41
- Joined: Sun Apr 02, 2006 6:57 pm
Fog in Q3 doesn't play nice and is easily confused. Basically, any fog volume should have one and only one face that's exposed, and the other five faces should be buried in geometry. Sometimes it's possible to mess around with multiple volumes with nodraw on touching faces and make it work, but it's always a mysterious crapshoot.Billybob06 wrote:I don't get it
My suggestion (and to clarify what obsidian was saying): If you make a small vertical chimney somewhere extending up into the ceiling, and out of the fog volume, so there will be a small space with no fog at the very top of the level. (Unless you actually want part of the level with no fog; in that case make your single exposed face at whatever point you want the fog to start...).
Make sure that your fogwater is all buried in geometry except for one face, and make sure that your normal fog is all buried in geometry (and extends down through the water as well), execept for one face. Hopefully that will work.
*crosses fingers*
[Edited for retardedness.]
I beat the internet; the end guy is hard.
Try this, extend that fog volume down into the water, so that it overlaps the water brush. Then build the small chimney described above somewhere in the roof.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
-
- Posts: 41
- Joined: Sun Apr 02, 2006 6:57 pm