Still (or again) a fog problem...


(]UBC[ McNite) #1

Here we go, fog problems again…

Basically what i tried is: take the fog like it was used in RtCW (non-linear fog) and that is defined in the sky-shader. Then make a map and have nice fog AND good framerates.

I know that non-linear fog doesn’t work with shaders of more n 2 stages (Ydnar said so). So I worked around that with using another kind of terrain. Today (first playtest) i found out about this:

First problem: on long distance the models of some weapons seem to look funny (mp40, luger, knife).
Also it seems like the blends that are used by the engine to make the wall marks of artillery and airstrikes do have more stages than the fog works with… and i guess i can’t work around that lol.

Here is the skyshader for all those who are interested:

textures/tr2redux_t/tr2r_skyfog
{
	qer_editorimage textures/tr2redux_t/tr2r_fog_06_ei.jpg

	q3map_sunExt 0.98 0.98 0.84 65 60 60 3 16 //1 .95 .9
	q3map_lightmapFilterRadius 0 8
	q3map_skylight 50 3

	skyparms - 128 - //low value >> more curved sky

	surfaceparm sky
	surfaceparm noimpact
	surfaceparm nolightmap
	surfaceparm nodlight

	nopicmip

	fogvars ( .4 .4 .45 ) 5000 // mine:  0.72 0.76 0.78 TC: 4850
	skyfogvars ( .23 .23 .24 ) 0.05 //0.05


	{
		map textures/tr2redux_t/tr2r_fog_06sm.jpg
		rgbGen identity
	}
	{
		map textures/tr2redux_t/tr2r_fog_06sm.jpg
		blendfunc blend
		rgbGen identity
		tcMod scroll 0.002 0.001
		tcMod scale 1.4 1.4
	}
}

This is the sky-fog-shader from Tram Siege (RtCW) in the mp_pakmaps4.pk3, the shader is sd_arnout.shader:

textures/skies/mptramsky
{
	qer_editorimage textures/skies/sky_m01dmcmp
	surfaceparm noimpact
	surfaceparm nodlight
	surfaceparm nolightmap
	surfaceparm sky
	q3map_globaltexture
	q3map_lightsubdivide 2048 
	q3map_surfacelight 35
	skyparms full 200 -
	fogvars ( .4 .4 .45 ) 3200	

	{
		map textures/skies/sky_m01dmcmp.tga
		blendfunc GL_ONE GL_ONE
		tcMod scale 12.0 12.0
	}
}

So what i wonder about now is: If you were to remake mp_tram for ET… which kind of fog would you be using? (yea i know tram has been remade, but its using worldspawn-fog if I m any judge, def. not sky-fog)
How can you get fog in a map AND have good framerates (and no problems with the blends of shaders)?


(Fracman) #2

Looks like the distant objects have a wrong alpha calculation?