Adding Fog to a specific area!!!


(d3coy) #1

Ok, after searching the forums for the last 2 hours and having no luck in answering my question, i am going to post it instead.

There are lots of threads on fog, but nothing that i could find on fog in a specific area. Now I know there is a tutorial on Surface for fog, but im thinking there is/might be an easier way.

Im working on a map that includes an ocean, I am wanting to clip out the edges of the map where the water meets the sky using fog.

Now I have tried adding fog such is used in radar and battery, but this is adding it to the entire map. Including indoors. I dont want this as the fog and ocean area is only a small portion of the map.

What i am wanting to do is add fog to just this one area. Basically to block out three edges of it.

Is there a simple way to add fog to this area without it showing in the rest of the map?

Any help IN DETAIL would be greatly appreciated…

Thanks


(DAbell) #2

D3COY

You should maybe take a look at the water on Saberpeak where it blends at the horizon, check the links below they may shed some light on the matter.

http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=7668&highlight=water+blend

http://splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=9420&highlight=saberpeak&sid=a7c5bc89401b0cb62e0e4d2625caa010

The map and source are available on the map creators website.

http://home.comcast.net/~saberpeak/

Hope this helps.

<DJ>


(Diego) #3

If all you are blending with fog is the surface of the water and the horizon of the sky, you should be ableo to fake the fog effect with textures.

For instance, if you want your fog color to be a light blue, paint in a light blue gradient into your sky textures so that it is opaque at the horizon line.

You can use alpha blending on the water surface. 1 texture is for your water, the second one would be the solid fog color. Then blend between the two with the vertexes at the horizon using the blue texture at 100% and closer to the shore it uses the water texture at 100%.

But if you have rocks or other things in the distance that need to be fogged, this will not give you want you are looking for. I’m using a fog brush in my map, but it encompasses the entire area, interiors included. I tried using more than one brush, but I got walls of fog where the multiple brushes would meet.


(BigBadWolf) #4

Behold, a simpler way.


textures/city_wall/fog_gray2048
{ 
	qer_trans 0.75
	qer_editorimage textures/city_wall/fog.tga 

	surfaceparm nonsolid
	surfaceparm noimpact
	surfaceparm trans
	surfaceparm fog

	fogparms ( 0.38 0.38 0.40 ) 2048
}

just make a square brush of what ever size and put this shader on all sides. You can also place a water texture on one side of it, or no draw, so it transitions easier, say looking at it through the no draw side, it is more pleasing.


(D3C0Y) #5

once more, he’s d3coy and i’m D3C0Y :smiley:


(Jaquboss) #6

wtf? :suspicious:


(psyco_mario) #7

duh, there is a d3coy and a D3COY… wierd i know…


(]UBC[ McNite) #8

Yepp what you are searching for is multivolume fog which is made of brushes that get a fog-texture all over them. Its the only way to keep the fog to specific areas which is inside the brushes.
I m not sure whether the idea of having 1 side with nodraw might result in random errors with the brushes not having the fog in them but I think that could happen.


(SCDS_reyalP) #9

A simple blend (like used on RTCW beach and as described by Diego) will almost certainly perform better than using real fog. Also, many leagues and some servers force fog off, so using the texture method will keep your map from looking quite as ugly under these circumstances.


(d3coy) #10

thanks for all the ideas. I have found a way to work this. The best way I think is going to be using individual brushes with a nodraw on 3 side and using the haze2 shader that came with the game itself. If its far enough away from the players viewing area, then you cant even tell its there… just sucks to have to make this area so big when only a small portion of it will be used and accessible… anyhow thanks again.