Relighting v4.0141b - hotfix

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: 64
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.0b

Post by Hey Doomer_ »

mamaluigisbagel wrote: Tue Nov 01, 2022 2:35 pm I was using Lt. Typhon, and the map as I said is Vanguard.
Thanks, I'll check it out!

Edit
This is the floor reflection tags. Change the hd_postprocessor to look like this:

Code: Select all

		if (rl_CVar.rl_floor_reflections.GetBool())
		{
			for(int i = 0; i < Level.Sectors.Size(); i++)
			{
				Sector sec = Level.Sectors[i];
				int tag = 12500 + int(sec.GetTexture(FLOOR));
				AddSectorTag(i, tag);
				limits.Push(int(sec.LightLevel * rl_CVar.rl_dim_min.GetFloat()));
			}
		}

		for(int i = 0; i < Level.Sectors.Size(); i++)
		{
			Sector sec = Level.Sectors[i];
			limits.Push(int(sec.LightLevel * rl_CVar.rl_dim_min.GetFloat()));
		}
... and then disable reflections. I'll fix this for the next version. Thanks.

Edit
This will be fixed for the next version. Added a sector tag iterator to see if the tag is already used.
Cheater87
Posts: 41
Joined: Tue Oct 31, 2017 7:57 pm

Re: Relighting v4.0b

Post by Cheater87 »

Very cool mod!
User avatar
kalensar
Posts: 396
Joined: Sun Mar 21, 2021 9:40 pm
Operating System Version (Optional): linux mint 20

Re: Relighting v4.0b

Post by kalensar »

ran into a crappy bug crash

https://imgur.com/a/GRbzQuh
User avatar
Hey Doomer_
Posts: 64
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.0b

Post by Hey Doomer_ »

kalensar wrote: Sat Nov 05, 2022 9:41 am ran into a crappy bug crash

https://imgur.com/a/GRbzQuh
Thanks! See above posts regarding the floor reflection bug. Maybe one of those fixes will do the trick. I have applied these to the next beta but am working on making shadows work on 3d slopes. I'll have something other than a headache once I've sorted that out.

Also probably going to renumber all this back to pre-release, since the whole shebang is in beta and not just a few features... :roll:
User avatar
RaZZoR
Posts: 27
Joined: Sun Jan 17, 2021 2:30 pm

Re: Relighting v4.0b

Post by RaZZoR »

I tried this mod here
User avatar
kalensar
Posts: 396
Joined: Sun Mar 21, 2021 9:40 pm
Operating System Version (Optional): linux mint 20

Re: Relighting v4.0b

Post by kalensar »

Okay the *fix* That I implemented on my copy to stop the crashes was just comment out out line 29 on error message. The other main issue for performance affecting is the Dual Shahows. Turn that off or get rid of it entirely because it makes the engine perform too much math. After that it runs like smooth butter, looks as good or better than v3.31b, and even works with GL ES and PolySoft rendering!
User avatar
Hey Doomer_
Posts: 64
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.0b

Post by Hey Doomer_ »

kalensar wrote: Sat Nov 05, 2022 2:04 pm Okay the *fix* That I implemented on my copy to stop the crashes was just comment out out line 29 on error message. The other main issue for performance affecting is the Dual Shahows. Turn that off or get rid of it entirely because it makes the engine perform too much math. After that it runs like smooth butter, looks as good or better than v3.31b, and even works with GL ES and PolySoft rendering!
Good stuff to hear. I didn't try this on PolySoft yet. Dual Shadows can be turned off in Performance Settings.
thugsta
Posts: 140
Joined: Mon Jan 21, 2019 10:10 am

Re: Relighting v4.0b

Post by thugsta »

Hey Doomer_ wrote: Sat Nov 05, 2022 1:46 pm Also probably going to renumber all this back to pre-release, since the whole shebang is in beta and not just a few features... :roll:
Maybe if you want, just rename this to RelightingZ or something to differentiate it completely from the "old" version? Just a thought 😊
User avatar
Hey Doomer_
Posts: 64
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.0b

Post by Hey Doomer_ »

thugsta wrote: Sun Nov 06, 2022 12:36 am
Hey Doomer_ wrote: Sat Nov 05, 2022 1:46 pm Also probably going to renumber all this back to pre-release, since the whole shebang is in beta and not just a few features... :roll:
Maybe if you want, just rename this to RelightingZ or something to differentiate it completely from the "old" version? Just a thought 😊
Thanks. I'll probably leave it be; shadows are a new beta feature as well as universal compatibility. The basic idea hasn't changed even though the approach is different for better performance and compatibility. Also haven't decided what to do about wall textures yet. Sector colors are derived from reading flats against the last palette (so this works with a custom palette) but deciding application of dynamic lights based on wall textures is more involved across games and would degrade performance. :neutral:
thugsta
Posts: 140
Joined: Mon Jan 21, 2019 10:10 am

Re: Relighting v4.0b

Post by thugsta »

Speaking of shadows, are player and monster separated toggled? If not can it be done as the player shadow It'll be better disabled personally judging from RazzoR's video as the speed of doomguy makes it look jittery.

Maybe about wall textures some ideas for you to think about ¹) just leave it out entirely, ²) letting brightmaps be made exclusively for this or only making dynamic lights be based off the brightmaps, or ³) make separated versions having a lite/full version for the lite one to squeeze as much performance as possible. Since some people (or even maps for that matter) will play better with lite while some maps can get away with using a "full" version at no noticeable cost
User avatar
Hey Doomer_
Posts: 64
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.0b

Post by Hey Doomer_ »

thugsta wrote: Sun Nov 06, 2022 8:43 am Speaking of shadows, are player and monster separated toggled? If not can it be done as the player shadow It'll be better disabled personally judging from RazzoR's video as the speed of doomguy makes it look jittery.

Maybe about wall textures some ideas for you to think about ¹) just leave it out entirely, ²) letting brightmaps be made exclusively for this or only making dynamic lights be based off the brightmaps, or ³) make separated versions having a lite/full version for the lite one to squeeze as much performance as possible. Since some people (or even maps for that matter) will play better with lite while some maps can get away with using a "full" version at no noticeable cost
The jittery player shadow is likely due to a lifespan of 3 tics per shadow. I'll see if eliminating this for the console player improves that.

Thanks. Good suggestions!
User avatar
Hey Doomer_
Posts: 64
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.0b

Post by Hey Doomer_ »

Quick progress update. I've fixed many bugs as well as added the above changes. There is buggy support for 3d slopes using quaternions, which I gather are being added to Actor. (I'll wait on that unless someone can help me with the rotations. Online help is dismal and conflicting.)

I've added a polylabel (pole of inaccessibility) placement of light sources option. In this example, the light source is centered in the larger area of the polygon, a subtle difference from CenterSpot or centroid placement. 8-)
map01 polylabel.png
https://github.com/mapbox/polylabel

This can be used to label maps, for example, but it's also useful to find the optimal placement of a light source. The algorithm is extremely fast but does increase level load times depending on the number of sectors where light sources are placed. Still testing.
You do not have the required permissions to view the files attached to this post.
Last edited by Hey Doomer_ on Wed Nov 09, 2022 9:35 am, edited 1 time in total.
User avatar
Dan_The_Noob
Posts: 624
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support

Re: Relighting v4.0b

Post by Dan_The_Noob »

so the top post is updated? version number still shows 4.0b for me
User avatar
Hey Doomer_
Posts: 64
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.0b

Post by Hey Doomer_ »

Dan_The_Noob wrote: Wed Nov 09, 2022 5:52 am so the top post is updated? version number still shows 4.0b for me
Haven't uploaded this yet.
User avatar
Hey Doomer_
Posts: 64
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.0b

Post by Hey Doomer_ »

mamaluigisbagel wrote: Tue Nov 01, 2022 12:16 pm I noticed as soon as I started Vanguard, the sky texture was missing, and turning off Relighting restored it.

I've been looking at this. I don't know how this has anything to do with the reflection code. There are only a few tags on this map, and none of these conflict with Relighting. If I don't add tags it works, but if I remove this from MAPINFO it works also:

Code: Select all

map MAP01 "Overgrown Sepulcher"
titlepatch CWILV00
next MAP02
secretnext MAP02
music D_RUNNIN
Not sure why Relighting breaks this bad boy... :?

Return to “Gameplay Mods”