Relighting v4.0165b - blurry shadows w/ rlassets

Projects that alter game functions but do not include new maps belong here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
User avatar
Hey Doomer_
Posts: 395
Joined: Tue Oct 18, 2022 1:59 am
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Relighting v4.0144b - more accurate lights

Post by Hey Doomer_ »

WIWO for next maintenance release

Many thanks for bug reports and comments! Keep it coming!

I've fixed a bug (thanks to a Discord member) in the lighting that made most outdoor lights full strength, and this has inadvertently fixed other maps e.g. MAP12 (I have a screenshot that looks far too dark and loses detail; walls in shadow now appear in shadow and other walls capture light correctly). Fixes are in several parts of the code, so I'll likely post a release tomorrow. This corrects most outdoor (and many indoor, I assume) areas to make lighting appear more natural. This does not affect performance and if anything improves it depending on sector light levels.

More natural:
E1M5.png
E1M5.png (68.46 KiB) Viewed 1421 times
This is just the math; indeed I've removed quite a bit of fudge with these bug fixes. Part of the thing. Just need to do more testing.

I'll also include minor fixes and fixes as noted above.
thugsta
Posts: 150
Joined: Mon Jan 21, 2019 10:10 am

Re: Relighting v4.0144b - more accurate lights

Post by thugsta »

Hey Doomer_ wrote: Thu Dec 08, 2022 6:16 pm
thugsta wrote: Thu Dec 08, 2022 7:38 am After you fix what your currently looking at, are you going to dive into the LZ version also?

On a side note, can you repost the archive (or let me access somehow in a mega/mediafire link) up till 4.01b so i can see where up to the last version i can make LZ compatible with (at least with my limited understanding of code)

Thanks as always
Sorry what is it that you're asking for?

My own versioning is all over the place - all the code is being worked on at once - but I'll see what I can do to help.
Sorry, re-reading that i posted i see what how i worded that wrong. I meant to say can you post or have an archive link for older versions from 4.01b till current. As i will try to make the latest version that is compatible for LZ.
User avatar
Hey Doomer_
Posts: 395
Joined: Tue Oct 18, 2022 1:59 am
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Relighting v4.0144b - more accurate lights

Post by Hey Doomer_ »

thugsta wrote: Fri Dec 09, 2022 4:04 pm
Hey Doomer_ wrote: Thu Dec 08, 2022 6:16 pm
thugsta wrote: Thu Dec 08, 2022 7:38 am After you fix what your currently looking at, are you going to dive into the LZ version also?

On a side note, can you repost the archive (or let me access somehow in a mega/mediafire link) up till 4.01b so i can see where up to the last version i can make LZ compatible with (at least with my limited understanding of code)

Thanks as always
Sorry what is it that you're asking for?

My own versioning is all over the place - all the code is being worked on at once - but I'll see what I can do to help.
Sorry, re-reading that i posted i see what how i worded that wrong. I meant to say can you post or have an archive link for older versions from 4.01b till current. As i will try to make the latest version that is compatible for LZ.
Ah gotcha. Again my versioning is all over the place, meaning I don't archive things. The moment I post something it turns into a "working" file on my end for the next version, so at best I have a Frankenstein selection of code. What I can do, however, is DL LZDoom and try to see what is causing the errors. My guess is this is just code that needs to be commented out, but I'll take a look. What version of LZDoom are you using?
User avatar
Dan_The_Noob
Posts: 871
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Relighting v4.0144b - more accurate lights

Post by Dan_The_Noob »

Hey Doomer_ wrote: Thu Dec 08, 2022 2:57 am
Dan_The_Noob wrote: Wed Dec 07, 2022 7:48 pm map12 is a little bit dark outside. infact it's pitch black almost. considering it's outside, maybe need a sky check or something?
I don't think light level or color map are changed for sector 4 that encircles the map. The light level is 144, note. This might be the sidedef baking shading sidedefs away from the light source (one per sector) that makes it look darker than it is... but 144 is pretty dark.

For now try turning down SubLights under Settings to see if that makes a difference.
I turned down sublights from 50 to 25
i can't even tell which screenshot was the before and which was the after haha.
it's very dark though.
(using "Doom" sector lighting, if it's relevant)
https://imgur.com/a/ydMYJFQ
thugsta
Posts: 150
Joined: Mon Jan 21, 2019 10:10 am

Re: Relighting v4.0144b - more accurate lights

Post by thugsta »

Hey Doomer_ wrote: Fri Dec 09, 2022 5:20 pm
thugsta wrote: Fri Dec 09, 2022 4:04 pm
Hey Doomer_ wrote: Thu Dec 08, 2022 6:16 pm

Sorry what is it that you're asking for?

My own versioning is all over the place - all the code is being worked on at once - but I'll see what I can do to help.
Sorry, re-reading that i posted i see what how i worded that wrong. I meant to say can you post or have an archive link for older versions from 4.01b till current. As i will try to make the latest version that is compatible for LZ.
Ah gotcha. Again my versioning is all over the place, meaning I don't archive things. The moment I post something it turns into a "working" file on my end for the next version, so at best I have a Frankenstein selection of code. What I can do, however, is DL LZDoom and try to see what is causing the errors. My guess is this is just code that needs to be commented out, but I'll take a look. What version of LZDoom are you using?
lol ok. I have tried on LZ 3.88a and 3.88b to the same effect. I have got it to "work" mind you as i see the player/items shadows etc just the lighting of the rooms just seems wrong/not-working to me and looks nowhere near anything (if it's even working) like as GZ does in a similar fashion for those (room sector lights etc)
User avatar
Hey Doomer_
Posts: 395
Joined: Tue Oct 18, 2022 1:59 am
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Relighting v4.0145b - slightly more accurate lights

Post by Hey Doomer_ »

Posted v4.0145b

In addition to corrections noted, I've increased light for decorations and objects with a "Death" state (explosive barrels etc).

For the curious here's what doesn't work:
  • subtractive lighting - kills frame rates and looks awful. So no.
  • geometry FLATSPRITE shadows - still pondering this one, but probably no. More iterators, minimal effect.
  • more color and/or dimness bleeding - in general this is all controlled through Settings but far less impressive or even applicable than one might assume. Nope.
  • brightmaps - in theory these show what is "lit" on a texture, but the brightmap does the job anyway so no. That's as far as I got with that.
Previously this mod added "grid" and texture lights. Another no. GZDoom's 2D shadow mapping uses the BSP; lighting more with dynamic lights tends to emphasize how flat the game is and kills performance. Also not adding normal or specular mapping. It would be worthwhile if ZScript could create assets, but AFAIK ZScript only reads assets.

Doubtless much of what I've done can be improved and there are things I've missed. There is a lot of talent around here with far more experience with modding. I'm open to any ideas to improve what I've done!!

Edit: I'm investigating sidedef thinkers across from doors... not sure if that's worth it... :|

Still broken: 3d slope shadows.

Many Many Thanks for all your interest and comments.
User avatar
hitmanx
Posts: 425
Joined: Sat Dec 18, 2004 4:58 am

Re: Relighting v4.0145b - slightly more accurate lights

Post by hitmanx »

Ok I just tested that issue with Mildoom 3. No reshade. RTX 2070.

fps goes way down to 1, literally 1 fps if I just stand at the jump gap point before going up the stairs to the red key on doom 2 map 2.

Very strange bug, haven't had an issue like this with other mods, it's not really an issue, I just thought you might be curious about it.
thugsta
Posts: 150
Joined: Mon Jan 21, 2019 10:10 am

Re: Relighting v4.0145b - slightly more accurate lights

Post by thugsta »

Since you mentioned grid and texture lights, i assume this means you won't be adding just the spotlight lights sector to create the effect of having a spolight of light shining down? Similar kinda to how brutal does it with cone of light
User avatar
Hey Doomer_
Posts: 395
Joined: Tue Oct 18, 2022 1:59 am
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Relighting v4.0145b - slightly more accurate lights

Post by Hey Doomer_ »

thugsta wrote: Sun Dec 11, 2022 3:07 am Since you mentioned grid and texture lights, i assume this means you won't be adding just the spotlight lights sector to create the effect of having a spolight of light shining down? Similar kinda to how brutal does it with cone of light
I did try that and it only applies here and there. A larger application of this idea would kill framerates, I think.

I also tried the idea of dynamic sidedef lighting. The idea is walls on the "dark" side of a door would become brighter when the door opens. This is OK in theory but adds dozens of thinkers around each door waiting for it to open, a significant drain on resources for a meh effect due to the inverse square law... so that's another no for me.
User avatar
Hey Doomer_
Posts: 395
Joined: Tue Oct 18, 2022 1:59 am
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Relighting v4.0145b - slightly more accurate lights

Post by Hey Doomer_ »

hitmanx wrote: Sun Dec 11, 2022 12:03 am Ok I just tested that issue with Mildoom 3. No reshade. RTX 2070.

fps goes way down to 1, literally 1 fps if I just stand at the jump gap point before going up the stairs to the red key on doom 2 map 2.

Very strange bug, haven't had an issue like this with other mods, it's not really an issue, I just thought you might be curious about it.
I tried this and getting 100+ FPS with just Relighting and Mildoom 3 and "notarget." Sure enough while playing the framerate drops as you describe. I'll have to investigate this one. :?

Edit
It seems once the monsters are aware of you the framerate steadily drops no matter what. I'll check that out. More than likely something is being spawned that is generating a thinker that should be excluded; I've made a similar exception for Brutal Doom footsteps.

Edit
Yep. Indeed even with NOTARGET the framerate steadily drops to nothing. The level is constantly spawning "fake" items. Here's an excerpt from the log:

fakearmorbonus 1421
fakeshell 1422
fakearmorbonus 1423
fakesupershotgun 1424
fakearmorbonus 1425
fakeshell 1426
fakearmorbonus 1427
fakesupershotgun 1428
fakearmorbonus 1429
fakeshell 1430
fakearmorbonus 1431
fakesupershotgun 1432
fakearmorbonus 1433
fakeshell 1434
fakearmorbonus 1435

The # is the # of spawns. Looks like these are being constantly spawned for some reason (see "Spawners.txt"). I'll add an exception for these!
User avatar
Hey Doomer_
Posts: 395
Joined: Tue Oct 18, 2022 1:59 am
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Relighting v4.0146b

Post by Hey Doomer_ »

Posted v4.0146b

This version has many bug fixes, some of which are significant and others which improve performance. The polylabel routine now applies lighting symmetrically e.g. the large blue carpet room in MAP01. While map coordinates are doubles they are obviously integer coordinates; I have made corrections for that and drastically decreased the number of probes this routine uses. In most sectors the function finds the POI in 10-30 probes; originally this was up to hundreds or even thousands. I've also added / corrected regular polygon calculations (there are a lot of regular rectangles in the game) and fixed what turned out to be a really nasty bug uncovered by a Discord user. Dunno how I missed it, but it was a bear trap that dragged me down a few rabbit holes.

I've added more light sources to the game and decreased their dynamic lights depending on the proximity of other light sources. Areas that were previously very dark should look better at little if no performance impact. Overall the lighting looks more natural, I think, but I haven't looked at everything. I wanted to post this version because it does fix some significant bugs, some of which hurt performance or made lighting look odd.

Also added the exception for MilDoom's "fake" items. That should work well.

Again Thank You for your interest and comments. I appreciate it!!
User avatar
stainedofmind
Posts: 94
Joined: Sun Sep 01, 2019 10:59 am

Re: Relighting v4.0145b - slightly more accurate lights

Post by stainedofmind »

Hey Doomer_ wrote: Sun Dec 11, 2022 10:20 am
hitmanx wrote: Sun Dec 11, 2022 12:03 am Ok I just tested that issue with Mildoom 3. No reshade. RTX 2070.

fps goes way down to 1, literally 1 fps if I just stand at the jump gap point before going up the stairs to the red key on doom 2 map 2.

Very strange bug, haven't had an issue like this with other mods, it's not really an issue, I just thought you might be curious about it.
I tried this and getting 100+ FPS with just Relighting and Mildoom 3 and "notarget." Sure enough while playing the framerate drops as you describe. I'll have to investigate this one. :?

Edit
It seems once the monsters are aware of you the framerate steadily drops no matter what. I'll check that out. More than likely something is being spawned that is generating a thinker that should be excluded; I've made a similar exception for Brutal Doom footsteps.

Edit
Yep. Indeed even with NOTARGET the framerate steadily drops to nothing. The level is constantly spawning "fake" items. Here's an excerpt from the log:

fakearmorbonus 1421
fakeshell 1422
fakearmorbonus 1423
fakesupershotgun 1424
fakearmorbonus 1425
fakeshell 1426
fakearmorbonus 1427
fakesupershotgun 1428
fakearmorbonus 1429
fakeshell 1430
fakearmorbonus 1431
fakesupershotgun 1432
fakearmorbonus 1433
fakeshell 1434
fakearmorbonus 1435

The # is the # of spawns. Looks like these are being constantly spawned for some reason (see "Spawners.txt"). I'll add an exception for these!
Still haven't gotten around to testing Relighting in a more vanilla setting, but with this issue having been brought to light (mind the accidental pun...), I suspect the slowdown I've been having is related to this with a different combination of mods. I'll do some testing when I get some time and update you.
User avatar
Hey Doomer_
Posts: 395
Joined: Tue Oct 18, 2022 1:59 am
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Relighting v4.0146b

Post by Hey Doomer_ »

Good example of sidedef baked lighting for those who have not seen it:

https://i.postimg.cc/Fzgmqq9f/E2M2.gif

This is NOT done with dynamic lights. It changes with the sector lighting but is otherwise baked.
thugsta
Posts: 150
Joined: Mon Jan 21, 2019 10:10 am

Re: Relighting v4.0146b

Post by thugsta »

Hey Doomer_ wrote: Sun Dec 11, 2022 2:23 pm Good example of sidedef baked lighting for those who have not seen it:

https://i.postimg.cc/Fzgmqq9f/E2M2.gif

This is NOT done with dynamic lights. It changes with the sector lighting but is otherwise baked.
Still looks fantastic nonetheless. Keep it up
User avatar
hitmanx
Posts: 425
Joined: Sat Dec 18, 2004 4:58 am

Re: Relighting v4.0146b

Post by hitmanx »

Hey Doomer_ wrote: Sun Dec 11, 2022 2:23 pm Good example of sidedef baked lighting for those who have not seen it:

https://i.postimg.cc/Fzgmqq9f/E2M2.gif

This is NOT done with dynamic lights. It changes with the sector lighting but is otherwise baked.
Incredible! And you figured out the mildoom bug, I thought it must be something with the mod. Nice work, this mod is amazing
Post Reply

Return to “Gameplay Mods”