Selectively Setting Up Fog in Maps?

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

User avatar
Rex Claussen
Developer
Developer
Posts: 2597
Joined: Tue Jul 11, 2006 18:36
Contact:

Selectively Setting Up Fog in Maps?

Post by Rex Claussen »

I have a map that has fog (via an OPEN Script using Sector_SetFade) in some areas only. [FYI, these are meant to represent large, walk-in freezers.] This effect worked perfectly until recently. I believe the introduction of a defaultmap definition in MAPINFO may be causing the freezer fog to be over-ridden. In other words, I can get a default fog value for all maps, or I can get it selectively in various sectors in each map. But I can't get both. Is this intended behavior? Getting rid of the defaultmap returns the freezer fog to its desired level.

Also, I have other instructions in defaultmap that I want to keep, so I don't want to get rid of defaultmap entirely. However, it seems that if I use defaultmap I (somehow) automatically get a fogdensity that over-rides the map-specific scripted instruction. I tried removing the fogdensity instruction, but it changed nothing.

Here is the MAPINFO definition:

Code: Select all

defaultmap
{
lightmode = 4
fogdensity = 32
fade = "00 00 00"
evenlighting
}
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Selectively Setting Up Fog in Maps?

Post by Graf Zahl »

The problem is simply that the fog density being set in MAPINFO is map global and will affect all fogged sectors. If you do not want that you have to resort to a post 2.3 feature which allows setting this per sector via UDMF or ACS.
User avatar
Rex Claussen
Developer
Developer
Posts: 2597
Joined: Tue Jul 11, 2006 18:36
Contact:

Re: Selectively Setting Up Fog in Maps?

Post by Rex Claussen »

Graf Zahl wrote:If you do not want that you have to resort to a post 2.3 feature which allows setting this per sector via UDMF or ACS.
I am using v2.3.2, and I am unable to get the desired effect to work. Is there a special command or instruction that is required?

Unfortunately, the development builds won't work, as one or more features of the game are broken. [I've reported these separately.]

Also, why does the omission of a fogdensity instruction in the defaultmap have absolutely no effect? In other words, why does it require me to completely omit the defaultmap in order to have fog in the freezer areas?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Selectively Setting Up Fog in Maps?

Post by Graf Zahl »

I said 'post 2.3'. It's not in 2.3.2 which only fixed bugs from 2.3.0 onwards.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Selectively Setting Up Fog in Maps?

Post by Graf Zahl »

Rex Claussen wrote:[I've reported these separately.]

Please report problems at the tracker. It's the only place where they can be found later.
User avatar
Rex Claussen
Developer
Developer
Posts: 2597
Joined: Tue Jul 11, 2006 18:36
Contact:

Re: Selectively Setting Up Fog in Maps?

Post by Rex Claussen »

Graf Zahl wrote:Please report problems at the tracker. It's the only place where they can be found later.
Is that here? That's where I reported them.

Also, here's my question again:

"... why does the omission of a fogdensity instruction in the defaultmap have absolutely no effect? In other words, why does it require me to completely omit the defaultmap in order to have fog in the freezer areas?"
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Selectively Setting Up Fog in Maps?

Post by Graf Zahl »

Like I already said: That setting is map global and overrides everything else. And that's entirely by design. The feature was added to 'fix' maps with inconsistent fog in different map parts.
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Re: Selectively Setting Up Fog in Maps?

Post by Nash »

Rex Claussen wrote:]
Is that here? That's where I reported them.
No... the official tracker is here: https://mantis.zdoom.org/view_all_bug_p ... oject_id=0

Use the above for everything from bugs to feature suggestions, from now onwards.
User avatar
Rachael
Developer
Developer
Posts: 3639
Joined: Sat May 13, 2006 10:30

Re: Selectively Setting Up Fog in Maps?

Post by Rachael »

Graf Zahl wrote:I said 'post 2.3'. It's not in 2.3.2 which only fixed bugs from 2.3.0 onwards.
@ ReX & Graf:

Maybe it's too soon to suggest this considering the amount of overhauls that are going on right now in GZDoom, but what if we staved off Paranoic's release for just a month, and if Graf could possibly pick a point he's comfortable doing a release from and then switching gears to bugfix mode from there, allowing for a few weeks to clean up the loose ends and try and get everything working? (If you are getting really fatigued by it - maybe allow Enjay, if he's willing, to lead and direct the project temporarily, at least until its release date?)

I don't know if Paranoic is a major enough project that Graf would want to consider that, but it does certainly seem to have enough interest and merits possible consideration?

Then again, this is without knowing what Graf is planning to do with GZDoom code right now - there could be another major overhaul coming that Graf really wants to do, first.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Selectively Setting Up Fog in Maps?

Post by Graf Zahl »

I first need an overview about the problems and for that someone has to enter them in the bugtracker.
Considering the next release, there's really only one thing left I want to do before: Making as much of the menu code scriptable.
User avatar
Rachael
Developer
Developer
Posts: 3639
Joined: Sat May 13, 2006 10:30

Re: Selectively Setting Up Fog in Maps?

Post by Rachael »

It was just a suggestion. I think Rex is getting sick of Paranoic at this point which might be why he's eager for release, but if he needs post-2.3 features then it's going to require a new GZDoom release anyway. That's why I suggested he give the baton to someone else to handle the actual release stage, so that it's less for him to worry about and he can move on to something that he isn't going to burn out on.
User avatar
Rex Claussen
Developer
Developer
Posts: 2597
Joined: Tue Jul 11, 2006 18:36
Contact:

Re: Selectively Setting Up Fog in Maps?

Post by Rex Claussen »

Graf Zahl wrote:Like I already said: That setting is map global and overrides everything else. And that's entirely by design. The feature was added to 'fix' maps with inconsistent fog in different map parts.
The only problem is, by "fixing" some inconsistencies, it has introduced inflexibility in other projects. Basically, with the introduction of this feature to "fix" a problem, it's not possible to have varying degrees of fog in different parts of a map (or an entire game). And it's entirely conceivable that a map could have fog of different intensities in different areas.

It's your prerogative how you want your game engine to handle things, but by opening one door it should not shut other doors.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Selectively Setting Up Fog in Maps?

Post by Graf Zahl »

That's because you essentially abused the feature for something it was never meant for. At no point was it supposed to be used for DISABLING fog throughout a mod. It was meant to provide a consistent fog setting in maps that botched it - a good example for that, and actually what prompted me to do it was Herian 2.

Let's not forget that this is the second time this ended up as a roadblock for you. It should have been clear that it was essentially the wrong way to do fog-less lighting.
Had you requested a proper way to do what you needed in time instead of using an unsupported hack you wouldn't have ended up in the current dilemma.
User avatar
Rachael
Developer
Developer
Posts: 3639
Joined: Sat May 13, 2006 10:30

Re: Selectively Setting Up Fog in Maps?

Post by Rachael »

I am the one responsible for that "hack" - but I merely did it in the absence of any easy way to convert lights into sector colors. Despite me making that suggestion numerous times repeatedly, people still tend to use sector lighting despite the horrid effect diminishing lighting has on outdoor areas.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Selectively Setting Up Fog in Maps?

Post by Graf Zahl »

Why did nobody ask? I'm here all the time, you could have gotten a better answer if someone had just bothered. :(
If you just need an automated way to convert light levels into sector colors, I guess the only way to do that is to define a ZSCRIPT actor that scans the entire sector array in its Tick function and converts the light level into sector color.
Locked

Return to “GZDoom”