Relighting v4.0152b - smarter lighting

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: 136
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_ »

cosmos10040 wrote: Wed Dec 07, 2022 12:02 pm Forgot to report but I received a vm abort with last three versions on drpg + drla

VM execution aborted: array access out of bounds. Negative current index = -1

Called from hd_relighting_EventHandler.WorldLoaded at relighting v4.0144b.pk3:zscript/hd_relighting.zs, line 810
]
This looks like the sector areas code.

Code: Select all

		for(int i = 0; i < secs.Size(); i++)
		{
			if (secs[i].area >= rl_Cvar.rl_sector_area_min.GetInt() && secs[i].area <= max_area) secareas.Push(secs[i].area);
		}
secareas is populated if the sector areas are between the min and max areas... Curious if this happens if you lower the min sec area... otherwise this is a possible workaround for line 810:

Code: Select all

		double min_area = rl_Cvar.rl_sector_area_min.GetInt();
		if (secareas.Size()) min_area = skewness > 1.0 ? clamp(secareas[secareas.Size() - 1] * skewness, rl_Cvar.rl_sector_area_min.GetInt(), secareas[0] * 0.25) : secareas[secareas.Size() - 1];
This should work since all the skew does is correct for maps with many small sectors.
thugsta
Posts: 147
Joined: Mon Jan 21, 2019 10:10 am

Re: Relighting v4.0144b - more accurate lights

Post by thugsta »

Out of curiosity, what happened to having a compatible version for LZ that i sent you?

On a side note, how do i go about fixing an equivalent for LZ to the errors Unknown identifier 'PPShader' and the error Unknown identifier 'Lightlevel'

Thanks, keep up the fantastic work as this is great.
cosmos10040
Posts: 85
Joined: Mon Dec 20, 2021 6:16 am
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: Relighting v4.0144b - more accurate lights

Post by cosmos10040 »

Hey Doomer_ wrote: Wed Dec 07, 2022 1:44 pm
cosmos10040 wrote: Wed Dec 07, 2022 12:02 pm Forgot to report but I received a vm abort with last three versions on drpg + drla

VM execution aborted: array access out of bounds. Negative current index = -1

Called from hd_relighting_EventHandler.WorldLoaded at relighting v4.0144b.pk3:zscript/hd_relighting.zs, line 810
]
This looks like the sector areas code.

Code: Select all

		for(int i = 0; i < secs.Size(); i++)
		{
			if (secs[i].area >= rl_Cvar.rl_sector_area_min.GetInt() && secs[i].area <= max_area) secareas.Push(secs[i].area);
		}
secareas is populated if the sector areas are between the min and max areas... Curious if this happens if you lower the min sec area... otherwise this is a possible workaround for line 810:

Code: Select all

		double min_area = rl_Cvar.rl_sector_area_min.GetInt();
		if (secareas.Size()) min_area = skewness > 1.0 ? clamp(secareas[secareas.Size() - 1] * skewness, rl_Cvar.rl_sector_area_min.GetInt(), secareas[0] * 0.25) : secareas[secareas.Size() - 1];
This should work since all the skew does is correct for maps with many small sectors.
Looks like that worked! Thanks!
User avatar
Hey Doomer_
Posts: 136
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: Wed Dec 07, 2022 2:40 pm Out of curiosity, what happened to having a compatible version for LZ that i sent you?

On a side note, how do i go about fixing an equivalent for LZ to the errors Unknown identifier 'PPShader' and the error Unknown identifier 'Lightlevel'

Thanks, keep up the fantastic work as this is great.
Holy smokes! I had forgotten about LZ, thanks for reminding me. I've been preoccupied with baked lighting issues.

PPShader is for GZDoom shaders any may just be incompatible. It sets parameters for the shader and would have to be commented out, I would guess.

I'd have to know where you're getting the "Lightlevel" error; this could be related to actors, and that map be something else that is just incompatible with LZ.
User avatar
hitmanx
Posts: 422
Joined: Sat Dec 18, 2004 4:58 am

Re: Relighting v4.0144b - more accurate lights

Post by hitmanx »

For some reason the combination of this mod and the mildoom 3 mod cause the framerate to steady plummet all the way down to single digits on map02 of doom 2.

No idea why, just thought you might like to know. Loving the mod otherwise :)
thugsta
Posts: 147
Joined: Mon Jan 21, 2019 10:10 am

Re: Relighting v4.0144b - more accurate lights

Post by thugsta »

Hey Doomer_ wrote: Wed Dec 07, 2022 3:57 pm
thugsta wrote: Wed Dec 07, 2022 2:40 pm Out of curiosity, what happened to having a compatible version for LZ that i sent you?

On a side note, how do i go about fixing an equivalent for LZ to the errors Unknown identifier 'PPShader' and the error Unknown identifier 'Lightlevel'

Thanks, keep up the fantastic work as this is great.
Holy smokes! I had forgotten about LZ, thanks for reminding me. I've been preoccupied with baked lighting issues.

PPShader is for GZDoom shaders any may just be incompatible. It sets parameters for the shader and would have to be commented out, I would guess.

I'd have to know where you're getting the "Lightlevel" error; this could be related to actors, and that map be something else that is just incompatible with LZ.
Yes i had it commented out but was hoping for a better solution that is "good enough" unfortunately

The Lightlevel error is at around 496 if i remember correct in the hd_actors.zs at the part where it has the caster.Lightlevel = int( etc. etc.
User avatar
Dan_The_Noob
Posts: 741
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support

Re: Relighting v4.0144b - more accurate lights

Post by Dan_The_Noob »

map12 is a little bit dark outside. infact it's pitch black almost. considering it's outside, maybe need a sky check or something?
User avatar
kalensar
Posts: 401
Joined: Sun Mar 21, 2021 9:40 pm
Operating System Version (Optional): linux mint 20

Re: Relighting v4.0144b - more accurate lights

Post by kalensar »

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?
You have to turn on ShadowMaps under DynamicLights section in options. It looks perfectly good.
User avatar
Hey Doomer_
Posts: 136
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: Wed Dec 07, 2022 6:23 pm
Hey Doomer_ wrote: Wed Dec 07, 2022 3:57 pm
thugsta wrote: Wed Dec 07, 2022 2:40 pm Out of curiosity, what happened to having a compatible version for LZ that i sent you?

On a side note, how do i go about fixing an equivalent for LZ to the errors Unknown identifier 'PPShader' and the error Unknown identifier 'Lightlevel'

Thanks, keep up the fantastic work as this is great.
Holy smokes! I had forgotten about LZ, thanks for reminding me. I've been preoccupied with baked lighting issues.

PPShader is for GZDoom shaders any may just be incompatible. It sets parameters for the shader and would have to be commented out, I would guess.

I'd have to know where you're getting the "Lightlevel" error; this could be related to actors, and that map be something else that is just incompatible with LZ.
Yes i had it commented out but was hoping for a better solution that is "good enough" unfortunately

The Lightlevel error is at around 496 if i remember correct in the hd_actors.zs at the part where it has the caster.Lightlevel = int( etc. etc.
That's the code that casts the actor in shadow. I don't think there's a workaround at this time other than commenting out.
User avatar
Hey Doomer_
Posts: 136
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_ »

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.
User avatar
Hey Doomer_
Posts: 136
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_ »

hitmanx wrote: Wed Dec 07, 2022 6:12 pm For some reason the combination of this mod and the mildoom 3 mod cause the framerate to steady plummet all the way down to single digits on map02 of doom 2.

No idea why, just thought you might like to know. Loving the mod otherwise :)
Interesting. I don't see that when added mildoom 3. Exactly when and where does that happen?

Thanks! :)
User avatar
hitmanx
Posts: 422
Joined: Sat Dec 18, 2004 4:58 am

Re: Relighting v4.0144b - more accurate lights

Post by hitmanx »

huh, that's odd. It's near the little jump with all the shotgunners is when it really goes down.

I do run reshade so maybe the .dll is messing with it somehow, I'll test
User avatar
Hey Doomer_
Posts: 136
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_ »

hitmanx wrote: Thu Dec 08, 2022 4:42 am huh, that's odd. It's near the little jump with all the shotgunners is when it really goes down.

I do run reshade so maybe the .dll is messing with it somehow, I'll test
Thanks, I'll check it out
thugsta
Posts: 147
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 2:49 am
thugsta wrote: Wed Dec 07, 2022 6:23 pm
Hey Doomer_ wrote: Wed Dec 07, 2022 3:57 pm

Holy smokes! I had forgotten about LZ, thanks for reminding me. I've been preoccupied with baked lighting issues.

PPShader is for GZDoom shaders any may just be incompatible. It sets parameters for the shader and would have to be commented out, I would guess.

I'd have to know where you're getting the "Lightlevel" error; this could be related to actors, and that map be something else that is just incompatible with LZ.
Yes i had it commented out but was hoping for a better solution that is "good enough" unfortunately

The Lightlevel error is at around 496 if i remember correct in the hd_actors.zs at the part where it has the caster.Lightlevel = int( etc. etc.
That's the code that casts the actor in shadow. I don't think there's a workaround at this time other than commenting out.
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
User avatar
Hey Doomer_
Posts: 136
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: 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.

Return to “Gameplay Mods”