GZDoom fog.

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
Disciple-X
Posts: 39
Joined: Thu Jan 19, 2006 6:04

GZDoom fog.

Post by Disciple-X »

I have noticed that GZdoom's fogged environments retain the numerical sector light level AND add the desired fog (meaning if the sector is darkened with a 160 value, then all things in it will be dark, and then it will also use that same value to add fog). Where as software rendered ZDoom fog will up the sector light level to the brightest, and then uses the specified sector light numbers to either make fog thicker or thinner, but all things in the distance stay bright and lack fake contrast.

I asked about something similar to this before, but instead it involved glowing building textures. My current question is asking if it is at all possible to get GZdoom to apply max brightness while at the same time adding fog, much like the software rendered Zdoom.
User avatar
Shinjanji
Posts: 198
Joined: Sun Nov 06, 2005 16:45
Location: Pennsylvania, USA

Post by Shinjanji »

Well, I think it was a limitation of ZDoom to not allow different fades to blend. It also makes things more interesting, I personally think.

I think one way it might be possible (I'm no programmer) is to trace planes out to determine what precise area the player can see behind the bounds of the actual sector, and change their fog effect so that the boundary is indeterminate. (Or, if it's possible, make the light effect just override whatever light effects are behind it)

Again, I don't know how easy any of that is to achieve, but that's just my idea.

Also, isn't everything supposed to fade to the sector's fade color, even sprites? In ZDoom, a Cyberdemon I placed in white fog at 0 brightness faded distinctly to white. In GZDoom, it faded to regular black. Not sure if that should be a bug report or engine limitation.
User avatar
Disciple-X
Posts: 39
Joined: Thu Jan 19, 2006 6:04

Post by Disciple-X »

Also, while on the subject of fog... I'm not sure if GZdoom does this intentionally, but has anyone else noticed that fog will sometimes cut off in a triangular manner (when viewing from different angles or areas in a map) rather than stay a continuous and smooth transition? This shot shows what I mean.

http://img441.imageshack.us/img441/3820/doom0005az2.jpg
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

That's a bug in ATI's GL driver. On NVidia cards it is ok
User avatar
Disciple-X
Posts: 39
Joined: Thu Jan 19, 2006 6:04

Post by Disciple-X »

All of these faulty rendering issues have sure been annoying lately. I did not notice them too much until my encounter with Hitman: Blood Money. Seems white dots are an issue for many who have ATI cards and now there is a fog issue I stumble upon. Lots of fun I say... suppose I need to go the Nvidia route next upgrade.
User avatar
Syfo-Dyas
Posts: 182
Joined: Sun Oct 09, 2005 21:54
Location: Ohio
Contact:

Post by Syfo-Dyas »

How do are you doing this without the 213 sector fade option, or did I miss something?

Oh and how do you make the fog always be on without having a trigger to walk over or what ever?

Thankx! I've been out of touch for a while, moved to AZ and shit so if this is basic and I'm overlooking something simple, I'm sorry. :)
User avatar
Disciple-X
Posts: 39
Joined: Thu Jan 19, 2006 6:04

Post by Disciple-X »

You use scripting. Simply tag the sector with an unused number, then use your wad program script editor. I have trouble editing scripts with Doom
builder, so I use wad author and the latest ACC from zdoom.org in the download section. Insure that the latest ACC is in the wad author directory. You can also use XWE to insert script lump files in the map information areas of a wad file. To use wad authors script editor, simply click on an unused portion of the map and then clear out all the descriptive text that comes up, then replace with the script format below. Also make sure that the latest ACC is placed in the main folder of wad author. here is the exact script to enable fog, omit the dotted lines that I used to separate the script from the text. =P

------------------------------------------------

#include "zcommon.acs"


script 1 OPEN
{
sector_setfade (const:5, 255, 255, 255);
}

------------------------------------------------


"const:" means sector tag number, and the three areas with "255" mean red, green, and blue. To get white or gray fog, simply make it all 255 or all 160 and so on. to get red, blue, greens, oranges, purples, etc, mix higher values per area with lower values. When ready, click compile, also refer to this picture to see how I have my working script layed out EXACTLY

http://img412.imageshack.us/img412/7331/untitledgy6.gif
User avatar
Syfo-Dyas
Posts: 182
Joined: Sun Oct 09, 2005 21:54
Location: Ohio
Contact:

Post by Syfo-Dyas »

See, I knew I over looked something I should have thought of by default.

It's literally been months since I've done any level work. The last I touched anything on my project I was working on sprites. Then...


...well then I met my wife to be. But now I'm in Arizona, we're all settled in, and hopefully I'll be able to stay with things and get the project moving along which is LONG over due!

Thankx again Disciple!
User avatar
Tormentor667
Stronghold Team
Posts: 3555
Joined: Sun Nov 13, 2005 23:15
Location: Germany
Contact:

Post by Tormentor667 »

Graf Zahl wrote:That's a bug in ATI's GL driver. On NVidia cards it is ok
Damn, how can I solve this? Update my driver?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

ATI never fixed it. I'm afraid that there's nothing you can do. Let's hope their new Vista driver manages to get rid of this...
User avatar
Syfo-Dyas
Posts: 182
Joined: Sun Oct 09, 2005 21:54
Location: Ohio
Contact:

Post by Syfo-Dyas »

In the mean time, it would not hurt to report it to ATI. The more angry letters they receive, the better.
Locked

Return to “GZDoom”