Levelwide fog flickers depending on viewing direction

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
User avatar
DaEngineer
Posts: 213
Joined: Fri May 28, 2010 2:30 pm
Location: Germany
Contact:

Levelwide fog flickers depending on viewing direction

Post by DaEngineer »

EDIT: I've made a small mistake in the description, in what case this problem occurs. See below.

Hey guys,
I'm working on a new map right now and encounter a problem that exceeds my knowledge. I've used one big brush to create levelwide fog. This brush is larger than the outlines of my map. It's already a detail brush. In some places, depending on the player's viewing horizontal direction, the whole sky becomes brighter, because the fog isn't drawn anymore. Take a look at the following screenshot I merged together from two points of view.
skybox problem.jpg
I've seen this problem a short time ago on lvlworld.com in ShadoW's map "Rotten soul". While my whole skybox becomes brighter, in his map some sides become invisible depending on at what direction you look:
rotten soul skybox.jpg
EDIT: The problem only occurs when using skyboxes with cloudlayers. Cubic skyboxes work fine. Forget the thing I wrote about the _foghull key. But a sky without clouds or clouds without fog would be an atmosphere killer in my case, so that's no suitable solution. Does anybody know how to fix that? I really don't want to miss the fog, since it contributes a lot to the atmosphere.
Website: https://victorkarp.com
LvLWorld: https://lvlworld.com/author/DaEngineer
YouTube: https://youtube.com/@victorkarp
Noruen
Posts: 308
Joined: Thu Jan 28, 2010 11:45 pm

Re: Levelwide fog flickers depending on viewing direction

Post by Noruen »

Yes, this is problem of all engines regardless of game (Q3A, UT). It is caused by not correct rendering which is caused by FOV value. Try to look into the fog in this games: when you look on the same thing which is actually in the middle of the screen (somewhere around crosshair), it is in deep fog, but when you look onto same thing when this thing is in the corner of the screen, it seems to be closer (or the fog is less opacity).

But this thing is weird, because I have never seen fog affecting the sky. Try to make fogbrush bigger than whole skybox (with overlap). Maybe this is caused by fogbrush aligned into inner skybox.
User avatar
DaEngineer
Posts: 213
Joined: Fri May 28, 2010 2:30 pm
Location: Germany
Contact:

Re: Levelwide fog flickers depending on viewing direction

Post by DaEngineer »

Hm, if this is really engine-independent, I'll have to accept it. Then the clouds will get the short end of the stick, since a good still skybox is better than cloudlayers that cause nerve-killing fogbugs.
The fogbrush is already a lot bigger than the outer borders of the map, so this can't be caused by aligning issues.
Website: https://victorkarp.com
LvLWorld: https://lvlworld.com/author/DaEngineer
YouTube: https://youtube.com/@victorkarp
Noruen
Posts: 308
Joined: Thu Jan 28, 2010 11:45 pm

Re: Levelwide fog flickers depending on viewing direction

Post by Noruen »

But as I said... it is weird. Are you sure, that only ONE, or NONE side of fogbrush is visible? I got these issues when I have had two or more sides of fogbrush visible.
skinNCNmaster
Posts: 344
Joined: Wed Jan 29, 2003 8:00 am

Re: Levelwide fog flickers depending on viewing direction

Post by skinNCNmaster »

?can i see the file plz.. broken textures r fine.. i can do a replace.. just the map file.. toss a temp copy on filedropper.com

ive never heard or seen anything like this except when say.. fog brush faces and water brush faces come flush together, the deform on the water brush caused a sparkly wave to cross the fog face.. or say.. fog ABOVE water.. the water draws through the fog, like in front of..

do you have one visible face? try dropping the height of the fog so the top face is a few units short of the top of your map... also try grid seven or higher and snap the fog corners to that..

from the manual:
* The fog volume can only have one surface visible (from outside the fog).
* Fog must be made of one brush. It cannot be made of adjacent brushes.
* Fog brushes must be axial. This means that only square or rectangular brushes may contain fog, and those must have their edges drawn along the axes of the map grid (all 90 degree angles).

Design Notes:

* If a water texture contains a fog parameter, it must be treated as if it were a fog texture when in use.
* If a room is to be filled completely with a fog volume,it can only be entered through one surface (and still have the fog function correctly).
* Additional shader passes may be placed on a fog brush, as with other brushes.
Kaz
Posts: 1077
Joined: Wed Mar 08, 2006 3:43 am

Re: Levelwide fog flickers depending on viewing direction

Post by Kaz »

I remember running into this issue a long time ago. The only fix I remember anyone coming up with was using nofog:

http://q3map2.everyonelookbusy.net/shad ... .htm#nofog

You could use that in combination with tinting your skybox images in photoshop with an averaged amount of the fog color so that it looks right most of the time.
User avatar
DaEngineer
Posts: 213
Joined: Fri May 28, 2010 2:30 pm
Location: Germany
Contact:

Re: Levelwide fog flickers depending on viewing direction

Post by DaEngineer »

@ Kaz: I applied this line to the skybox shader, it didnt work. But...
skinNCNmaster wrote:do you have one visible face? try dropping the height of the fog so the top face is a few units short of the top of your map...

from the manual:
* The fog volume can only have one surface visible (from outside the fog).
This hint was the solution for my problem! The fogbrush I created has 6 sides, but all of them are outside the map, so none of them is visible.
The solution: I've added a small box of 6 caulk brushes in a place where the fogbrush ends, in a way that one face of it goes straight through the middle of the box. Inside this box is an arbitrary entity (I took an info_null entity), so the compiler won't just ignore this box and delete it in the BSP phase when it comes to flooding. Looks like this:
fogsolution.jpg
Now the engine thinks one side would be drawn and - guess what - the flickering stops! Once again, the simpliest solutions are the best. A big thank you to skinNCNmaster, you made my day; and of course to the others who tried to help me, too :up:
Website: https://victorkarp.com
LvLWorld: https://lvlworld.com/author/DaEngineer
YouTube: https://youtube.com/@victorkarp
skinNCNmaster
Posts: 344
Joined: Wed Jan 29, 2003 8:00 am

Re: Levelwide fog flickers depending on viewing direction

Post by skinNCNmaster »

:D glad to be of not serve ice.
gee and odd yet in terre resting soul you shun.
User avatar
DaEngineer
Posts: 213
Joined: Fri May 28, 2010 2:30 pm
Location: Germany
Contact:

Re: Levelwide fog flickers depending on viewing direction

Post by DaEngineer »

skinNCNmaster wrote::D glad to be of not serve ice.
gee and odd yet in terre resting soul you shun.
It's not so easy for me as a native German speaking person to follow you when you write like this. But I think I got the point :D
Website: https://victorkarp.com
LvLWorld: https://lvlworld.com/author/DaEngineer
YouTube: https://youtube.com/@victorkarp
Post Reply