Thanks! Much appreciated.Keldyn wrote: ↑Sun Dec 25, 2022 7:28 pm I just wanted to thank you for the work you are doing on this. I acknowledge what an immense task it must be and you should know we are grateful. It has made a tremendous difference to the look and feel of DOOM and it has honestly, never looked better. Cheers!
Relighting v4.0165b - blurry shadows w/ rlassets
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.
-
- 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.0148b - improved lighting
-
- 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.0148b - improved lighting
I noticed that. I'll try to include an exception for that! ThanksRyantch wrote: ↑Tue Dec 27, 2022 7:34 pm This looks amazing, but when playing brutal doom; the destructible lights don't *actually* go away, there's just an invisible light source giving off light in the area. It usually happens when I have solid shadows turned on. [which makes the game look better, for sure.] I tried to see if it was dynamic sectors or ghost lights but those didn't effect it. Just kinda bothers me a lil bit but it's definitely not a big deal.
Keep up the good work!
-
- 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.0148b - improved lighting
WIWO for v4.0149b
This should be more compatible with BD & variants, but there may still be crashes. Cool in an over-the-top way as it is, BD is a coding abomination. However, these changes should improve performance overall.
Much of the above involves checking for a sprite that can cast a shadow either on Spawn or PostBeginPlay. There are many Actors that use the dummy sprite TNT1, note. So it's possible with the upcoming version that things that should have a shadow do not have a shadow. (BD corpses for one.) I'm still working on that, but for most vanilla play this works as expected.
This is pretty rough but enough of an incremental improvement to generate a release possibly tomorrow.
I can't adequately express my thanks at sharing this work and having it appreciated. Obviously I think it enhances the game, but it's a hoot to know there are others out there who share this opinion! I hope that you enjoy what this adds to the game. I've understated the shadows, for example, but this and nearly everything else can be changed in Settings. I don't have Strife, but I do have Heretic and Hexen, and it looks great in those games. Many thanks. I appreciate the kudos and feedback!!
Code: Select all
v4.0149b
12/23 - added check for spawned things that should not generate a shadow or light (optimize)
12/23 - added check for Death state to remove hdlight
12/28 - added checks for master/caster/AAPTR_MASTER (BD & variants)
Much of the above involves checking for a sprite that can cast a shadow either on Spawn or PostBeginPlay. There are many Actors that use the dummy sprite TNT1, note. So it's possible with the upcoming version that things that should have a shadow do not have a shadow. (BD corpses for one.) I'm still working on that, but for most vanilla play this works as expected.
This is pretty rough but enough of an incremental improvement to generate a release possibly tomorrow.
I can't adequately express my thanks at sharing this work and having it appreciated. Obviously I think it enhances the game, but it's a hoot to know there are others out there who share this opinion! I hope that you enjoy what this adds to the game. I've understated the shadows, for example, but this and nearly everything else can be changed in Settings. I don't have Strife, but I do have Heretic and Hexen, and it looks great in those games. Many thanks. I appreciate the kudos and feedback!!
-
- 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.0149b - optimizations
Posted v4.0149b
As noted this is a maintenance release with optimizations and some corrections. Additionally I've added allowances for very large maps. I think this works well with BD & variants, but I haven't tested extensively. Added a check to make sure the player flashlight doesn't cast a player shadow.
There are no new features and these changes should improve performance.
As noted this is a maintenance release with optimizations and some corrections. Additionally I've added allowances for very large maps. I think this works well with BD & variants, but I haven't tested extensively. Added a check to make sure the player flashlight doesn't cast a player shadow.
There are no new features and these changes should improve performance.
-
- Posts: 19
- Joined: Sun Nov 27, 2022 9:35 am
Re: Relighting v4.0149b - optimizations
Thanks for your continued work on this mod Hey Doomer. It's a fantastic mod and it's improving with every release.
I've been able to tweak the settings to my liking. Setting the perceived lighting to a very low level and the RGB sliders to about 100 yields pleasing results. The sectors get nicely tinted with the colour of the flats and it adds so much atmosphere. It's been fun revisiting old mapsets with this mod enabled.
I think it would look great if the sky textures also affected the colour of sectors. I've tried taking a look at the code to make changes to achieve this, but haven't been successful so far. At the moment, any sky sectors seem to be full bright without any colour tint at all. I wonder if it would be possible to have a menu option for this.
I've been able to tweak the settings to my liking. Setting the perceived lighting to a very low level and the RGB sliders to about 100 yields pleasing results. The sectors get nicely tinted with the colour of the flats and it adds so much atmosphere. It's been fun revisiting old mapsets with this mod enabled.
I think it would look great if the sky textures also affected the colour of sectors. I've tried taking a look at the code to make changes to achieve this, but haven't been successful so far. At the moment, any sky sectors seem to be full bright without any colour tint at all. I wonder if it would be possible to have a menu option for this.
-
- 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.0149b - optimizations
Thanks! Great to hear. I've been thinking about setting presets for different games, moods, etc. Heretic and Doom, for example, are quite different in look and feel.Zaibatsu64 wrote: ↑Sat Dec 31, 2022 6:24 am Thanks for your continued work on this mod Hey Doomer. It's a fantastic mod and it's improving with every release.
I've been able to tweak the settings to my liking. Setting the perceived lighting to a very low level and the RGB sliders to about 100 yields pleasing results. The sectors get nicely tinted with the colour of the flats and it adds so much atmosphere. It's been fun revisiting old mapsets with this mod enabled.
I think it would look great if the sky textures also affected the colour of sectors. I've tried taking a look at the code to make changes to achieve this, but haven't been successful so far. At the moment, any sky sectors seem to be full bright without any colour tint at all. I wonder if it would be possible to have a menu option for this.
Sky textures are not flats and somewhat more involved to analyze. You are correct that sky sectors are not colored. I abandoned color bleeding in sky sectors because of some weird results.
I've been on the fence about reading textures at all - there are far more textures than flats in any one level - but I'll check into sky textures again.
-
- Posts: 362
- Joined: Mon Mar 25, 2013 11:47 am
Re: Relighting v4.0149b - optimizations
Does anyone have a recommended sector light mode to use with relighting? From what I can tell, most of the lighting is still coming from the default maps instead of allowing relighting to create a more dramatic effect? Perhaps I need to "ramp up" relighting more somehow?
-
- Posts: 878
- Joined: Tue May 07, 2019 12:24 pm
- Graphics Processor: nVidia with Vulkan support
Re: Relighting v4.0149b - optimizations
I use the "Doom" sector light mode. and toward bottom of the relighting settings I have "*Area min" at 250 and "*min" at 150Skrell wrote: ↑Sun Jan 01, 2023 2:48 pm Does anyone have a recommended sector light mode to use with relighting? From what I can tell, most of the lighting is still coming from the default maps instead of allowing relighting to create a more dramatic effect? Perhaps I need to "ramp up" relighting more somehow?
-
- 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.0149b - optimizations
Thanks for the interest!Skrell wrote: ↑Sun Jan 01, 2023 2:48 pm Does anyone have a recommended sector light mode to use with relighting? From what I can tell, most of the lighting is still coming from the default maps instead of allowing relighting to create a more dramatic effect? Perhaps I need to "ramp up" relighting more somehow?
FYI I have written this using "Dark" with the standard palette. You're correct that most lighting is coming from map definitions. This is to preserve author lighting and specials as much as possible and to avoid defining thousands of textures. Thus it can be universally applied. It should work the same in Doom, Heretic, Hexen, Strife, etc.
However, almost every Setting affects lighting in one way or another (in addition to what DtN mentioned): each section has a light size and scale that can be tweaked (defaults are quite low for performance reasons); min and max sprite size controls what does and doesn't cast a shadow; "Colored Sectors" controls how flats are interpreted, how their colors are applied, and how these colors bleed across sectors; under "Sector Lights" "Min" affects how dark sectors will become; Sidedef Add and Sub lights affect baked lighting. Etc.
Unfortunately that's up to you to experiment with if you have patience. I haven't widely experimented with it myself and haven't gotten around to writing documentation for the Settings or creating presets. I've largely tweaked the defaults for performance and demonstration of what it does.
Hope that helps.
-
- Posts: 362
- Joined: Mon Mar 25, 2013 11:47 am
Re: Relighting v4.0149b - optimizations
Thank you so much for the official response! This mod is truly amazing and I'd gladly donate if you're accepting them somewhere?Hey Doomer_ wrote: ↑Sun Jan 01, 2023 4:29 pmThanks for the interest!Skrell wrote: ↑Sun Jan 01, 2023 2:48 pm Does anyone have a recommended sector light mode to use with relighting? From what I can tell, most of the lighting is still coming from the default maps instead of allowing relighting to create a more dramatic effect? Perhaps I need to "ramp up" relighting more somehow?
FYI I have written this using "Dark" with the standard palette. You're correct that most lighting is coming from map definitions. This is to preserve author lighting and specials as much as possible and to avoid defining thousands of textures. Thus it can be universally applied. It should work the same in Doom, Heretic, Hexen, Strife, etc.
However, almost every Setting affects lighting in one way or another (in addition to what DtN mentioned): each section has a light size and scale that can be tweaked (defaults are quite low for performance reasons); min and max sprite size controls what does and doesn't cast a shadow; "Colored Sectors" controls how flats are interpreted, how their colors are applied, and how these colors bleed across sectors; under "Sector Lights" "Min" affects how dark sectors will become; Sidedef Add and Sub lights affect baked lighting. Etc.
Unfortunately that's up to you to experiment with if you have patience. I haven't widely experimented with it myself and haven't gotten around to writing documentation for the Settings or creating presets. I've largely tweaked the defaults for performance and demonstration of what it does.
Hope that helps.
-
- 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.0149b - optimizations
WIWO for v4.0150b
BD & variant optimizations removed shadows for some solid objects. This is the line to change in hd_relighting.zs (adding !e.thing.bSolid):
The other visual change is reading sky textures and extracting colors similar to flats. I haven't tested this with Hexen, which allows for two sky textures, and this only works with original formatting similar to flats. A map or mod that uses ONLY .png textures, for example, may yield different results. A few examples:
https://i.postimg.cc/SRCQQLw6/e1m1.png
https://i.postimg.cc/rpfK7Jkz/e3m1.png
https://i.postimg.cc/Y2hX9rby/e4m1.png
https://i.postimg.cc/Cx63tB2S/map22.png
https://i.postimg.cc/x8CGWChV/Screensho ... 103651.png
As with flats, these parameters can be changed in Settings to yield different effects.
Edit
Geometry shadows are possible as this crude POC shows:
If you look carefully you can see the shadow cast from an explosive barrel spawned inside the column. The idea is to create a floating actor with a rectangular sprite, scale and shape the actor to fit inside a column (or whatever), and then spawn it inside the geometry. Shadows otherwise work the same.
This should work since all Doom engine geometry is rectangular.
Code: Select all
v4.0150b
1/2 - corrected shadows for solid objects e.g. trees
1/2 - added sky colors for outside sectors
Code: Select all
else if (ilobj == lobj.Size() && !e.thing.bCorpse && !e.thing.bMissile && !e.thing.bIsMonster && !isFlashlight && !(e.thing is "Inventory") && cname != "hdlightsource"
&& e.thing != players[consoleplayer].mo && !e.thing.bSolid)
{
return;
}
https://i.postimg.cc/SRCQQLw6/e1m1.png
https://i.postimg.cc/rpfK7Jkz/e3m1.png
https://i.postimg.cc/Y2hX9rby/e4m1.png
https://i.postimg.cc/Cx63tB2S/map22.png
https://i.postimg.cc/x8CGWChV/Screensho ... 103651.png
As with flats, these parameters can be changed in Settings to yield different effects.
Edit
Geometry shadows are possible as this crude POC shows:
If you look carefully you can see the shadow cast from an explosive barrel spawned inside the column. The idea is to create a floating actor with a rectangular sprite, scale and shape the actor to fit inside a column (or whatever), and then spawn it inside the geometry. Shadows otherwise work the same.
This should work since all Doom engine geometry is rectangular.
You do not have the required permissions to view the files attached to this post.
Last edited by Hey Doomer_ on Mon Jan 02, 2023 2:44 pm, edited 1 time in total.
-
- Posts: 248
- Joined: Sat Jun 22, 2019 9:12 am
- Graphics Processor: Intel (Modern GZDoom)
- Location: Gone.
Re: Relighting v4.0149b - optimizations
Can the same be done with fog? I always wanted a sort of universal skyfog thingy (I kinda like fog lol), Saegiru's has fog but it can only have 1 color/random color that may not even match the sky above...The other visual change is reading sky textures and extracting colors similar to flats. I haven't tested this with Hexen, which allows for two sky textures, and this only works with original formatting similar to flats. A map or mod that uses ONLY .png textures, for example, may yield different results. A few examples:
-
- Posts: 878
- Joined: Tue May 07, 2019 12:24 pm
- Graphics Processor: nVidia with Vulkan support
Re: Relighting v4.0149b - optimizations
maybe make the sky texture bleed less saturated?
something like 30% saturation (or have a separate slider specifically for sky bleed)
something like 30% saturation (or have a separate slider specifically for sky bleed)
-
- Posts: 19
- Joined: Sun Nov 27, 2022 9:35 am
Re: Relighting v4.0149b - optimizations
This looks great. Can't wait to test out the new sky texture feature!
-
- 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
Posted v4.0150b
A wee update with changes as noted above. Note that sky colors do not work with TNT or Plutonia; in those maps sky textures are made of patches. I've added code to read the texture as a single patch at this time. The effect has also been toned down from the above screenshots, since tweaking color Settings can probably achieve a similar effect.
Still broken are shadows on 3d slopes, although I see that quaternions (which probably are not necessary) have been added to the latest GZDoom build. Otherwise AFAIK FLATSPRITE z-sorting is still broken.
A wee update with changes as noted above. Note that sky colors do not work with TNT or Plutonia; in those maps sky textures are made of patches. I've added code to read the texture as a single patch at this time. The effect has also been toned down from the above screenshots, since tweaking color Settings can probably achieve a similar effect.
Still broken are shadows on 3d slopes, although I see that quaternions (which probably are not necessary) have been added to the latest GZDoom build. Otherwise AFAIK FLATSPRITE z-sorting is still broken.