v2.72b partially fixes this issue by adding direction weights. It's possible to randomize this and/or add a time change as you suggest (one of my original goals for this). The idea here is weights change as game time progresses from one direction to the opposite. I didn't implement this immediately since one doesn't play a level for hours of game time, but it could be cool over the course of a game. This suggests possibilities for bright sector markers, which now don't do anything except mark sector lines and hold a few bytes of data.r&r wrote:is there a way to make the light change shadow directions automatically?
by making a fake sun or light source that slowly turns around map's location?
even tho that might be off topic?
Relighting Doom v3.31b [Updated 4/8/22]
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.
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.71b [Updated 2/12/22] - Better Light
Re: Relighting Doom v2.72b [Updated 2/13/22] - Better Light
Map02 really seems to put the mod through its paces.
The secret room beside the red key has coloured light that behaves oddly. My guess as to what is happening is that when the door is open, the red light spills out and the white light spills in. However, this creates an oddity where, while the door is open, the room that is the source of the red light looks white but the sector just outside it is a strong red colour.
The secret room beside the red key has coloured light that behaves oddly. My guess as to what is happening is that when the door is open, the red light spills out and the white light spills in. However, this creates an oddity where, while the door is open, the room that is the source of the red light looks white but the sector just outside it is a strong red colour.
-
Hey Doomer
- Posts: 283
- Joined: Sat Sep 25, 2021 3:38 am
Re: Relighting Doom v2.72b [Updated 2/13/22] - Better Light
Good catch and something I hadn't noticed. In order to transfer color from one sector to another the code sets the color gradient based on the closest sector that a sensor sees. I think what's happening here: closest is the red gate sector. The code used to only look at the closest sector to determine light level, and now it look at all available light. That is additive, but color has to be averaged, so I was trying to avoid floating point arithmetic, if that makes sense.Enjay wrote:Map02 really seems to put the mod through its paces.
The secret room beside the red key has coloured light that behaves oddly. My guess as to what is happening is that when the door is open, the red light spills out and the white light spills in. However, this creates an oddity where, while the door is open, the room that is the source of the red light looks white but the sector just outside it is a strong red colour.
However, I believe that can be optimized to avoid hitting performance too badly.
Update: just posted v2.73b with a fix for the color gradients and many other bug fixes. I'm frankly not sure how v2.72b worked at all.
- Optimized the color averaging routine to multiply by array members instead of division - it should not impact performance
- Include perceived brighter colors and average those together. That should take care of the above issue.
- Found many little bugs that made E3M6 display correctly, when in fact I just needed a check for sky. Fixed and it looks better.
-
Hey Doomer
- Posts: 283
- Joined: Sat Sep 25, 2021 3:38 am
Relighting Doom v2.74b - Preview
I debugged the shader code, added saturation and presets:
Doom
Bleak
Bright
Dark
There's also a "None" preset that doesn't do anything if you prefer to tweak the Settings menu yourself.
Update: Also playing with sector lighting options that enhances light and shadow.
E1M1 - note the shadows on ceiling and floor. The only dynamic lights are those attached to the light textures. Basically taking the color of the sector and adding slightly different lights to ceiling and floor based on the sector color. Should be released tomorrow.
Doom
Bleak
Bright
Dark
There's also a "None" preset that doesn't do anything if you prefer to tweak the Settings menu yourself.
Update: Also playing with sector lighting options that enhances light and shadow.
E1M1 - note the shadows on ceiling and floor. The only dynamic lights are those attached to the light textures. Basically taking the color of the sector and adding slightly different lights to ceiling and floor based on the sector color. Should be released tomorrow.
- RastaManGames
- Posts: 379
- Joined: Wed Mar 12, 2014 11:13 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Russian Federation, Krasnoyarsk
Re: Relighting Doom v2.73b [Updated 2/13/22] - Better Light
Tried out this mod with "Whitemare" and MAP13 gave me a funny experience:
-
Hey Doomer
- Posts: 283
- Joined: Sat Sep 25, 2021 3:38 am
Re: Relighting Doom v2.74b [Updated 2/14/22] - w/ Presets
Just posted v2.74b, which is much closer to what I want. Many bug fixes and small changes:
E1M2 - example of gradients
E1M4 - shading, color, and dynamic lights working together
E1M7 - example of dynamic and (mostly) sector lighting together
E3M5 - glows, dynamic lights, etc
MAP06 - brighter overall
MAP10 - example of volumetric dissipation of ambient light with dynamic lighting
MAP15 - good example of ambient light
I removed definitions and really didn't make special cases for these maps (with the exception of the wall texture in MAP10). More or less these are random screenshots. What you see is the result of fixing bugs, correcting equations, clamping values, etc. I didn't, for example, code "Unholy Cathedral" to look like that. This line was added to the rl_textures lump:
Many thanks to everyone for testing and offering suggestions and comments. These have been helpful. As a result I think this is the best version of Relighting yet. (It almost looks like Doom ported to Source, so it illustrates what GZDoom can do!) Let me know what you think! 
- Debugged color shader and added saturation
- Improved color blending and lighting algorithms
- Clamped many values including dynamic lights, bug fixes, blah blah blah
- Added shader presets
E1M2 - example of gradients
E1M4 - shading, color, and dynamic lights working together
E1M7 - example of dynamic and (mostly) sector lighting together
E3M5 - glows, dynamic lights, etc
MAP06 - brighter overall
MAP10 - example of volumetric dissipation of ambient light with dynamic lighting
MAP15 - good example of ambient light
I removed definitions and really didn't make special cases for these maps (with the exception of the wall texture in MAP10). More or less these are random screenshots. What you see is the result of fixing bugs, correcting equations, clamping values, etc. I didn't, for example, code "Unholy Cathedral" to look like that. This line was added to the rl_textures lump:
Code: Select all
; iguana green
GSTONE1,#667c26
-
Hey Doomer
- Posts: 283
- Joined: Sat Sep 25, 2021 3:38 am
Re: Relighting Doom v2.73b [Updated 2/13/22] - Better Light
I'm not sure what that is. v2.74b tones down dynamic lights and could help, but that looks like a sector special or existing dynamic lights messing with Relighting.RastaManGames wrote:Tried out this mod with "Whitemare" and MAP13 gave me a funny experience:
- RastaManGames
- Posts: 379
- Joined: Wed Mar 12, 2014 11:13 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Russian Federation, Krasnoyarsk
Re: Relighting Doom v2.74b [Updated 2/14/22] - w/ Presets
If you ask me, few screenshots (as example, MAP11) made it look like a something like Quake 1.Hey Doomer wrote:(It almost looks like Doom ported to Source, so it illustrates what GZDoom can do!) Let me know what you think!
There was that eerie & comfy atmosphere due to all overall ambience lighting, especially on custom levels.
What about "Whitemare" - That was "V 2.71b" and this is OK. I mean, I just like to test out custom PWADs with your mod and sometimes it can give a really brilliant views.
Re: Relighting Doom v2.74b [Updated 2/14/22] - w/ Presets
I'm still getting some red light weirdness, though in map02 at least it is less obvious.
Before (2.73b):

After (2.74b):

E1M1 with 2.74b

I assume that the red light in the doorway is coming from the overhead computer red lights somehow. But it looks odd because there are no obvious sources of red light near the door.
Overall, however, things are looking increasingly natural.
Before (2.73b):

After (2.74b):

E1M1 with 2.74b

I assume that the red light in the doorway is coming from the overhead computer red lights somehow. But it looks odd because there are no obvious sources of red light near the door.
Overall, however, things are looking increasingly natural.
-
ezedrommond
- Posts: 19
- Joined: Wed Oct 23, 2019 11:41 pm
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Argentina
Re: Relighting Doom v2.74b [Updated 2/14/22] - w/ Presets
Hi! It's me again...
Without using any mods, and loading only "relighting v2.74b.pk3", I'm getting this error text:
MAP01 - Entryway
Execution could not continue.
Compile Shader 'rl_bright.fp':
0(34) : error C1101: ambiguous overloaded function reference "clamp(float, int, float)"
(0) : gp5 float64_t clamp(float64_t, float64_t, float64_t)
(0) : float clamp(float, float, float)
0(35) : error C1101: ambiguous overloaded function reference "clamp(float, int, float)"
(0) : gp5 float64_t clamp(float64_t, float64_t, float64_t)
(0) : float clamp(float, float, float)
0(36) : error C1101: ambiguous overloaded function reference "clamp(float, int, float)"
(0) : gp5 float64_t clamp(float64_t, float64_t, float64_t)
(0) : float clamp(float, float, float)
0(40) : error C1101: ambiguous overloaded function reference "clamp(float, int, float)"
(0) : gp5 float64_t clamp(float64_t, float64_t, float64_t)
(0) : float clamp(float, float, float)
0(41) : error C1101: ambiguous overloaded function reference "clamp(float, int, float)"
(0) : gp5 float64_t clamp(float64_t, float64_t, float64_t)
(0) : float clamp(float, float, float)
0(42) : error C1101: a
Without using any mods, and loading only "relighting v2.74b.pk3", I'm getting this error text:
MAP01 - Entryway
Execution could not continue.
Compile Shader 'rl_bright.fp':
0(34) : error C1101: ambiguous overloaded function reference "clamp(float, int, float)"
(0) : gp5 float64_t clamp(float64_t, float64_t, float64_t)
(0) : float clamp(float, float, float)
0(35) : error C1101: ambiguous overloaded function reference "clamp(float, int, float)"
(0) : gp5 float64_t clamp(float64_t, float64_t, float64_t)
(0) : float clamp(float, float, float)
0(36) : error C1101: ambiguous overloaded function reference "clamp(float, int, float)"
(0) : gp5 float64_t clamp(float64_t, float64_t, float64_t)
(0) : float clamp(float, float, float)
0(40) : error C1101: ambiguous overloaded function reference "clamp(float, int, float)"
(0) : gp5 float64_t clamp(float64_t, float64_t, float64_t)
(0) : float clamp(float, float, float)
0(41) : error C1101: ambiguous overloaded function reference "clamp(float, int, float)"
(0) : gp5 float64_t clamp(float64_t, float64_t, float64_t)
(0) : float clamp(float, float, float)
0(42) : error C1101: a
- RastaManGames
- Posts: 379
- Joined: Wed Mar 12, 2014 11:13 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Russian Federation, Krasnoyarsk
Re: Relighting Doom v2.74b [Updated 2/14/22] - w/ Presets
I got this too just now...
Last edited by RastaManGames on Mon Feb 14, 2022 9:54 am, edited 1 time in total.
-
Hey Doomer
- Posts: 283
- Joined: Sat Sep 25, 2021 3:38 am
Re: Relighting Doom v2.741b [Updated 2/14/22] - w/ Presets
Ezedrommond / Rastamangames -
See if the posted hotfix resolves the issue.
Enjay,
I made a small fix although I'm uncertain at this time how to make the problem go away. Color, like light, diminishes (I had this backward in the previous version, which caused some areas of the game to be too bright) and I'm still playing around with that.
See if the posted hotfix resolves the issue.
Enjay,
I made a small fix although I'm uncertain at this time how to make the problem go away. Color, like light, diminishes (I had this backward in the previous version, which caused some areas of the game to be too bright) and I'm still playing around with that.
-
ezedrommond
- Posts: 19
- Joined: Wed Oct 23, 2019 11:41 pm
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Argentina
Re: Relighting Doom v2.741b [Updated 2/14/22] - w/ Presets
Yes! works for me now!Hey Doomer wrote:Ezedrommond / Rastamangames -
See if the posted hotfix resolves the issue.
-
Hey Doomer
- Posts: 283
- Joined: Sat Sep 25, 2021 3:38 am
Re: Relighting Doom v2.741b [Updated 2/14/22] - w/ Presets
Great! Also posted another quick fix for one of the color functions. It should look slightly better.ezedrommond wrote:Yes! works for me now!Hey Doomer wrote:Ezedrommond / Rastamangames -
See if the posted hotfix resolves the issue.thank you!
This is a small fix that doesn't always work depending on sector alignment and size, but here's the idea:
E1M7 - nukage glow bleeds onto the window
E1M7 - a more subtle example where the "dark peach" color of the lights bleeds into the vestibule stairway.
Only bright sectors generate these colors, so I'm puzzled why this sometimes doesn't work and seems to skip a sensor sector. Still working on that. Anyway, that's the reason for v2.742b!
- RastaManGames
- Posts: 379
- Joined: Wed Mar 12, 2014 11:13 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Russian Federation, Krasnoyarsk
Re: Relighting Doom v2.742b [Updated 2/14/22] - w/ Presets
Fix works for me too.
Hm... Compared to "V 2.71b" this "V 2.742b" a lot brighter (what is pro, 'cause previously too many areas was too dark).
But... I guess that entire ambience became a less "moody". I mean, several outdoor areas was with orange light ambience due to dusky skybox and now they are just bright. Not less, not more.
Can't say this is a bad thing. Just different. By the way, here is some images from NRFTW:
Hm... Compared to "V 2.71b" this "V 2.742b" a lot brighter (what is pro, 'cause previously too many areas was too dark).
But... I guess that entire ambience became a less "moody". I mean, several outdoor areas was with orange light ambience due to dusky skybox and now they are just bright. Not less, not more.
Can't say this is a bad thing. Just different. By the way, here is some images from NRFTW:
Spoiler: Groovy!



