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: 448
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.0150b - sky colors

Post by Hey Doomer_ »

Dan_The_Noob wrote: Wed Jan 11, 2023 7:08 pm how do you get the sky colour? or can you read the texture colour averages somehow? because i think sky colour could help with determining how bright it would be outside. just purely based on saturation.
The mod reads an average based on the current palette and color parameters in Settings, but at this time doesn't include patched or HD sky textures. I have tried applying perceived brightness of a colored sector with mixed results since adding the color itself changes lighting. (That and most flats are boring color-wise.) However, there are calculations in the mod that use perceived brightness of color. Note this is complicated by how most perceive colors (greens, for instance, seem much brighter). But I can sure look at that again! :)

Reading textures is an interesting thought experiment I have pondered over. Colors in flats and even skies are one thing, since they are a pattern or a dominant color. It's much harder to read wall textures to guess if it's a light source. I suppose I can look for pure white, but there are yellow and blue lights as well in the game. Some textures that are bright are not intended to be light sources. So that's a big reason I've been on the fence about analyzing wall textures.
User avatar
Arcev
Posts: 8
Joined: Fri Jan 13, 2023 3:50 pm
Operating System Version (Optional): Windows 11 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: Relighting v4.0150b - sky colors

Post by Arcev »

Hello, I REALLY like how this changes the lighting to be much fuller to the potential of primitive lights in base doom.
Unfortunately, the mod tends to crash a ton using a special mod "LiTDoom" (It's a DB variant but heavily modified).
The error that goes with the crash is a exception C0000005 or something along those lines.

If it weren't for the crashing, I would be able to play through a level and really enjoy recommending the mod combination.
I ask that maybe you can help the LiTDoom community bring this mod better into spotlight more stably.
If so, I can try to help as much as I can to find setting combinations or bug fixes to help with the crashing.

LiTDoom benefits greatly from the lighting overhaul:
With relighting:
https://i.imgur.com/ipXtozm.png

Without relighting:
https://i.imgur.com/LorDYBr.png

Thanks in advance.
Last edited by Arcev on Fri Jan 13, 2023 4:26 pm, edited 1 time in total.
User avatar
Hey Doomer_
Posts: 448
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.0150b - sky colors

Post by Hey Doomer_ »

Arcev wrote: Fri Jan 13, 2023 4:23 pm Hello, I REALLY like how this changes the lighting to be much fuller to the potential of primitive lights in base doom.
Unfortunately, the mod tends to crash a ton using a special mod "LiTDoom" (It's a DB variant but heavily modified).
The error that goes with the crash is a exception C0000005 or something along those lines.

If it weren't for the crashing, I would be able to play through a level and really enjoy recommending the mod combination.
I ask that maybe you can help the LiTDoom community bring this mod better into spotlight more stably.
If so, I can try to help as much as I can to find setting combinations or bug fixes to help with the crashing.

LiTDoom benefits greatly from the lighting overhaul:
With relighting:
https://i.imgur.com/ipXtozm.png

Without relighting:
https://i.imgur.com/LorDYBr.png

Thanks in advance.
Thanks, I'll check it out. The error would help as well.
User avatar
Hey Doomer_
Posts: 448
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.0151b - smart lighting

Post by Hey Doomer_ »

Posted v4.0151b

As noted this includes optional smart lighting. At present this does a simple analysis of a map comparing sky sectors to indoor sectors and proximity of light sources. Generally, more light is added, and the lighting has more subtle effects on baked lighting. It may degrade performance, although I haven't noticed any impact.

Examples:

Before: https://i.postimg.cc/2SzCgTJ5/e3m5.png
After: https://i.postimg.cc/hjJDpjYb/e3m5-sl.png

Before: https://i.postimg.cc/4NRfQXQV/e2m5.png
After: https://i.postimg.cc/Wbm29x5K/e2m5-sl.png

Before: https://i.postimg.cc/fL6wFsn4/map01.png
After: https://i.postimg.cc/J0Z1CFMs/map01-sl.png
Another view, showing shadows behind the columns similar to e2m2: https://i.postimg.cc/CMqM8Rkw/map01-sl-2.png

Without smart lighting, most lighting effects are applied universally. Light sources are added to sectors above an arbitrary light level. If light doesn't fall on a side def it has the same shade regardless of how far away the light source is. With smart lighting map areas and light levels are used to create dynamic parameters to add light and shadow. At this point this is quite crude but nonetheless interesting.

Let me know what you think!
User avatar
Dan_The_Noob
Posts: 878
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support

Re: Relighting v4.0151b - smart lighting

Post by Dan_The_Noob »

hmm will have to try smart lighting to really see what it's doing in action.

it seems like it fixes some of the quirky lighting errors but if it introduces some potential performance issues, it might be a bit much for me to add to my already chaotic gameplay haha

just tested it on MAP01, how do i disable the random moving shadow/light sectors in relighting? with smart lighting on the pillar on the left looks like it has an invisible light spinning around it.
User avatar
Hey Doomer_
Posts: 448
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.0151b - smart lighting

Post by Hey Doomer_ »

Dan_The_Noob wrote: Sun Jan 15, 2023 4:34 pm hmm will have to try smart lighting to really see what it's doing in action.

it seems like it fixes some of the quirky lighting errors but if it introduces some potential performance issues, it might be a bit much for me to add to my already chaotic gameplay haha

just tested it on MAP01, how do i disable the random moving shadow/light sectors in relighting? with smart lighting on the pillar on the left looks like it has an invisible light spinning around it.
That is probably "ghost lights," which can be turned off in Settings. It randomly adds a light missile that travels through a level.
User avatar
Dan_The_Noob
Posts: 878
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support

Re: Relighting v4.0151b - smart lighting

Post by Dan_The_Noob »

Hey Doomer_ wrote: Sun Jan 15, 2023 5:56 pm That is probably "ghost lights," which can be turned off in Settings. It randomly adds a light missile that travels through a level.
ohhh ok, i'll try that.

I'm kind of 50-50 on the smart lighting so far. i like some of the stuff it "fixes" but then other stuff feels like it removes shadow in darker rooms.
User avatar
Arcev
Posts: 8
Joined: Fri Jan 13, 2023 3:50 pm
Operating System Version (Optional): Windows 11 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: Relighting v4.0151b - smart lighting

Post by Arcev »

Thanks, I'll check it out. The error would help as well.
I instigated a crash, I was using Unfamiliar Episodes as the map pack as its good for testing lighting environments.
I wasnt sure the best way to describe the errors but I made a crash report for you to look at, I have no idea the cause of
the crash. Its seemingly random.

Do note that however this map does crash more than the others, on other map packs this error happens. Its not isolated to
one map.

Also, I had to make a pastebin for the log since the limit is 52kb.
https://pastebin.com/1VixCkVC
You do not have the required permissions to view the files attached to this post.
User avatar
Hey Doomer_
Posts: 448
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.0151b - smart lighting

Post by Hey Doomer_ »

Arcev wrote: Sun Jan 15, 2023 6:48 pm
Thanks, I'll check it out. The error would help as well.
I instigated a crash, I was using Unfamiliar Episodes as the map pack as its good for testing lighting environments.
I wasnt sure the best way to describe the errors but I made a crash report for you to look at, I have no idea the cause of
the crash. Its seemingly random.

Do note that however this map does crash more than the others, on other map packs this error happens. Its not isolated to
one map.

Also, I had to make a pastebin for the log since the limit is 52kb.
https://pastebin.com/1VixCkVC
Thanks! I appreciate it.

Interesting. That error likely refers to referencing a shadow caster or light master that no longer exists. Unfortunately there is no exception handling in ZScript to confirm that, so I'll have to guess until I can do more testing.

LiTDoom didn't crash for me playing through Doom maps E1M1, E1M2, and E1M3. The uf map (assuming I have the correct map) generates many lights, however, which can slow things down. Another possibility is something spawns that should not generate a shadow - such as a script marker. I allow for those, but it's possible one slips through.

Shadows can be turned off or dual shadows can be turned off to reduce thinkers. Shadows iterate through all light sources and take longer with more lights. These generally don't operate out of player view and are capped in large areas. Turning shadows off didn't make a difference for me, so my guess is it's too much light.

Area min and max determines where lightsources are placed, so those sliders can be moved closer together. (Defaults are quite generous at 128 - inf.) Size and/or scale can also be reduced. There isn't an option to turn off light source dynamic lights, but size and scale of GLDEF lights or turning them off can be done for other generators. The map cited runs at single fps on my rig without changing a number of these values and turning off smart lighting.

I'll test this some more, but those are a few things to try.
User avatar
Dan_The_Noob
Posts: 878
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support

Re: Relighting v4.0151b - smart lighting

Post by Dan_The_Noob »

in 4.0151b shadows re-enabled themself player, monster, pickups regardless of settings... not sure why.
User avatar
Hey Doomer_
Posts: 448
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.0151b - smart lighting

Post by Hey Doomer_ »

Dan_The_Noob wrote: Mon Jan 16, 2023 5:20 am in 4.0151b shadows re-enabled themself player, monster, pickups regardless of settings... not sure why.
To turn off all shadows it's necessary to make sure those under "Other Shadows" are also set to off. Otherwise turning off shadows seems to work for me.
User avatar
Dan_The_Noob
Posts: 878
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support

Re: Relighting v4.0151b - smart lighting

Post by Dan_The_Noob »

Hey Doomer_ wrote: Mon Jan 16, 2023 5:51 am
Dan_The_Noob wrote: Mon Jan 16, 2023 5:20 am in 4.0151b shadows re-enabled themself player, monster, pickups regardless of settings... not sure why.
To turn off all shadows it's necessary to make sure those under "Other Shadows" are also set to off. Otherwise turning off shadows seems to work for me.
yuh for some reason non-vanilla objects like barrels, weapons etc all get stuck with shadows.
User avatar
Hey Doomer_
Posts: 448
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.0151b - smart lighting

Post by Hey Doomer_ »

Hey Doomer_ wrote: Mon Jan 16, 2023 4:32 am
Arcev wrote: Sun Jan 15, 2023 6:48 pm
Thanks, I'll check it out. The error would help as well.
I instigated a crash, I was using Unfamiliar Episodes as the map pack as its good for testing lighting environments.
I wasnt sure the best way to describe the errors but I made a crash report for you to look at, I have no idea the cause of
the crash. Its seemingly random.

Do note that however this map does crash more than the others, on other map packs this error happens. Its not isolated to
one map.

Also, I had to make a pastebin for the log since the limit is 52kb.
https://pastebin.com/1VixCkVC
Thanks! I appreciate it.

Interesting. That error likely refers to referencing a shadow caster or light master that no longer exists. Unfortunately there is no exception handling in ZScript to confirm that, so I'll have to guess until I can do more testing.

LiTDoom didn't crash for me playing through Doom maps E1M1, E1M2, and E1M3. The uf map (assuming I have the correct map) generates many lights, however, which can slow things down. Another possibility is something spawns that should not generate a shadow - such as a script marker. I allow for those, but it's possible one slips through.

Shadows can be turned off or dual shadows can be turned off to reduce thinkers. Shadows iterate through all light sources and take longer with more lights. These generally don't operate out of player view and are capped in large areas. Turning shadows off didn't make a difference for me, so my guess is it's too much light.

Area min and max determines where lightsources are placed, so those sliders can be moved closer together. (Defaults are quite generous at 128 - inf.) Size and/or scale can also be reduced. There isn't an option to turn off light source dynamic lights, but size and scale of GLDEF lights or turning them off can be done for other generators. The map cited runs at single fps on my rig without changing a number of these values and turning off smart lighting.

I'll test this some more, but those are a few things to try.
Edit
With smart lighting the uf E1M1 adds 625 light sources at default settings. Normally this is much lower. Working on a fix.
User avatar
Hey Doomer_
Posts: 448
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.0151b - smart lighting

Post by Hey Doomer_ »

Hotfix!

Smart lighting adds light sources to smaller sectors to allow for vestibules and other brightly lit areas that are smaller than skew-adjusted minimum area. However, on maps with a gazillion wee sectors this adds too many unneeded light sources even with proximity checking. I've made adjustments to this that I've posted here as a hotfix to try. So far seems to help, but still testing. Let me know!

Examples of obsidian random map - a good example of this - now getting a passable framerate:

https://i.postimg.cc/8ch8qNjD/obsidian-no-RL.png
https://i.postimg.cc/sfSRB9K8/obsidian-w-RL.png

As always many many thanks for all your support and interest! In many of these cases I've never heard of the maps used and would not have stretched the mod.

relighting v4.0151b - hotfix.pk3
You do not have the required permissions to view the files attached to this post.
User avatar
Dan_The_Noob
Posts: 878
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support

Re: Relighting v4.0151b - smart lighting

Post by Dan_The_Noob »

i'll give this a crack, also still having weird issues with settings sometimes not being read.
shadows popping on for a map, or shader not ignoring "subtract" renderstyle etc. not too sure what's up with it.

Return to “Gameplay Mods”