ReLite

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: 455
Joined: Tue Oct 18, 2022 1:59 am
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support

ReLite Progress 0.6.5a

Post by Hey Doomer_ »

Progress 0.6.5a

Code: Select all

0.6.5
11/11 - added check in minify() for no terminal block comment marker
11/13 - added fuzzy shadow maps for flats and textures
11/15 - added fuzzy dispersion patterns with directional (flattened spotlight) lighting
To echo Matt Walsh, What is a Window? I've been testing this and trying to find the best answer to that question with interesting results. While flattened spotlights are directional they still disperse light in 360 degrees around half an axis; they are essentially a point light sphere sliced in half. As such there are anomalies in areas where one side of a window has different dimensions than another. In most areas the effect looks pretty cool:

e1m2 - note the shadow on the pillar and shadows on the wall behind the pillar
e1m3
e1m2 - note the shadows toward the ceiling
e2m4
e2m4 - note the fuzzy angle of light on the tech wall

Point lights light everything in all directions equally and pass through all two-sided lines. These are now appropriately attached to decorative lighting (columns, candelabras, etc). The new directional lights cut that in half, which is crude but effective. (The light itself is marked by a puff sprite in the above test images.)

For 0.6.5 this is only light source textures. I'll add non-texture windows from much brighter to darker areas, as in the opening of E1M7's upper hallway, at some point. This will require refactoring as the idea of different lighting for windows is a quick hack. Certainly good enough for another alpha release. 8-)

Release likely tomorrow or the next day.
User avatar
PeaceKeep0r
Posts: 2
Joined: Sat Feb 22, 2020 5:52 pm
Graphics Processor: nVidia (Modern GZDoom)

Re: ReLite

Post by PeaceKeep0r »

Really loving this, pretty much a must-have in any play through I do now.

Only one weird issue I found, I am encountering a strange bug/crash. When using it with the "Heart of Demons Baron" mod (plus a good chunk of others, but unloading this fixed my issue) - any time I kill a chain gunner, I get the below crash:

https://postimg.cc/0Kmxcy19

In the above mod list I was using Project Malice monsters, but this can happen with just straight up vanilla monsters too. Is this a general incompatibility issue with your mod and Baron?

I look forward to your next release, and appreciate your help with the above if possible.
Last edited by PeaceKeep0r on Thu Nov 16, 2023 10:41 pm, edited 1 time in total.
User avatar
Hey Doomer_
Posts: 455
Joined: Tue Oct 18, 2022 1:59 am
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support

0.6.5a Released

Post by Hey Doomer_ »

0.6.5a Released

This version includes "fuzzy" directional lighting for lightboxes ("windows" with texture lighting) and minor bug fixes. The modified lighting should not affect performance.
User avatar
Hey Doomer_
Posts: 455
Joined: Tue Oct 18, 2022 1:59 am
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: ReLite

Post by Hey Doomer_ »

PeaceKeep0r wrote: Thu Nov 16, 2023 10:24 pm Really loving this, pretty much a must-have in any play through I do now.

Only one weird issue I found, I am encountering a strange bug/crash. When using it with the "Heart of Demons Baron" mod (plus a good chunk of others, but unloading this fixed my issue) - any time I kill a chain gunner, I get the below crash:

https://postimg.cc/0Kmxcy19

In the above mod list I was using Project Malice monsters, but this can happen with just straight up vanilla monsters too. Is this a general incompatibility issue with your mod and Baron?

I look forward to your next release, and appreciate your help with the above if possible.
Thanks! I appreciate it!

hd_shade is the inventory item that generates shadows for its owner, similar to Nash's original implementation of Duke3D shadows. I haven't tested this, but try adding this check:

Code: Select all

		if (Owner)
		{
			let mo = hd_shadow(Spawn("hd_shadow", Owner.POS, NO_REPLACE));
			mo.caster = Owner;
		}
		self.Destroy();
User avatar
Hey Doomer_
Posts: 455
Joined: Tue Oct 18, 2022 1:59 am
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support

ReLite WIWO 0.6.6a

Post by Hey Doomer_ »

WIWO 0.6.6a

A rather obvious addition to directional lighting is attaching these to moving platforms such as doors. Here is a proof of concept:

e1m1

This looks astonishing depending on the difference in light levels. So I'm working on that for 0.6.6.
cortes2k
Posts: 43
Joined: Mon May 15, 2023 12:13 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: ReLite WIWO 0.6.6a

Post by cortes2k »

Hey Doomer_ wrote: Sat Nov 18, 2023 5:37 am WIWO 0.6.6a

A rather obvious addition to directional lighting is attaching these to moving platforms such as doors. Here is a proof of concept:

e1m1

This looks astonishing depending on the difference in light levels. So I'm working on that for 0.6.6.
Dude... yout did it... you finally did it!!!... awesome!... looks superbe!!!
Skrell
Posts: 367
Joined: Mon Mar 25, 2013 11:47 am

Re: ReLite

Post by Skrell »

This is the NEXT level for all us old school DOOM fans!!!
User avatar
PeaceKeep0r
Posts: 2
Joined: Sat Feb 22, 2020 5:52 pm
Graphics Processor: nVidia (Modern GZDoom)

Re: ReLite

Post by PeaceKeep0r »

The code edit did the trick, thank you much!
Last edited by PeaceKeep0r on Sat Nov 18, 2023 11:05 pm, edited 1 time in total.
User avatar
Hey Doomer_
Posts: 455
Joined: Tue Oct 18, 2022 1:59 am
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support

ReLite Progress 0.6.6a

Post by Hey Doomer_ »

Progress 0.6.6a

0.6.6
11/18 - added check for null Owner in hd_shade
11/19 - added moving platform directional lights
11/19 - added correction for colorize smoothing

Platform lights are coded for doors and lifts. The size of the light is based on the difference in lighting between sectors and how bright the brightest sector is. There are likely anomalies here and there depending on geometry and light levels. This can't be helped. While the platform light isn't a point light and has direction (up or down in this case), it does disperse light in 360 degrees. Still when it works it looks cool 8-)

e1m2

This only adds a few lights and light actors and should not impact performance.

Release "soon."
User avatar
Hey Doomer_
Posts: 455
Joined: Tue Oct 18, 2022 1:59 am
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support

ReLite 0.6.6a Released

Post by Hey Doomer_ »

ReLite 0.6.6a Released

0.6.6
11/18 - added check for null Owner in hd_shade
11/19 - added moving platform directional lights
11/19 - added correction for colorize smoothing
11/20 - added non-lightbox window directional lights
11/20 - added outside light adjustment

In addition to minor bug fixes, this version includes directional lighting for moving platforms (doors and lifts) and non-lightbox windows. The latter is very noticeable in MAP14.
Zaibatsu64
Posts: 19
Joined: Sun Nov 27, 2022 9:35 am

Re: ReLite

Post by Zaibatsu64 »

Fantastic work as always. This method for lighting maps is a real accomplishment.

I've noticed an issue with the latest version. Light sources from wall textures are only fully illuminated if there is a light texture on the opposite wall. This seems to be related to the new flattened spotlights, and leads to situations where light-emitting surfaces are darker than their surroundings.

There also seems to be less light sources in general in the latest version. Certain light flats are no longer being identified as light sources, although they were in previous versions.

Lastly, the outdoor sectors often seem darker than they should be. I'm guessing this is related to the average or bias lighting.
User avatar
Hey Doomer_
Posts: 455
Joined: Tue Oct 18, 2022 1:59 am
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: ReLite

Post by Hey Doomer_ »

Zaibatsu64 wrote: Thu Nov 23, 2023 2:59 pm Fantastic work as always. This method for lighting maps is a real accomplishment.

I've noticed an issue with the latest version. Light sources from wall textures are only fully illuminated if there is a light texture on the opposite wall. This seems to be related to the new flattened spotlights, and leads to situations where light-emitting surfaces are darker than their surroundings.

There also seems to be less light sources in general in the latest version. Certain light flats are no longer being identified as light sources, although they were in previous versions.

Lastly, the outdoor sectors often seem darker than they should be. I'm guessing this is related to the average or bias lighting.
Thanks!! I appreciate the kudos.

"Light sources from wall textures are only fully illuminated if there is a light texture on the opposite wall." - do you have an example of this? Not sure I've seen that. (I am using SBrightmaps.)

The code still finds light sources according to a brightmap. If you are using bmplus_textures, however, you may see less light as some brightmaps in that mod are commented out. Comments are now ignored. Flattened spotlights are directional and won't illuminate what is behind them, flat or texture. I haven't noticed this as a problem with brightmaps, but again I'd need to see an example.

"outdoor sectors often seem darker" - this is very interesting, since this version increases outdoor sector light slightly for more window lighting. I'd need to see an example of that as well.
Zaibatsu64
Posts: 19
Joined: Sun Nov 27, 2022 9:35 am

Re: ReLite

Post by Zaibatsu64 »

Hey Doomer_ wrote: Thu Nov 23, 2023 4:30 pm
Zaibatsu64 wrote: Thu Nov 23, 2023 2:59 pm Fantastic work as always. This method for lighting maps is a real accomplishment.

I've noticed an issue with the latest version. Light sources from wall textures are only fully illuminated if there is a light texture on the opposite wall. This seems to be related to the new flattened spotlights, and leads to situations where light-emitting surfaces are darker than their surroundings.

There also seems to be less light sources in general in the latest version. Certain light flats are no longer being identified as light sources, although they were in previous versions.

Lastly, the outdoor sectors often seem darker than they should be. I'm guessing this is related to the average or bias lighting.
Thanks!! I appreciate the kudos.

"Light sources from wall textures are only fully illuminated if there is a light texture on the opposite wall." - do you have an example of this? Not sure I've seen that. (I am using SBrightmaps.)

The code still finds light sources according to a brightmap. If you are using bmplus_textures, however, you may see less light as some brightmaps in that mod are commented out. Comments are now ignored. Flattened spotlights are directional and won't illuminate what is behind them, flat or texture. I haven't noticed this as a problem with brightmaps, but again I'd need to see an example.

"outdoor sectors often seem darker" - this is very interesting, since this version increases outdoor sector light slightly for more window lighting. I'd need to see an example of that as well.
That explains it! I'd been using bmplus_textures, and was unaware that some of the brightmaps were commented out. Switching to SBrightmaps solves the issue, and looks truly phenomenal.

With regards to the outdoor sector light, a quick and easy example would be Doom 2 MAP01. The outdoor sector immediately to the left of the player when you start the map is very dark. Another example is the first map of Japanese Community Project. It only seems to affect certain maps/sky textures. Doom 1 has the appropriate brightness for outdoor sectors.
User avatar
Hey Doomer_
Posts: 455
Joined: Tue Oct 18, 2022 1:59 am
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: ReLite

Post by Hey Doomer_ »

Zaibatsu64 wrote: Fri Nov 24, 2023 12:50 am That explains it! I'd been using bmplus_textures, and was unaware that some of the brightmaps were commented out. Switching to SBrightmaps solves the issue, and looks truly phenomenal.

With regards to the outdoor sector light, a quick and easy example would be Doom 2 MAP01. The outdoor sector immediately to the left of the player when you start the map is very dark. Another example is the first map of Japanese Community Project. It only seems to affect certain maps/sky textures. Doom 1 has the appropriate brightness for outdoor sectors.
Ah. Gotcha.

Textures and flats are read and colors kept or not according to perceived brightness and other variables. The sky texture in MAP01 is a darker texture using 0.6.6 that defaults to (128, 128, 128). Criteria used date back to the first version of the function used in Relighting. I've worked on this a few times to return "pure" colors based on saturation and other ideas without success until discovering the problem was texture patch formats were incorrectly read (duh). However there is a problem with MAP01's sky and others not keeping any colors, and I settled for a neutral gray in those cases.

One idea I've tried before is recursion (recalling the function with lowered perceived brightness cutoff) for textures that don't return perceptible colors. Example from MAP01:

Code: Select all

MAP01 - Entryway

SKY1 128 128 128 perceived 128
SKY1 128 128 128 perceived 128
SKY1 128 128 128 perceived 128
SKY1 128 128 128 perceived 128
SKY1 128 128 128 perceived 128
SKY1 128 128 128 perceived 128
SKY1 128 128 128 perceived 128
SKY1 128 128 128 perceived 128
SKY1 128 128 128 perceived 128
SKY1 128 128 128 perceived 128
SKY1 139 115 91 perceived 119
TEKGREN5 255 255 143 perceived 248
LITE5 187 187 187 perceived 187
EXITDOOR 183 174 163 perceived 175
A "final" perceptible color for the sky is 139 115 91, a dim brown. (Perceived brightness is 0-255.) Lowering perceived brightness for everything tends to make all colors darker, so recursion is a possible solution.

Good pickup!
User avatar
Hey Doomer_
Posts: 455
Joined: Tue Oct 18, 2022 1:59 am
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support

ReLite WIWO 0.6.7a

Post by Hey Doomer_ »

ReLite WIWO 0.6.7a

0.6.7
11/23 - general code cleanup, minor bug fixes
11/25 - all tiers have same light level
11/26 - added fuzzy outdoor eave lighting

I've removed lights attached to door textures, because I don't have code to remove them as the doors open. Not sure about this one.

Removing limits to Side.Top and Side.Bottom tiers does cool stuff such as this:

map03

Also experimenting with adding lights to outside eaves - since increasing outside light levels negates bias lighting - noticeable here:

e1m3 - direction 1
e1m3 - direction 2

This doesn't have anything to do with brightmaps and is based on geometry. At present this is a limited test, although it happens quite often. Still testing this one, but that's the idea anyway.

Some of the bugs I've fixed are significant. For example, the shade function has been corrected to modify the luminosity (V) of HSV and convert back to RGB. I'm not sure how often this is noticeable, but it is now accurate. In cleaning up code I found a number of such problems.
Post Reply

Return to “Gameplay Mods”