Help with volumetric fog


(jet Pilot) #1

I’m having problems with fogging, as you can probably tell from the screen shots below. Why does the fog look solid near the top, instead of thin and… fog-like? to be fair, (and probably the root of my problem), this is a modified sfx/fog_water shader (it’s the only one that turned up in the radiant with the prefix fog). I changed the surface to nodraw, without it i get the orange/black squares of ‘no texture doom’ I’ve checked the paths, and the .tgas do exist. Does it make a difference if I’ve only compiled it with-meta? The effect I’m looking for is that seen in many Quake 3 maps, and in a few places in the ET custom map Resurrection

Here’s what my fog looks like:

Here’s the effect I’m looking for:

I already know how to change the color. but I dont know the name of the Q3 shader used, or I’d just look at it.
thanks for any help!


(jet Pilot) #2

Update - I’ve kinda figured it out -
I’ve changed the shader to have no texture associated with it, so that’s no longer a problem, since the fog still works
In order to lessen the hard top layer of fog against far surfaces, i’ve lowered the density - the fog far plane or some such -
In order to eliminate the hard line, however, i need to make the fog so this it’s almost invisible, and therefore useless.
Any suggestions?


(EB) #3

You may find this interesting…it is called ‘Q3ASE’.

Create your own images[fog] and such,make them into .pk3 and make your own sha-bang bangs. Shizam.
[translation] Create you own fogs by learning all about shaders !!! go here too >>>>>ShaderLab

-cheers


(SCDS_reyalP) #4

You can search the quake3 shaders for the words surfaceparam fog or fogparams.


(jet Pilot) #5

thanks to both of you - I remembered using Q3ASE for Quake3 mapping, I’ve recently rediscovered it (for the same reason I started this thread, actually) now that I know others use it for ET I don’t feel so doubtful about its value here. Thanks reyal and EB.

The problem persists, though, even if I use an identical shader. Is there a maximum recommended brush size? (to limit the distance hardening)
I’ll just goof with it for awhile, maybe it will come to me. That’s just part of the fun.


(EB) #6

Do the community a favor and don’t resample a shader file unless you duplicate the images (maybe place them in a directory of your own) rename your set and then adjust the shader accordingly for the paths to the images. Otherwise…it will change alot of other shabangbangs in the gizame yo!

I re-familiarized myself with the fog shader properties.

fogparms ( .05 .10 .13 ) 128 <<<<this is what the line looks like in the sfx/fogwater shader.
The first set of numbers is the RGB (red green blue) only go as high as 1 for each number[.5 each is blue/grey…1 each is bright ass white]
The next number is the distance until the shader creates an opacity of 90-100%
So you may want something like this:
fogparms ( .7 .7 .6 ) 1024.

As for the hard edges…You’ll have to play around with that.


(jet Pilot) #7

I kinda figured to do that, I’ve already made a new directory for my custom textures, and all my new shaders are in a brand new file. While I might like some changes to stock shaders, I doubt everyone will! You can rest assured that my map’s pk3 wont change any other maps. Thanks for raising the point though - If it isn’t in one of the sticky threads it should be!


(EB) #8

Hey Jet, Sorry, but I just had to address that.

Did the other information help you out ?


(Danyboy) #9

also - doesn’t look like it but make sure you haven’t got a fog cull since that will stop the game drawing brushes at a certain depth of fog


(jet Pilot) #10

most of the other stuff, i’ve tried, and most of it didn’t solve the problem. I’m using a non textured fog, so it’s a .shader only. The only thing I can think of is that the area is too large for the effect I want. I did notice, however, that curve patches don’t seem to be affected by the fog at all. I have a cylinder patch going into some fogged water, and when underwater, no matter that everything else is fogged to oblivion, the pipe is clear as day, at all distances.


(EB) #11

Anyone want to help him ?..he seems to give up too easily for me to want help him still.
Jet, maybe I will help later on, but you’ll need to explain alot better and post screenshots.
I can’t see it, ya know ?


(jet Pilot) #12

im not giving up on this at all! When I say the area may be too large, I mean that in order to make the far distant hard edge to go away (which i can do) I have to make the fog so thin (opacity) that it doesn’t add anything to the area it’s in. It’s not an important part of the map, but it is something I’d like to know how to do well.
The screenies are at the top of the page,
the only difference is the fog is less dense

Screenies come at a slow rate here, my computer is slooooow and compiling takes a while.

let me go take a screenie of the wierd fog


(]UBC[ McNite) #13

Maybe u want to search this and the q3map2-forum for my threads on fog… collected a lot of things nice 2 know about them.

Another thing… this is already a long thread and i still cant see you posting your shader… would be nice though :smiley: we might be able to help u better.

I’m using a non textured fog, so it’s a .shader only

This sounds like you are messing things up. Even if you are using a fog based on a texture you might only do a .shader in your pk3 when u use a jpg/tga of ET.

There are 3 kinds of fog (dont remember then right now… think it was global fog, sky-fog and surfaceparm fog used on a brush… u ll find them in my other threads… sry i just kinda came across here).
I think you ll want some with a fogparm using a brush the player walks into. So using the watershader like umentioned is the right approach (u dont want any sky-fog or global fog for this). This requires a texture that is the color of the fog you want.
When u get a total black area where fog is supposed to be you screwed up the paths for yor fog-texture.

(just my brainstorming… i dropped the fog issue cuz it made my FPS drop immensely)

(Your compile… how long is the VIS stage?)


(jet Pilot) #14

Here’s the shader I was using :


textures/jets_fogs/fog_lightgrey
{
	qer_editorimage textures/sfx/fog_grey.tga
	surfaceparm	trans
	surfaceparm	nonsolid
	surfaceparm	fog
	surfaceparm	nolightmap

	fogparms ( .35 .35 .35 ) 800
}

If I do vis -fast then the compile is 3 minutes or so, without -fast it seems like forever. I usually throw in a DVD and when it’s over so is vis.
I removed the fog brush (it was the 3rd variant you mentioned) since the entire purpose of the fog was to learn how it works, I didnt really need it in the map there, I just thought it would look cool. It did drop the fps a bit.

The only thing I’m having problems with fog-wise now is my water-fog. For some reason any model (the player) near the water’s surface was fogged even though not underwater. Non of the map brushes or terrain were fogged, just nearby models.