fog shader question


(damocles) #1

I asked this tn the ET forum and it’s had loads of views but no replies, so I’ll cross-post here and hope:

Follow this link to the original:

http://www.splashdamage.com/forums/viewtopic.php?t=4018

Basically I’m asking how to create low lying fog (like you would get in a valley) without having horrible bright lines where the fog ends.


(damocles) #2

To elaboprate upon the problem, some screenies:

When viewed form above the fog brush, the fog looks fine…

When viewed from within the fog brush, the fog looks bad - you can see the horrible bright line where the fog brush meets the terrain :confused:


(fraco) #3

I asked the same question ages ago.

http://www.splashdamage.com/forums/viewtopic.php?t=613&highlight=

as far as i know, that was a “can’t be done”. Still bugs me a bit

fraco


(ydnar) #4

The fog brush must have a surface of some kind to fog stuff outside the brush when you’re inside.

y


(The5thHorsemen) #5

a typical fog with a surface shader I have seen is this…
the first part is the fog the second is a cloud texture .tga with alpha channel
to givve the effect of a swirling cloud when standing outside the fog looking in…


textures/graveyard/mist1
{
	qer_editorimage textures/sfx/fog_grey.tga
	surfaceparm nonsolid
	surfaceparm nolightmap
	surfaceparm trans
	surfaceparm fog
	q3map_surfacelight 100
	fogparms ( .434 .456 0.500 ) 4800

	{
		map textures/liquids/kc_fogcloud3.tga
		blendfunc gl_dst_color gl_zero
		tcmod scale -.05 -.05
		tcmod scroll .01 -.01
		rgbgen identity
	}

	{
		map textures/liquids/kc_fogcloud3.tga
		blendfunc gl_dst_color gl_zero
		tcmod scale .05 .05
		tcmod scroll .01 -.01
		rgbgen identity
	}
}