Help! Fog effect that worked in 2.1.1 not working in 3.1.0a.
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.
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.
- 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.
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
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
- 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
Can't anyone help at all? Is this a bug I should be reporting?
Re: Help! Fog effect that worked in 2.1.1 not working in 3.1
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?
This however doesn't explain why you don't see any fog at all. Could you please post runnable sample?
- Kappes Buur
-
- Posts: 4120
- 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
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.
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.
- 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
Uhhh... I'm pretty sure he set that so his map looks like how he intended it to be for everyone.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.
- 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
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.
Re: Help! Fog effect that worked in 2.1.1 not working in 3.1
_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?
Re: Help! Fog effect that worked in 2.1.1 not working in 3.1
Short version: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.
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."
- 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
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...
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...
- Jekyll Grim Payne
-
- Posts: 1071
- 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
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.
Re: Help! Fog effect that worked in 2.1.1 not working in 3.1
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.
- 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
Dang! Brilliant! That is what I'll do! Thank you so much, JGP!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.
Ben
- 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
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..._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.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- 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
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.