Foggy Water?

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
Billybob06
Posts: 41
Joined: Sun Apr 02, 2006 6:57 pm

Foggy Water?

Post by Billybob06 »

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?

Image
Billybob06
Posts: 41
Joined: Sun Apr 02, 2006 6:57 pm

Post by Billybob06 »

And another thing... Does anyone know how to get antialias into this game?
User avatar
seremtan
Posts: 36011
Joined: Wed Nov 19, 2003 8:00 am

Post by seremtan »

you can add fogparms to the water shader to make it murky

to add antialias, simply turn on antialiasing in your GFX card control menu thingy :smirk:
Billybob06
Posts: 41
Joined: Sun Apr 02, 2006 6:57 pm

Post by Billybob06 »

nice one man.. cheers
Billybob06
Posts: 41
Joined: Sun Apr 02, 2006 6:57 pm

Post by Billybob06 »

ok guys.. I tried that shader with the fogparms and all that, but it didn't seem to work. I still just looks the same. Waht might I be doin wrong? and maybe someone could post an example... if it's no trouble of course.. cheers.
Billybob06
Posts: 41
Joined: Sun Apr 02, 2006 6:57 pm

Post by Billybob06 »

Ok heres what I'v got. I used a ready made water shader for now, and simple added the fog parms. Heres the code...

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
	

}
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?

Image

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.
d3mol!t!on
Posts: 284
Joined: Thu Feb 16, 2006 3:48 pm

Post by d3mol!t!on »

I seem to remember that making a seperate fog brush and placing it in the same volume as the water (or a little higher, to account for the water waving) worked when I tried something similar. Although I only had fog in the water, not in the whole map.
Billybob06
Posts: 41
Joined: Sun Apr 02, 2006 6:57 pm

Post by Billybob06 »

I'll give it a try, any other suggestions?
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Post by obsidian »

  1. Remember, fog needs a "chimney" to work properly.
  2. You can't have any deformation effects on the water surface.
  3. 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]
Billybob06
Posts: 41
Joined: Sun Apr 02, 2006 6:57 pm

Post by Billybob06 »

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.
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Post by obsidian »

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]
Billybob06
Posts: 41
Joined: Sun Apr 02, 2006 6:57 pm

Post by Billybob06 »

I don't get it.. I know im a pain in the arse, but could you please explain how I do that?

I have made a diagram of how the fog is set up in the level. The normal fog is working fine, but I cant get the fog in the water working. So where does this chimney go then?

Image
User avatar
Hipshot
Posts: 1547
Joined: Sun Jan 20, 2002 8:00 am

Post by Hipshot »

Why don't you just give us the map?
Q3Map2 2516 -> http://www.zfight.com/misc/files/q3/q3map_2.5.16_win32_x86.zip
Q3Map2 FS_20g -> http://www.zfight.com/misc/files/q3/q3map2_fs_20g.rar
GtkRadiant 140 -> http://www.zfight.com/misc/files/q3/GtkRadiantSetup-1.4.0-Q3RTCWET.exe
pjw
Posts: 860
Joined: Sun May 07, 2000 7:00 am

Post by pjw »

Billybob06 wrote:I don't get it
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.

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.
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Post by obsidian »

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]
Billybob06
Posts: 41
Joined: Sun Apr 02, 2006 6:57 pm

Post by Billybob06 »

very kind of you boys to help.. i think thats done it.. take a look.

Image
pjw
Posts: 860
Joined: Sun May 07, 2000 7:00 am

Post by pjw »

Don't you love that feeling when something finally works? :)
Glad we could help.
Post Reply