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.
Post Reply
User avatar
stainedofmind
Posts: 125
Joined: Sun Sep 01, 2019 10:59 am

Re: Relighting v4.014b - w/ baked sidedef lights

Post by stainedofmind »

Got the same crash as Cosmos10040, but for the TITLEMAP of Hell Crusher. Just tossed a quick "if (level.MapName == "TITLEMAP") { return; }" in WorldLoaded and it did the job. That said, I can't really run this version as it causes most levels to chug pretty hard at times.

Edit: Should have specified, when I said "this version", I mean the rebuilt one available in this thread as opposed to the older version from your previous thread.
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.014b - w/ baked sidedef lights

Post by Hey Doomer_ »

stainedofmind wrote: Sat Nov 26, 2022 2:33 pm Got the same crash as Cosmos10040, but for the TITLEMAP of Hell Crusher. Just tossed a quick "if (level.MapName == "TITLEMAP") { return; }" in WorldLoaded and it did the job. That said, I can't really run this version as it causes most levels to chug pretty hard at times.

Edit: Should have specified, when I said "this version", I mean the rebuilt one available in this thread as opposed to the older version from your previous thread.
I'll check it out. I did not test that.
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.014b - w/ baked sidedef lights

Post by Hey Doomer_ »

stainedofmind wrote: Sat Nov 26, 2022 2:33 pm Got the same crash as Cosmos10040, but for the TITLEMAP of Hell Crusher. Just tossed a quick "if (level.MapName == "TITLEMAP") { return; }" in WorldLoaded and it did the job. That said, I can't really run this version as it causes most levels to chug pretty hard at times.

Edit: Should have specified, when I said "this version", I mean the rebuilt one available in this thread as opposed to the older version from your previous thread.
OK still not sure what map. So far that mod runs OK with 200+ fps. No errors, but I may be running the wrong thing.

This one?
viewtopic.php?t=72084
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.014b - w/ baked sidedef lights

Post by Hey Doomer_ »

Update

I think I found the sector polygon problem. There are certainly anomalies (sector 50 in map 21 of Doom 2 has two disconnected lines) but in some cases the polygons are not closed. This happens in sector 28 of E1M1 where several vertices are shared. For now I have excluded those.

Hotfix to follow...
User avatar
Dan_The_Noob
Posts: 872
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Relighting v4.014b - w/ baked sidedef lights

Post by Dan_The_Noob »

Hey Doomer_ wrote: Sat Nov 26, 2022 3:43 pm Update
got 4.014b and still getting the long loads, but mostly only when loading with intensify.
4.012b is still faster by a long shot.
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.014b - w/ baked sidedef lights

Post by Hey Doomer_ »

Dan_The_Noob wrote: Sat Nov 26, 2022 5:20 pm
Hey Doomer_ wrote: Sat Nov 26, 2022 3:43 pm Update
got 4.014b and still getting the long loads, but mostly only when loading with intensify.
4.012b is still faster by a long shot.
I'll check out "intensify" to see what the delay is.

I've had to redo the area code to account for lines inside the sector (shoelace algorithm assumes a polygon doesn't contain holes). So I'll be looking at efficiency issues in general.
cosmos10040
Posts: 171
Joined: Mon Dec 20, 2021 6:16 am
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: Relighting v4.014b - w/ baked sidedef lights

Post by cosmos10040 »

Intensify? Is that a mod or setting? I run the latest update with deltatouch and loading is fast.
User avatar
Dan_The_Noob
Posts: 872
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Relighting v4.014b - w/ baked sidedef lights

Post by Dan_The_Noob »

Hey Doomer_ wrote: Sat Nov 26, 2022 6:44 pm I'll check out "intensify" to see what the delay is.

I've had to redo the area code to account for lines inside the sector (shoelace algorithm assumes a polygon doesn't contain holes). So I'll be looking at efficiency issues in general.
if anything, it's probably the massive mess of GLDEFS and other things in intensify.
I need to get around to actually reformatting it into a PK3 folder format but it will take literally months so i haven't...
cosmos10040 wrote: Sat Nov 26, 2022 7:06 pm Intensify? Is that a mod or setting? I run the latest update with deltatouch and loading is fast.
it's a mod based off a Realm667 asset dump, basically.
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.014b - w/ baked sidedef lights

Post by Hey Doomer_ »

Dan_The_Noob wrote: Sat Nov 26, 2022 8:00 pm
Hey Doomer_ wrote: Sat Nov 26, 2022 6:44 pm I'll check out "intensify" to see what the delay is.

I've had to redo the area code to account for lines inside the sector (shoelace algorithm assumes a polygon doesn't contain holes). So I'll be looking at efficiency issues in general.
if anything, it's probably the massive mess of GLDEFS and other things in intensify.
I need to get around to actually reformatting it into a PK3 folder format but it will take literally months so i haven't...
cosmos10040 wrote: Sat Nov 26, 2022 7:06 pm Intensify? Is that a mod or setting? I run the latest update with deltatouch and loading is fast.
it's a mod based off a Realm667 asset dump, basically.
It's the number of GLDEFS unfortunately. There are 186 of them. :| I'm not sure there's much to be done about speeding it up, but I'll look at it. String processing is notoriously slow...

Edit
I have a fix. Loads in no time. Should be posted shortly.
User avatar
stainedofmind
Posts: 125
Joined: Sun Sep 01, 2019 10:59 am

Re: Relighting v4.014b - w/ baked sidedef lights

Post by stainedofmind »

Hey Doomer_ wrote: Sat Nov 26, 2022 3:41 pm
stainedofmind wrote: Sat Nov 26, 2022 2:33 pm Got the same crash as Cosmos10040, but for the TITLEMAP of Hell Crusher. Just tossed a quick "if (level.MapName == "TITLEMAP") { return; }" in WorldLoaded and it did the job. That said, I can't really run this version as it causes most levels to chug pretty hard at times.

Edit: Should have specified, when I said "this version", I mean the rebuilt one available in this thread as opposed to the older version from your previous thread.
OK still not sure what map. So far that mod runs OK with 200+ fps. No errors, but I may be running the wrong thing.

This one?
viewtopic.php?t=72084
That's the one, yeah. I still have to check Relighting with a basic setup, but it could just be my computer struggling with it. It's better then my last computer, but not much better :P Might not be able to reply in the next little while as I'll be without internet.
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.0141b - hotfix

Post by Hey Doomer_ »

Posted v4.0141b

This version contains hotfixes for issues noted above but has not been as widely tested.

Increasing skew correction led me down a rabbit hole of looking at polygon areas again, and this turns out to be a complex :) problem. Regular and irregular convex polygons that don't contain others are that are stitched together correctly are one thing, but Doom's geometry is all over the place. Polygons are not stitched together correctly (tried fixing that), they contain linedefs that border others, they are contained within other sectors, they contain intersecting vertices, or they contain extra vertices. Thus in many cases a shoelace algorithm overestimates the area or just doesn't work. I've handled most of this to my liking, since I only need areas for most sectors sorted by approximate size to place light sources and handle light switches. There are intensive alternatives such as Delaunay triangulation, perhaps, but I'd like to keep this simpler if possible.

To improve performance I've eliminated added dynamic lights and shadow thinkers behind the player.

Much lighting just looks better with improved area calculations e.g. MAP14. Tweaking settings can make dramatic differences. I increased the minimum light level, which helps in many areas to highlight baked sidedef lighting. That still looks cool. 8-)
User avatar
Dan_The_Noob
Posts: 872
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Relighting v4.0141b - hotfix

Post by Dan_The_Noob »

alrighty seems to work alright.. is there a way to have the minimum light level come up a touch? I currently have it set to Min 0.94 just to be able to see the floor in the first room on MAP01. but i prefer the lighting of around 0.85

but 0.85 makes large rooms basically pitch black if they dont contain lights.

--EDIT--
is it possible to exclude enemies flagged with the "Renderstyle subtract" from the relighting shader? (or even just any shader not "normal")
they still have that bug where it gets all trippy and white looking.
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.0141b - hotfix

Post by Hey Doomer_ »

Dan_The_Noob wrote: Sun Nov 27, 2022 9:24 pm alrighty seems to work alright.. is there a way to have the minimum light level come up a touch? I currently have it set to Min 0.94 just to be able to see the floor in the first room on MAP01. but i prefer the lighting of around 0.85

but 0.85 makes large rooms basically pitch black if they dont contain lights.

--EDIT--
is it possible to exclude enemies flagged with the "Renderstyle subtract" from the relighting shader? (or even just any shader not "normal")
they still have that bug where it gets all trippy and white looking.
I'll look at the light levels again. The sector light level is not adjusted in many places and is generally controlled by the min values under settings. The other thing that controls lighting to a degree is colored lighting. I have puzzled over darkened areas that have not been adjusted by the mod (at least when I comment out everything that changes a light level these areas are still dark).

I noticed the white artifacts, and that is possibly the shader bleeding. That can be turned down to zero (off) which may help.


Edit

Now that I look at this again, I think I see the problem. There is a volume adjustment to lighting that makes very large sectors a bit darker, the concept being that any light dissipates into a larger area of darkness (gradient sector lighting would be interesting). This is capped per Settings but seems to be the culprit (line 909 in source). Also this controls which sectors bleed dimness. I'll look at this again.

This is altered somewhat by area calculations that are higher if there are columns and other structures or sectors within a sector. The shoelace algorithm just over measures areas in these cases. I'm still looking for a better solution. Anyway, depending on what is in the sector some will be darkened more than others. I've made allowances for some of this but still working on it. I'll need to rethink this completely more than likely. :roll:

In short the more accurate the area calculation the more accurate the lighting. It's close now but still fudgy.
User avatar
Dan_The_Noob
Posts: 872
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Relighting v4.0141b - hotfix

Post by Dan_The_Noob »

it seems like you could probably add a Minimum light level by just adding a fixed amount on the end if room is over a certain size? it really only needs to be fractions brighter overall.
enough to see the floor.
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.0141b - hotfix

Post by Hey Doomer_ »

Update

I have redone the polygon area routine (this should be a sector method). The two big problems are most of the lines are not stitched together in order or not connected to anything at all. I correct for that issue and subtract inner areas from the outer area. This is not only accurate but ensure that light switches function correctly and light sources are placed accurately.

Next I'll work on removing some of the hacks that "corrected" the lighting, which should resolve the "floor too dark" issue. I'd like to avoid an absolute minimum, because the author may well intend some sectors to remain darker than the inside of a mancubus.

Should post a hotfix for the area calculation in a few days.
Post Reply

Return to “Gameplay Mods”