New q3map2 fogging giving bizarre results


(G0-Gerbil) #1

http://www.theburrow.co.uk/et/shot0107.jpg

Erm, woshappnin here? Never used to happen.
Basically I have a fog brush that goes all around the sides of the water and below it, as well as being a few tiny units above it (because the water has vertex wibbling on it).

When in the fog, it works as usual, but being outside produces this blatantly weird effect.

Also, is this tied in to the weird ET models bug, because sometimes when they go wrong they exhibit exactly the same visual effect as is represented in the pic above?


(ydnar) #2

Do you have r_clampToEdge 1 set?

y


(G0-Gerbil) #3

Not intentionally?

Here’s the fog shader (note this and my other fogs used to work fine before the ET version of Q3map2 - you did state at the time fog had changed slightly, but that all that should be required was to tweak the fog distance, which I’ve done):

// Water fog
textures/mp_forum/mp_forum_a_deep_water
{
	qer_editorimage textures/liquids_sd/seawall_ripple1.tga
        qer_trans 0.5
	surfaceparm	trans
	surfaceparm	nonsolid
	surfaceparm	nodraw
	surfaceparm	fog
	surfaceparm	nolightmap
	q3map_globaltexture
	q3map_surfacelight 0
	fogparms ( .0 .0 .0 ) 1024
}

(ydnar) #4

Any fog that you plan to have the top visible needs to have stages so the top will render correctly.

y


(G0-Gerbil) #5

Didn’t know that, will have another bash at it and hopefully confirm the sagacity of your words here soon :smiley:


(G0-Gerbil) #6

This is what I get in a test map I’ve been playing around with:


(where the red line highlights the fog boundary)

No matter what I do I can’t seem to get a smooth fog blend, it’s always a harsh line (IE from zero to full fog in very few units).


// Water fog
textures/mp_forum/mp_forum_a_deep_water
{
qer_editorimage textures/liquids_sd/seawall_ripple1.tga
qer_trans 0.5

    surfaceparm trans
    surfaceparm nonsolid
    surfaceparm nolightmap
    surfaceparm fog
    fogparms ( 0.0 0.0 0.0 ) 1024


	{ 
		map textures/liquids_sd/seawall_ripple1.tga
		blendFunc GL_src_alpha GL_ONE_minus_src_alpha
		alphagen const .5		
		rgbGen identity
	}	
}

The source for this map is available here:

http://www.theburrow.co.uk/et/test.zip

The only thing you’ll need to do is create the shader above and probably at it’s new shader script to shaderlist.txt

Has anyone actually used volume fog in ET without it going wrong? :frowning: