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

WIWO 0.6.9a

Post by Hey Doomer_ »

WIWO 0.6.9a

Here is an attempt to simplify the above solution in the set_bleed_color() function. For now color is bled if adjacent to a sky sector, else a LOS is required from POI to POI. I assume that works better than CheckSight, which has a random element. Mind you this all depends on what "center" is. Works as POC.

Code: Select all

				if (secZ >= bsecZ)
				{
					if (b_secs.Find(bsec) == b_secs.Size())
					{
						b_secs.Push(bsec);

						if (sec.GetTexture(Sector.ceiling) == SkyFlatNum &&  bsec.GetTexture(Sector.ceiling) != SkyFlatNum)
						{
							set_bleed_color(bsec, shade(c, 0.2));
						}
						else
						{
							vector2 secv2, bsecv2;
							foreach (ssec : hd_sectors)
							{
								if (ssec.sec == sec.SectorNum) secv2 = ssec.cspot;
								if (ssec.sec == bsec.SectorNum) bsecv2 = ssec.cspot;
							}

							Actor p = Actor.Spawn("hd_phantom", (secv2.x, secv2.y, sec.FloorPlane.ZAtPoint(secv2) + (sec.CeilingPlane.ZAtPoint(secv2) - sec.FloorPlane.ZAtPoint(secv2)) / 2));
							if (p)
							{
								Actor pb = Actor.Spawn("hd_phantom", (bsecv2.x, bsecv2.y, bsec.FloorPlane.ZAtPoint(bsecv2) + (bsec.CeilingPlane.ZAtPoint(bsecv2) - bsec.FloorPlane.ZAtPoint(bsecv2)) / 2));
								if (pb)
								{
									p.target = pb;
									if (p.CheckIfTargetInLOS()) set_bleed_color(bsec, shade(c, 0.2));
									pb.Destroy();
								}
								p.Destroy();
							}
						}
					}

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

Progress 0.6.9a

Post by Hey Doomer_ »

Progress 0.6.9a

0.6.9
7/28 - added POI to POI LOS check for bleeding colors
7/30 - added optimization to seekwalls to break if floor or ceiling hit

The bleed function now works properly depending on geometry, using hd_phantom actors to check LOS from POI to POI (the simplest and quickest approach). Here is an example from the map above:

2022ado E3M2

As you can see the covered area is now red. It's brighter because the ceiling of white stones is interpreted as a light source.

I've also optimized the dispersion function. This scans horizontally then vertically. I added a break if a vertical trace hits floor or ceiling, since only walls are hit for light and color. This eliminates many, many line traces at some improvement in load times.

Still testing.

Release "soon."
Zaibatsu64
Posts: 19
Joined: Sun Nov 27, 2022 9:35 am

Re: ReLite

Post by Zaibatsu64 »

It looks great!

Thank you for your hard work.
User avatar
Hey Doomer_
Posts: 446
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.9a Released

Post by Hey Doomer_ »

ReLite 0.6.9a Released

Code: Select all

0.6.9
7/28 - added POI to POI LOS check for bleeding colors
7/30 - added optimization to seekwalls to break if floor or ceiling hit
7/31 - added options menu to full options menu
8/3 - added outdoor window lights
Here is an example of window lights (for testing the green puff sprites in the center of the window sectors). This adds more or less light in depending on the window size. For now these are simple windows of 4 lines.

Also fixed numerous small bugs that add extra light where expected.

Many thanks for the interest and support! Let me know what you think!
SaucepanSF
Posts: 19
Joined: Thu Dec 30, 2021 7:03 pm

Re: ReLite

Post by SaucepanSF »

Hey Doomer,

Just wanted to say how incredible this mod is. Thank you for creating it.
Zaibatsu64
Posts: 19
Joined: Sun Nov 27, 2022 9:35 am

Re: ReLite

Post by Zaibatsu64 »

Yes, it is an incredible mod and it deserves a lot more attention. Each update makes it progressively better and I'm often amazed at how good the maps can look. Hopefully some other people will provide some feedback for Hey Doomer.

I've noticed that sometimes the sky colour sectors don't always correspond with the colour of the sky texture. This can be noticed with Doom 1 megawads that have custom skies. The colour of the outdoor sky textures looks to be based on the stock sky textures rather than the custom sky texture. For example, a map in the third episode will have hellish red outdoor lighting even though the custom sky texture is blue.

There are also rare instances where the colour of the ground texture, usually a liquid texture, overrides the colour from the sky sector.

If it's not too troublesome, I'd also suggest adding a toggle for the moving lights that are used for the liquid textures, or making the effect slower and more subtle.

Thanks again for this excellent mod!
User avatar
Hey Doomer_
Posts: 446
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_ »

SaucepanSF wrote: Tue Aug 06, 2024 12:01 am Hey Doomer,

Just wanted to say how incredible this mod is. Thank you for creating it.
Thanks for commenting!
User avatar
Hey Doomer_
Posts: 446
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: Tue Aug 06, 2024 9:45 am Yes, it is an incredible mod and it deserves a lot more attention. Each update makes it progressively better and I'm often amazed at how good the maps can look. Hopefully some other people will provide some feedback for Hey Doomer.

I've noticed that sometimes the sky colour sectors don't always correspond with the colour of the sky texture. This can be noticed with Doom 1 megawads that have custom skies. The colour of the outdoor sky textures looks to be based on the stock sky textures rather than the custom sky texture. For example, a map in the third episode will have hellish red outdoor lighting even though the custom sky texture is blue.

There are also rare instances where the colour of the ground texture, usually a liquid texture, overrides the colour from the sky sector.

If it's not too troublesome, I'd also suggest adding a toggle for the moving lights that are used for the liquid textures, or making the effect slower and more subtle.

Thanks again for this excellent mod!
Thanks! I am somewhat on the fence about this mod because of ray tracing, etc. However, with those innovations the problem of light placement remains... :|

ReLite doesn't read custom textures or flats yet. As time permits I'll work on adding those that are in Doom format.

Floor flats don't change sector colors, although they do color sprites. I like the idea of more control over liquid lights. That's been on my to-do list, but I haven't gotten around to it.
Zaibatsu64
Posts: 19
Joined: Sun Nov 27, 2022 9:35 am

Re: ReLite

Post by Zaibatsu64 »

Ray tracing would definitely be interesting, particularly if it was simplified to help match the gritty pixel art style. This mod is amazing though.

The changes you've made to the bleeding colours in the latest update have had excellent results. Indoor rooms can now be flooded with the colour of the ceiling flat texture, and it looks so cool and atmospheric.

https://postimg.cc/5H0NP9Qn
User avatar
Hey Doomer_
Posts: 446
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: Wed Aug 14, 2024 1:28 pm Ray tracing would definitely be interesting, particularly if it was simplified to help match the gritty pixel art style. This mod is amazing though.

The changes you've made to the bleeding colours in the latest update have had excellent results. Indoor rooms can now be flooded with the colour of the ceiling flat texture, and it looks so cool and atmospheric.

https://postimg.cc/5H0NP9Qn
Thanks!

Interestingly ReLite works with VKDoom just fine. I suspect there's generally nothing preventing ReLite's light placement logic from placing ZDRay actors correctly for lightmap generation, although that is beyond ZScript. I would need to know more about this first. :|

Edit:

There's this as POC for ZScript: https://github.com/dpjudas/VkDoom/pull/71
User avatar
Hey Doomer_
Posts: 446
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.95a Released

Post by Hey Doomer_ »

ReLite 0.6.95a Released

Code: Select all

0.6.9.5
8/24 - added cvars for ceiling grid, platform, window, eave, fluid lights & timer for version display
8/25 - added lux criteria for ceiling spotlight, fixed ceiling grid lights
Not much this release. I have exposed cvars in Options to control various lighting effects and fixed ceiling grid lighting.
User avatar
Hey Doomer_
Posts: 446
Joined: Tue Oct 18, 2022 1:59 am
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support

WIWO 0.7.0a

Post by Hey Doomer_ »

WIWO 0.7.0a

Code: Select all

0.70
8/30 - removed ceiling lights in sectors with lighting specials & player shadow w/o shadows
8/31 - removed floor lighting for animated textures, optimized bias lighting, increased height of decorative lights
9/1 - corrected colorization & inverse square calculation, added colorization cvar
9/3 - corrected inshadow lighting of sprites
9/4 - added circular mean estimation for average colorization w/ multiple light sources
This is mostly a maintenance release that corrects existing problems, although it does add a new toggle for texture colorization to the menu.

The effects of colorization are seen here. This effect was previously too weak to be noticed among other problems. That has been changed.

A few observations on SetColorization (I am only using ModulateColor at 15 degree increments): since GLDEFS is read-only, this function is bound to hard coded definitions. I've defined this loosely by perceived brightness of a hue to avoid overpowering a texture (i.e. green and greenish hues are weakest in saturation); this is a crude approximation. Also note that like all lighting in ZScript it's all or nothing for the entire texture across a linedef; this can't be helped.

I do, however, average hues for those textures hit by two light sources of different colors as more or less described here. So far this is what I have, and it seems to work (correct me if it's wrong):

Code: Select all

double ahue = ((hue + whue) / 2 % 360) - (abs(hue - whue) > 180 ? 180 : 0);
if (ahue < 0) ahue += 360;
colorize(wall, ahue);
wall_hue[wall_index.Find(wall.index())] == ahue;
... where hue is the hue of the emitted light and whue is the hue of the texture being hit. (Note that on a wheel there are always two averages, hence checking for 180 degrees.) Still testing. :roll:

As one can see from the above I've correct numerous issues such as overly bright sprites in darkened rooms, sectors with light specials, etc. Some of these are directly a result of your input, something I value tremendously. Keep it coming!

Release? Soon. 8-)
User avatar
hitmanx
Posts: 428
Joined: Sat Dec 18, 2004 4:58 am

Re: ReLite

Post by hitmanx »

Glad this is still being worked on, it really does add so much. I do have a few questions.

Interestingly I generally find re-lite to get worse fps than relight, would you say re-lite is essentially a replacement for relight or do they just do different things? I find myself switching to relight when the performance on a certain map is too low with re-lite.

Are there any settings I can change in re-lite to improve performance?

And lastly I liked the preset options in relight, will that be coming back in re-lite? With some of the settings I'm not too sure what they're changing.

Thanks for all the work you've done on this. :)
User avatar
Hey Doomer_
Posts: 446
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_ »

hitmanx wrote: Thu Sep 05, 2024 1:52 am Glad this is still being worked on, it really does add so much. I do have a few questions.

Interestingly I generally find re-lite to get worse fps than relight, would you say re-lite is essentially a replacement for relight or do they just do different things? I find myself switching to relight when the performance on a certain map is too low with re-lite.

Are there any settings I can change in re-lite to improve performance?

And lastly I liked the preset options in relight, will that be coming back in re-lite? With some of the settings I'm not too sure what they're changing.

Thanks for all the work you've done on this. :)
The mods do different things, eventually, as I've worked on ReLite.

ReLite was originally an idea to use brightmaps instead of guessing where lights are placed based on author lighting. Along the way I fixed bugs (some of which dated to the original mod), removed all restrictions, and changed how light is dispersed. (Relighting has many restrictions on lighting depending on the size and distribution of elements, so depending on the map not every sector is lit/colored and not every sprite gets a shadow.)

Relighting bakes lights by placing a receiver on each texture to look for a light source. This is somewhat backward as one can imagine but fits the above restriction of ignoring certain sectors. ReLite does the opposite, dispersing from a light source to textures within reach based on the inverse square law. That's why it takes longer to load a complex map.

ReLite also correctly reads (bugs fixed) WAD lumps for textures, flats, and sprites in Doom format. That's why it doesn't work with Strife, etc. It doesn't read texture brightmaps with latest releases.

Shadows are improved in ReLite by breaking each map into a 3x3 grid of thinkers that greatly reduces the number of thinker iterations. There are other optimizations as well, so everything gets a shadow. I have a sense what I've done is about as good as shadows will get within engine limitations.

Performance is likely hurt by dynamic lights in ReLite. To improve this, try reducing light strength or turning them off, increasing ceiling light grid size, and turning "max light" off.

I haven't looked at presets yet.

Thanks for commenting!
User avatar
hitmanx
Posts: 428
Joined: Sat Dec 18, 2004 4:58 am

Re: ReLite

Post by hitmanx »

Thanks for the response. Relite seems much more robust, despite having fewer settings. It really is transformative on many maps. Closest we'll get to a lighting overhaul without engine changes, it's really impressive stuff.

I will try what you've suggested for some of those maps with troubling performance, thanks.

Return to “Gameplay Mods”