Fog flickering - cel shaded map


(-=skOre=-) #1

I have got this cel shaded map and tried to apply fog, but it is somehow “flickering”, which means, that various brush faces loose and get the fog overlay again and again:

Is this a general fog problem with cel shading?

shaders:

textures/q3skorectf8/q3skorectf8_fog
{
	qer_editorimage textures/sfx/fog_yel.tga
	surfaceparm fog
	surfaceparm nolightmap
	surfaceparm nonsolid
	surfaceparm trans
	fogparms ( 0.521569 0.694118 0.686275 ) 3200
	{
  		map *white
		blendFunc GL_ZERO GL_ONE
	} 
}
textures/q3skorectf8/q3skorectf8_ink
{
	qer_editorimage textures/q3skorectf8/q3skorectf8_black.tga
	surfaceparm nolightmap
	surfaceparm nomarks
	surfaceparm nonsolid
	surfaceparm trans
	sort nearest
	q3map_notjunc
	q3map_nonplanar
	q3map_bounce 0.0
	q3map_shadeangle 179
	q3map_texturesize 1 1
	q3map_invert
	q3map_offset -2.0	
	{
		map textures/q3skorectf8/q3skorectf8_black.tga
		rgbGen identity
	}
}

(ydnar) #2

To be honest, your map will already be fill-bound because of the cel shading. Don’t exacerbate it by adding a fog pass as well.

Fog on a celshaded map will likely halve or quarter the map’s performance.

y


(-=skOre=-) #3

grml, but it looked so neat !

Will do, thanks

And I await solutions to this problem ! :wink:


(Gringo Starr) #4

That looks very cool! The thing which concerns me though is the 27 FPS. Was it a compile without VIS, or is your system on the low end of the spectrum?


(-=skOre=-) #5

heh, nice expression, “low end of the spectrum” :wink: But no, it is a state of the art computer (amd2500, GF5600FX), but as ydnar pointed out, the fog pass quarters the performance.

Also this is a fast vis compile, and I havent got around to tweak this map, there is way to go…


(Gringo Starr) #6

Ahh. If you made the fog thick enough, you could fogclip it. But from the look of the screenshot, it’s not very thick :).


(-=skOre=-) #7

Yes, it was supposed to bring some color to the gray, but I will now stick to a light green background.

I have to do foghulling anyway to reduce triscount, but not so radical.