Help! Fog effect that worked in 2.1.1 not working in 3.1.0a.

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
User avatar
real_trisk
Posts: 152
Joined: Wed Sep 24, 2008 11:19 am
Location: Minnesota, USA
Contact:

Help! Fog effect that worked in 2.1.1 not working in 3.1.0a.

Post by real_trisk »

I have an area in my levels that requires a very dense, very black fog to obscure vision beyond a few feet in front of the player. I'd worked out how to do it in 2.1.1, and it looked fantastic for what I needed, like this:



http://www.prodigal-game.com/images/GZDoom2.1.1.png




Now with the new 3.1.0a the fog effect is suddenly gone and it looks like this:




http://www.prodigal-game.com/images/GZDoom3.1.0a.png




I achieved the effect with a simple few lines in the MAPINFO lump like thus:




map MAP17 "Office Building ???"
{
cluster = 1
music = "Nerves2" //horror music
lightmode = 1 //is this needed? Or is this possibly the problem now?
fogdensity = 4096 //set fog density to extremely thick
Fade = "00 00 01" //set fog color to black
sky1 = "ATSky1"
}




but now in the new version I can't get any kind of fog to work at all! What's happened? How can I get my fog back? Please help!

Ben

- posted images were too large, converted to links instead. -mgmt
User avatar
real_trisk
Posts: 152
Joined: Wed Sep 24, 2008 11:19 am
Location: Minnesota, USA
Contact:

Re: Help! Fog effect that worked in 2.1.1 not working in 3.1

Post by real_trisk »

Can't anyone help at all? Is this a bug I should be reporting?
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Help! Fog effect that worked in 2.1.1 not working in 3.1

Post by _mental_ »

In the recent versions the maximum fog density is limited to 512. Greater values are clamped so 4096 is the same as 512.
This however doesn't explain why you don't see any fog at all. Could you please post runnable sample?
User avatar
Kappes Buur
 
 
Posts: 4116
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada
Contact:

Re: Help! Fog effect that worked in 2.1.1 not working in 3.1

Post by Kappes Buur »

You do not need lightmode. It simply emulates the lightmode of whatever port and mood.
https://zdoom.org/wiki/CVARs:Display#gl_lightmode
I would let the player set his/her preferred lightmode in Options.

Fade sets the color of things as they are viewed in the distance.

fogdensity sets the fog, or at least it should.
https://zdoom.org/wiki/MAPINFO_options_ ... L_renderer
Probably a bug in Hexen format.
Works perfectly when set directly in UDMF.
User avatar
phantombeta
Posts: 2088
Joined: Thu May 02, 2013 1:27 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Brazil

Re: Help! Fog effect that worked in 2.1.1 not working in 3.1

Post by phantombeta »

Kappes Buur wrote:You do not need lightmode. It simply emulates the lightmode of whatever port and mood.
https://zdoom.org/wiki/CVARs:Display#gl_lightmode
I would let the player set his/her preferred lightmode in Options.
Uhhh... I'm pretty sure he set that so his map looks like how he intended it to be for everyone.
User avatar
real_trisk
Posts: 152
Joined: Wed Sep 24, 2008 11:19 am
Location: Minnesota, USA
Contact:

Re: Help! Fog effect that worked in 2.1.1 not working in 3.1

Post by real_trisk »

So I should report it as a bug? Or, how hard is it to switch to UDMF? Do I have to switch all the levels, or could I switch just this one? I've always used Hexen format, so I've always been afraid to change over.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Help! Fog effect that worked in 2.1.1 not working in 3.1

Post by _mental_ »

_mental_ wrote:In the recent versions the maximum fog density is limited to 512. Greater values are clamped so 4096 is the same as 512.
This however doesn't explain why you don't see any fog at all. Could you please post runnable sample?
Nevander
Posts: 2254
Joined: Mon Jan 06, 2014 11:32 pm

Re: Help! Fog effect that worked in 2.1.1 not working in 3.1

Post by Nevander »

real_trisk wrote:Or, how hard is it to switch to UDMF? Do I have to switch all the levels, or could I switch just this one? I've always used Hexen format, so I've always been afraid to change over.
Short version:
Not hard at all. You only need to switch the one level if you want. Don't be afraid to change to UDMF.

Long verison:
UDMF is basically like Hexen format with all the remaining bells and whistles of all the G/ZDoom features and full ACS support. You lose nothing by switching and instead gain everything you could possibly have. The only issue is that the map now requires a port that can run UDMF maps. Honestly though in this day and age everyone should have GZDoom or a UDMF compatible port for that reason, not to mention GZDoom is an amazing port that can play any Doom thing ever anyway apart from really obscure mods for other ports like EDGE or Doomsday (which can be converted to GZDoom with enough effort anyway. I say go UDMF all the way. You'll love all the features and things you can "just do."
User avatar
real_trisk
Posts: 152
Joined: Wed Sep 24, 2008 11:19 am
Location: Minnesota, USA
Contact:

Re: Help! Fog effect that worked in 2.1.1 not working in 3.1

Post by real_trisk »

I can't easily post it, no. The file is approaching 1 GB, and I really don't want it to leak after over five years of work. I'll try converting the map over to UDMF first. If I still can't get at least the 512 density fog, then I'll take the time to fabricate a demo level.

Why was the limit set to 512? My level had a VERY exacting reason for having fog that thick, so that the user is pitched into dense blackness. As they slowly move through the level, monsters spawn in the darkness, and strange shapes and faces seam to flicker at the edge of the oppressive blackness. Without it being that thick, the atmosphere, and the whole point of the level, is ruined. I can't see any reason why this limit should have been changed and arbitrarily limited when it didn't used to be. That's taking features away, not putting them in... can this please be changed back? That level represents months of work...
User avatar
Jekyll Grim Payne
 
 
Posts: 1069
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

Re: Help! Fog effect that worked in 2.1.1 not working in 3.1

Post by Jekyll Grim Payne »

I might just not know much about fog density, however... What if you set brightness to 0 everywhere and attach a dynamic light to the player? That's how it looks for me.
Attachments
2017-09-29_215430.jpg
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Help! Fog effect that worked in 2.1.1 not working in 3.1

Post by _mental_ »

Initially fog density cap was added in this commit. If it was only for ruling out negative values like the comment suggests I think the cap can be removed.
User avatar
real_trisk
Posts: 152
Joined: Wed Sep 24, 2008 11:19 am
Location: Minnesota, USA
Contact:

Re: Help! Fog effect that worked in 2.1.1 not working in 3.1

Post by real_trisk »

Jekyll Grim Payne wrote:I might just not know much about fog density, however... What if you set brightness to 0 everywhere and attach a dynamic light to the player? That's how it looks for me.
Dang! Brilliant! That is what I'll do! Thank you so much, JGP!

Ben
User avatar
real_trisk
Posts: 152
Joined: Wed Sep 24, 2008 11:19 am
Location: Minnesota, USA
Contact:

Re: Help! Fog effect that worked in 2.1.1 not working in 3.1

Post by real_trisk »

_mental_ wrote:Initially fog density cap was added in this commit. If it was only for ruling out negative values like the comment suggests I think the cap can be removed.
Oh, unless this happens... should I wait a bit and see what the next version brings, or is this something that might take a while? I probably have another year of work to do on the game before release, so I can always just wait it out...
User avatar
Rachael
Posts: 13542
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Help! Fog effect that worked in 2.1.1 not working in 3.1

Post by Rachael »

Did you check the news?

It's likely we're going to be stuck with that one for a while.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Help! Fog effect that worked in 2.1.1 not working in 3.1

Post by Graf Zahl »

A point release to address some bugs may come sooner or later - but it needs to have a point, i.e. either fixing something critical or a sufficient amount of non-critical bugs. Just for one minor thing it's not worth the effort.
Post Reply

Return to “Mapping”