Relighting Doom v3.31b [Updated 4/8/22]

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.
Hey Doomer
Posts: 283
Joined: Sat Sep 25, 2021 3:38 am

Re: Relighting Doom v2.54b [Updated 2/5/22]

Post by Hey Doomer »

ezedrommond wrote:I'm getting an error when loading this mod with the latest version of LitDoom. This error wasn't there in Relighting v.2.53b.

OK I'll check that out. In the meantime you can disable dark shadows...

Update: I think I have a fix for this, although I don't see this error for some reason. Still revisiting HS geometry. 8-)
Hey Doomer
Posts: 283
Joined: Sat Sep 25, 2021 3:38 am

Re: Relighting Doom v2.542b [Updated 2/5/22]

Post by Hey Doomer »

OK I posted a quick fix for the ShadowActor error. Also reworked the compass code to match the orientation of the map after revisiting HS geometry again. The previous code relied on a sector CenterSpot, which is based on the blockmap and not necessarily on the back side of a line, so then this is a problem of finding the third point of a triangle on either side of the line. Tested OK in the courtyard of E1M4. 8-)
ezedrommond
Posts: 19
Joined: Wed Oct 23, 2019 11:41 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Argentina

Re: Relighting Doom v2.542b [Updated 2/5/22]

Post by ezedrommond »

Same load order, I activate dark shadows, and this happens:

Hey Doomer
Posts: 283
Joined: Sat Sep 25, 2021 3:38 am

Re: Relighting Doom v2.542b [Updated 2/5/22]

Post by Hey Doomer »

ezedrommond wrote:Same load order, I activate dark shadows, and this happens:

OK, I see where that is. Fix shortly.

Update: done
Hey Doomer
Posts: 283
Joined: Sat Sep 25, 2021 3:38 am

Re: Relighting Doom v2.543b [Updated 2/5/22] - Screenshots!

Post by Hey Doomer »

I've fixed the light gradient function and added in a color gradient (color = light!) with some interesting results for the next release.

Here's E4M1, a good example of applying a color gradient. Light sources now affect color as a function of distance the same as light.

Here's E1M1, another example of color gradients (the sector "color" is white - all colors). The flickering dynamic lights look quite realistic.

Here's E1M5 with no other changes other than adding this color gradient. This illustrates the importance of color and light, I think. All this has done is apply the same gradient function to the original color so that sector light and color change at the same time with remarkable effect.

These gradients are precalculated so there is no performance hit.

Update: v2.55b posted.
ezedrommond
Posts: 19
Joined: Wed Oct 23, 2019 11:41 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Argentina

Re: Relighting Doom v2.55b [Updated 2/6/22] - Light & Color

Post by ezedrommond »

I'm still getting errors.

At first I thought it was because I was using version 4.7.0 of gzdoom, so I upgraded to 4.7.1... but it's still there. I think that the new code simply won't work with LitDoom. Still... this is one of the greatest mods ever made. Thank you for putting your time and effort into doing this! :rock:
Hey Doomer
Posts: 283
Joined: Sat Sep 25, 2021 3:38 am

Re: Relighting Doom v2.551b [Updated 2/6/22] - Light & Color

Post by Hey Doomer »

Quick update posted with a bug fix in the dynamic light code. This amounted to a fudge factor to compensate for the light code. Now the light code works properly. What this bug fix does is make window lights considerably stronger than non-window lights and increase both overall. The results are so dramatic I wanted to post it immediately. Here are screenshots:

E1M1
E1M4
E1M2
MAP16

There are more shadows and areas of subtle light in this update. Let me know what you think!

A few things to keep in mind:
Directional light is in play, for example, in E1M1 and MAP16 where light is coming in from the West. This effect is much more noticeable with this bug fix. However, the number of dynamic lights and their strength is not baked into anything. Everything and anything can be changed by either tweaking Settings, changing text lumps in the pk3, or both. I've just chosen textures and colors that I think look good.

Update:

Sun from the West and from the North.
Last edited by Hey Doomer on Sun Feb 06, 2022 12:28 pm, edited 2 times in total.
Hey Doomer
Posts: 283
Joined: Sat Sep 25, 2021 3:38 am

Re: Relighting Doom v2.55b [Updated 2/6/22] - Light & Color

Post by Hey Doomer »

ezedrommond wrote:I'm still getting errors.
At first I thought it was because I was using version 4.7.0 of gzdoom, so I upgraded to 4.7.1... but it's still there. I think that the new code simply won't work with LitDoom. Still... this is one of the greatest mods ever made. Thank you for putting your time and effort into doing this! :rock:
Lol. Missed that, although I'm not seeing that error.

The problem is this in relighting_actors.zs:

Code: Select all

			if (self.master.health <= 0)
The idea is to remove the shadow if whatever it's attached to dies. This might fix it, I think, if you are feeling adventuresome:

Code: Select all

			if (self.master)
			{
				if (self.master.health <= 0)
				{
					self.destroy();
				}
			}
I will have that fixed by the next update. 8-)
Ozymades
Posts: 21
Joined: Thu Dec 10, 2020 4:37 am
Graphics Processor: nVidia (Modern GZDoom)

Re: Relighting Doom v2.551b [Updated 2/6/22] - Light & Color

Post by Ozymades »

Hey, I was using the mod with a couple of other mods in WMD and it produced the error in the screenshot.
Here's my combo from WMD:

Code: Select all

    <Wadpack name="Mars War v3.01 vs. Brutal CoD-BW v2.6" srcPrt="D:\Spiele\Doom\Sourceports\GZDoom v4.7.1\gzdoom.exe">
      <Wad loadorder="0">\Maps\Mars War v3.01.WAD</Wad>
      <Wad loadorder="2">\AddOns\relighting v2.54b.pk3</Wad>
      <Wad loadorder="1">\Gameplay\CODBW_v2.6_FileA_Brutal.pk3</Wad>
      <Wad loadorder="2">\Gameplay\CODBW_v2.6_FileB_HD.pk3</Wad>
      <Wad loadorder="3">\Gameplay\CODBW_v2.6_ExtraWeapons_LW.pk3</Wad>
      <Wad loadorder="4">\Gameplay\CODBW_v2.6_ExtraWeapons_HDPatch.pk3</Wad>
      <Wad loadorder="0">\AddOns\HITMARKERS_V1.14.PK3</Wad>
      <Wad loadorder="0">\AddOns\gearbox-v0.7.0.pk3</Wad>
      <Wad loadorder="0">\Textures\zdoom-dhtp-20180514.pk3</Wad>
      <Wad loadorder="1">\Textures\(Z)-All_LiquidsGlow.pk3</Wad>
    </Wadpack>
When relighting.pk3 was in load order 0, the first level didn't even start, with the same error. Then in load order 2 it started the level, but crashed with the error in the screenshot.
Attachments
Screenshot_Doom_20220205_234014_scaled_down.jpg
Ozymades
Posts: 21
Joined: Thu Dec 10, 2020 4:37 am
Graphics Processor: nVidia (Modern GZDoom)

Re: Relighting Doom v2.551b [Updated 2/6/22] - Light & Color

Post by Ozymades »

Okay, I tried the same combo with v2.551b, same error. The error does not occur with dark shadows turned off.
Hey Doomer
Posts: 283
Joined: Sat Sep 25, 2021 3:38 am

Re: Relighting Doom v2.551b [Updated 2/6/22] - Light & Color

Post by Hey Doomer »

Ozymades wrote:Okay, I tried the same combo with v2.551b, same error. The error does not occur with dark shadows turned off.
See my reply to ezedrommond. I'm not sure why you are getting this error, since I haven't seen it. However, there is a fix that I should have applied for the next release.
Ozymades
Posts: 21
Joined: Thu Dec 10, 2020 4:37 am
Graphics Processor: nVidia (Modern GZDoom)

Re: Relighting Doom v2.551b [Updated 2/6/22] - Light & Color

Post by Ozymades »

Okay, I replaced the code with the one you posted, the error doesn't happen for me anymore.
User avatar
wran
Posts: 57
Joined: Sun Oct 04, 2020 6:43 pm

Re: Relighting Doom v2.551b [Updated 2/6/22] - Light & Color

Post by wran »

Just wanted to quickly chime in and say this mod is excellent.
Ozymades
Posts: 21
Joined: Thu Dec 10, 2020 4:37 am
Graphics Processor: nVidia (Modern GZDoom)

Re: Relighting Doom v2.551b [Updated 2/6/22] - Light & Color

Post by Ozymades »

I have to agree on that, I forgot to mention this on my posts. It creates such a good atmosphere, especially on the good ol' Doom 1+2 maps.
Could the error be created by the way map makers do lighting in their maps?
Because the error never happened on the regular Doom maps. Or maps of chaos, I also tried that. Only on the Mars Wars v3.01 WAD.
But I don't know anything about mapping, so I don't know if that is even a thing...
Hey Doomer
Posts: 283
Joined: Sat Sep 25, 2021 3:38 am

Re: Relighting Doom v2.6b [Updated 2/7/22] - Light & Color

Post by Hey Doomer »

Just posted v2.6b with a few changes to dynamic lights.
  • Fixed the ShadowActor bug
  • Added different strengths for "sky" windows, indoor windows, and texture-attached dynamic lights
  • Added a logarithmic light strength scale e.g. 0.4 is higher compared to 0.3 than 0.3 is to 0.2
Most of this is stuff I meant to get to or saw at one point or another and added fudge instead to make something else taste better. All dynamic lights are now sector lights. Finally, I've added further adjustments to sector lighting depending on how many and what kind of dynamic lights are added.

This has created some surprising effects, even in "bright" sectors without light sensors. Examples of the new and improved lighting:

MAP11 - a good example of everything working together (still reminds me of nighttime miniature golf!)
E1M3 - an example of adjusted sector lighting after dynamic lights are added to the right
MAP05 - sector lighting (these colors were pointlights in previous versions)
E2M3 - another example of dynamic lights adjusting the sector lighting, this time in a "bright" sector

Amazing. Again I emphasize there is no exception programming - with less fudge - and everything is just based on text lump definitions. A few changes can completely transform an area. (Try commenting out a definition, reopen the map, and see what happens.) I've just chosen what looks good to me for the Doom textures, but don't let that influence your opinion of the mod. It can easily be customized to work with any map or game, even with custom textures.

Performance should be better with this version. Many dynamic lights were overpowered, and while there are still areas of performance hits, dynamic lights have been drastically reduced to be in line with the strength scale. Tastes great, less chewing.

Thanks for your interest and comments. Let me know what you think!
Post Reply

Return to “Gameplay Mods”