Can fog density be made to gradually "fall off"?

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
Magnus
Posts: 529
Joined: Wed Feb 16, 2005 6:38 pm

Can fog density be made to gradually "fall off"?

Post by Magnus »

I was wondering if there is any way either actuall density fall off written into the fog shader or artificial through lighting to make a fog brush seem to get more dense as you get closer to the center of the brush and get thinner untill it just vanishes as you head toward the edges of the brush.

I would love to create areas where either you walk up to a long room and as you look down the room the fog gets thicker and thicker untill at a certian point you can see no further. Or you walk up to a room with a few halls leading off and the halls are filled with fog to where you can only see a certian distance down the hall, but the room is clear.

I am trying to avoid that wall of fog effect when you run into a fog brush from the side.

Thanks for any help!
Uh, well....good luck with that. :shrug:

[img]http://i57.photobucket.com/albums/g228/Magnus3204/forumheader.jpg[/img]
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Post by obsidian »

You can, in a single direction. So it will work with rooms open in one end but not with rooms with doorways on opposite sides of the room.

The fog brush needs to be enclosed on all sides (including floor and roof) with only one side exposed. The face that is exposed is the side that is less dense. This is done automatically.

You can force the direction (though you rarely need to) with q3map_fogDir.
Magnus
Posts: 529
Joined: Wed Feb 16, 2005 6:38 pm

Post by Magnus »

Crap. I was hoping we could maybe fill each half of the map with colored fog that was really thin so you could see fairly far through it, but thick enough to have the feel of being in blue's or red's teritory. Just a thought for a neat effect later on in the project.

Thanks for the info anyway obsidian. :)
Uh, well....good luck with that. :shrug:

[img]http://i57.photobucket.com/albums/g228/Magnus3204/forumheader.jpg[/img]
maz0r
Posts: 157
Joined: Wed Apr 21, 2004 7:00 am

Post by maz0r »

Forget about everywhere-fog in (sort of) competition maps immediately. It looks promising from the designers view but is totally annoying for players.
dnky
Posts: 188
Joined: Thu Nov 24, 2005 3:49 pm

Post by dnky »

maz0r wrote:Forget about everywhere-fog in (sort of) competition maps immediately. It looks promising from the designers view but is totally annoying for players.
heh, do we make maps for 'players' then? ;) Damn, I missed that bit :)
Whatever....
DonX
Posts: 22
Joined: Tue Sep 26, 2006 5:16 am

Post by DonX »

Cool idea Mangus...How about taking it to the extreme and giving fog physic's parameters, that way when your walking through it, it shifts around the player model or reacts to gun fire and projectile movement. That would be kick ass !!

Been trying to achieve a fading fog effect for an open ocean type map, where fog would surround the outer skybox as if fading into the distance. Haven't been too successful tho...
--== Every Path Leads Must Lead Somewhere ==--
Magnus
Posts: 529
Joined: Wed Feb 16, 2005 6:38 pm

Post by Magnus »

DonX wrote:Cool idea Mangus...How about taking it to the extreme and giving fog physic's parameters, that way when your walking through it, it shifts around the player model or reacts to gun fire and projectile movement. That would be kick ass !!

Been trying to achieve a fading fog effect for an open ocean type map, where fog would surround the outer skybox as if fading into the distance. Haven't been too successful tho...
That would be really cool, but I think it would have to be done in Q4. I don't think that it would work out well in Q3A.
There are already fogs that seem to move and swirl when looking at it from outside the fog brush, but once you get inside the brush it just looks like your view is being clipped with a color.
Causeing the fog to seem to move when a player/bot or projectile passes through it would require a seperater shader. Almost like the glow effect from a powerup.
It is set to follow and stay with the player for the duration of the effect.
The fog moving from something passing through it would need to be a seperate set of shaders attached to the object and activated by entering into the brush volume.

It could be done, but if you get a chance try removing the textures from the weapons so that all of their immages look like gray squares with a white outline when you shoot and then play around in the game.
You will see that the trails are a series of 2D immages with an immage and alpha channel. Most evident in the RL. Remove the textures and the immages become a series of the gray squares.
The same could be done with giving the effect of the fog closely surrounding the object moving in the same direction as it passes through the fog, but it would have to be a seperate shader.

The problem is as I am sure we have all seen looking at a shader inside of or through another shader has poor results.
Uh, well....good luck with that. :shrug:

[img]http://i57.photobucket.com/albums/g228/Magnus3204/forumheader.jpg[/img]
Post Reply