fog: bad clipping of the terrain


(]UBC[ McNite) #1

No, this is no joke or a counter-posting to my wrong-clipping-of-water-surface thread.
This is simply the next problem I ran into when messing with fog in my map.

After I solved the problem with the clipping of the water by a worldspawn fog I found out that this makes framerates drop amazingly if not horribly (down to 25 in too many places in the map). So I wondered what was used in the original map and found out that its a fog in the sky… using these parameters:

	fogvars ( .4 .4 .45 ) 4850	
	skyfogvars ( .23 .23 .24 ) .05

I got a nice fogclipping on the water as u can see on the pics, and for the first time serious improvement on the framerates too: in a standard-bad-spot a raise of about 10FPS (38 without fog, 25 with worldspawn _fog, now 48) and general improvement in the whole map. Only problem is the clipping of the terrain now…

I know GoGerbil worked with a similiar fog once, (http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=9090&highlight=fogvars) but tbh I didn’t understand much of his thread :smiley: my approach to the water-clipping-problem was already pretty ballistic

edit: forgot to post a terrain-shader… they are all the same (some with landmines and phong, but not all of them). I got 5 terrain-textures (but I doubt this is important).

textures/river2nd_t/terrain_0
{
	q3map_lightmapsamplesize 64
	q3map_lightmapaxis z
	q3map_texturesize 512 512
	q3map_tcGen ivector ( 640 0 0 ) ( 0 640 0 )
	{
		map textures/river2nd_t/rv2nd_rock_steep.tga
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}
textures/river2nd_t/terrain_0to1
{
	q3map_lightmapsamplesize 64
	q3map_lightmapaxis z
	q3map_texturesize 512 512
	q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
	
	{
		map textures/river2nd_t/rv2nd_rock_steep.tga
	}
	{
		map textures/stone/mxrock3_a.jpg
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

(]UBC[ McNite) #2

suggestions anyone? I would really love to get fog in my map, but either multivolume or worldspawn fog lower framerates beyond tolerable limits (30 and lower).


(The Wanderer) #3

have you looked at battery and/or railgun…they both got great fog. Just decompile them and take a look at their worldspawn and sky values


(Gringo Starr) #4

Some of the BSP is in plain text, so you don’t always have to decompile. Don’t forget, you’ll have to look at the terrain shader too, but here is Battery’s worldspawn key:

“_fog” “textures/skies/sd_batteryfog”


(]UBC[ McNite) #5

Battery has worldspawn fog, and I had a close look at that. There are several threads on it too. I can reproduce what and how they did it for my map, but worldspawn fog is no good for framerates in TheRiver.