fogparms in sky shader WITH a skybox


(urgrund) #1

I’m tryign to figure out how to get a thick fog with a skybox.

What I originally had was a foggy sky with now /evn images.
I need the fog for distance clipping.

Now that I’ve added the sky, the skybox won’t show with the fog settings like this. (original settigns)

fogvars ( 0.5 0.5 0.5) 3900


when I change the fog to this…

fogvars ( 0.5 0.5 0.5) .0003

…the skybox shows but the fog is screwed. It fogs the menus (limbo) and the fog seems to be inversed. Like, it will heavily fog a face right next to me (say a long beam) and get less foggy as it gets father away.

…so, is there a way to keep the normal fog in the original settings and still see the skybox?

Or will a massive fog brush need to be implemented?
If so… does this sort of fog kill the frames?


(SCDS_reyalP) #2

Try skyfogvars… They should be examples in some of the official shaders. It goes something like this
skyfogvars ( r g b ) density

I used to have a page which explained all this, but it is down right now :frowning:


(MuffinMan) #3

when i fogged a big map for clipping i had the same problem, don’t know if there’s a way around, the skybox area is just too far away to see it anymore, why would you in normal life not see the car right in front of you but the mountains in the background?..


(ydnar) #4

Don’t forget the spaces around the parentheses. They are required:

Wrong: (0.5 0.5 0.5)
Right: ( 0.5 0.5 0.5 )

y


(sock) #5

The fog density value is either map units or a percentage value. Try a low map unit value instead and work upwards until you are happy with the value.

Everytime you change a shader you will need to do a map reload. Shaders are not reloaded on a map restart.

Sock
:moo:


(urgrund) #6

why would you in normal life not see the car right in front of you but the mountains in the background?..

but on a rainy day you can see the clouds above you AND the “fog” or apparent fog as the rain starts to blur the distant view… thats the effect i’m trying to get.

Well… tried skyfogparms… it gets rid of the fog completely, are you sure its a command?

This is my shader at the moment.

textures/gcskies/radar
{

	qer_editorimage env/radar/radar_up.tga
	surfaceparm noimpact
	surfaceparm nolightmap
	surfaceparm sky
	
	q3map_lightsubdivide 1024 
	q3map_surfacelight 150
//	skyparms full 200 -
	fogvars ( .5 .5 .5 ) .003

	skyparms env/radar/radar - -

	
}

With the fogparms as .003, you can see the skybox and the fog.
So… I can now tweak the skybox to match the fading colour of the fog and wil look believeable.

Problem is… sides of the skybox keep popping in and out of view.
I’m guesinng becuase as I turn the mouse, the side of the sky pops in and out of a culling segment of the distance cull thingy.

Also… it fogs everything. I’m talking GUI Limbo, the HUD… everything.


(sock) #7

Yep, that is wolf fog for you, otherwise you would have to use fog brushes and they really are a big hit on framerate.

Sock
:moo:


(urgrund) #8

so there’s no workaround?
i’ll just have to leave as just fog