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
AFADoomer
Posts: 1337
Joined: Tue Jul 15, 2003 4:18 pm

Re: ReLite

Post by AFADoomer »

Are you open to allowing others to use some of your code in other mods? If so, under what terms?

I'm particularly interested in your PNG parser (hd_png.zs).
User avatar
Hey Doomer_
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: ReLite

Post by Hey Doomer_ »

AFADoomer wrote: Sun Jan 14, 2024 6:03 pm Are you open to allowing others to use some of your code in other mods? If so, under what terms?

I'm particularly interested in your PNG parser (hd_png.zs).
Absolutely. Just give me a credit. The PNG code is currently OK for grayscale brightmaps, but I haven't done much else with it. It still needs work.
User avatar
AFADoomer
Posts: 1337
Joined: Tue Jul 15, 2003 4:18 pm

Re: ReLite

Post by AFADoomer »

Hey Doomer_ wrote: Sun Jan 14, 2024 6:39 pm
AFADoomer wrote: Sun Jan 14, 2024 6:03 pm Are you open to allowing others to use some of your code in other mods? If so, under what terms?

I'm particularly interested in your PNG parser (hd_png.zs).
Absolutely. Just give me a credit. The PNG code is currently OK for grayscale brightmaps, but I haven't done much else with it. It still needs work.
Thanks, and will do! Yeah, I noticed it wasn't 100% - but getting the average color of an 8-bit PNG is good enough for what I need.
DarkkOne
Posts: 274
Joined: Mon Jun 06, 2016 11:26 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Widnows 11
Graphics Processor: nVidia with Vulkan support

Re: ReLite

Post by DarkkOne »

Just out of the box, the first map in Hexen is really dark. Not "broken dark" or anything, but just... very, very dark. Are there settings I should be tweaking? I don't even see a settings menu for this mod...
User avatar
Hey Doomer_
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: ReLite

Post by Hey Doomer_ »

Relite options are under "options."

You're correct, it is very dark in Hexen. There are few options, and I never tested this with Hexen. :(

I keep debating to work on Relighting again (fixing all the bugs that are repaired in ReLite) or ReLite. Have not decided.
DarkkOne
Posts: 274
Joined: Mon Jun 06, 2016 11:26 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Widnows 11
Graphics Processor: nVidia with Vulkan support

Re: ReLite

Post by DarkkOne »

Honestly, I quite like them both. I feel like ReLite has a better look but is very "either it looks great, or it doesn't work too well at all" and there's not much in between, while Relighting feels generally more consistent (other than that weird subtractive lighting bug I keep experiencing in Hexen).
cosmos10040
Posts: 193
Joined: Mon Dec 20, 2021 6:16 am
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: ReLite

Post by cosmos10040 »

Hey Doomer_ wrote: Sat May 11, 2024 12:17 pm Relite options are under "options."

You're correct, it is very dark in Hexen. There are few options, and I never tested this with Hexen. :(

I keep debating to work on Relighting again (fixing all the bugs that are repaired in ReLite) or ReLite. Have not decided.
They are both good, but relighting had a lot of options to tinker with, if updating relighting with the fixes for relite that be great, or add those relighting options for relite.
User avatar
Hey Doomer_
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: ReLite

Post by Hey Doomer_ »

cosmos10040 wrote: Fri May 17, 2024 9:16 am
Hey Doomer_ wrote: Sat May 11, 2024 12:17 pm Relite options are under "options."

You're correct, it is very dark in Hexen. There are few options, and I never tested this with Hexen. :(

I keep debating to work on Relighting again (fixing all the bugs that are repaired in ReLite) or ReLite. Have not decided.
They are both good, but relighting had a lot of options to tinker with, if updating relighting with the fixes for relite that be great, or add those relighting options for relite.
I appreciate those kind words! I don't plan to work on Relighting. I am considering tweaking ReLite to find "lights" based on a simple kind of color and pattern recognition. (Texture brightmaps, which are easy enough to create, are nonetheless unique to Doom textures.) You are right there aren't many ReLite options lol. Pondering that.

No idea what else people want to see in ReLite, which was designed to remove Relighting sector-based limitations, optimize shadows, etc. It lacks reflections, shaders, and many options...
cosmos10040
Posts: 193
Joined: Mon Dec 20, 2021 6:16 am
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: ReLite

Post by cosmos10040 »

I like to be able to use it in bigger maps, currently the bigger maps take too long to load maybe its loading too much at the same time? I was using a training map (eldrich) that had a lot of weapons in one of the rooms and it slowed to a crawl once i entered the weapons room, maybe a setting to prevent extreme slowdowns in those situations? Also improved shadows with voxels? Seems the shadows on voxels are on top of the voxels and not behind them on the floor.

I have an idea, could be an option
Maybe relite but just character and prop shadows lol so basically sprite shadows mod but without the lighting, it would be handy in bigger maps or devices lacking power like older mobile devices.
User avatar
Hey Doomer_
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: ReLite

Post by Hey Doomer_ »

cosmos10040 wrote: Wed May 22, 2024 8:07 am I like to be able to use it in bigger maps, currently the bigger maps take too long to load maybe its loading too much at the same time? I was using a training map (eldrich) that had a lot of weapons in one of the rooms and it slowed to a crawl once i entered the weapons room, maybe a setting to prevent extreme slowdowns in those situations? Also improved shadows with voxels? Seems the shadows on voxels are on top of the voxels and not behind them on the floor.

I have an idea, could be an option
Maybe relite but just character and prop shadows lol so basically sprite shadows mod but without the lighting, it would be handy in bigger maps or devices lacking power like older mobile devices.
Bigger maps take longer to load because light is cast on each wall from each light source. This will slow down loading on maps with many little sectors used for whatever. However I'm sure that can be optimized. Relighting is faster simply because it ignores smaller sectors. The bigger the map and more variation in sector size, the more Relighting ignores.

Voxels can't cast shadows. For voxels based on sprite animations sprite shadows based on those animations can be added. These have to be created in advance and called something different. That's what the included Python utility does. Other than that the mod should avoid voxel shadows, depending...

Thanks for your comments and suggestions!

A shadows only option without "pretty" dynamic lights (keeping directional lights that create shadows, texture lighting, etc.) is a great :idea:.
User avatar
Hey Doomer_
Posts: 448
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.8a

Post by Hey Doomer_ »

WIWO 0.6.8a
  • Menu options to toggle decorative, texture, flat lighting (done)
  • Alternative to brightmap texture lighting (working on this)
Using texture brightmaps for placing lights eliminates a lot of coding to decide where lights could be.

This is still working within the texture patch format. The idea is to find a degree of brightness and/or purity in a texture and guess that it is a light. There is no way to do this elegantly (think concrete). Some basic pattern recognition may be possible. I'll experiment with this idea.
User avatar
Hey Doomer_
Posts: 448
Joined: Tue Oct 18, 2022 1:59 am
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Some progress 0.6.8a

Post by Hey Doomer_ »

A few POC shots for lighting without brightmaps:

e1m1 (Doom)
map04 (Doom2)
map01 (Hexen)

This is a crude approximation using perceived light and purity of RGB components of the patch or flat. These are cherry picked screenshots for POC. Most of the game is not lit well using this approach in its current state.

I suppose it could improve if refined, but I doubt it's worth anyone's effort. :|
cosmos10040
Posts: 193
Joined: Mon Dec 20, 2021 6:16 am
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: ReLite

Post by cosmos10040 »

Looks interesting. Please post a comparison with and without brightmaps.
DarkkOne
Posts: 274
Joined: Mon Jun 06, 2016 11:26 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Widnows 11
Graphics Processor: nVidia with Vulkan support

Re: WIWO 0.6.8a

Post by DarkkOne »

Hey Doomer_ wrote: Thu May 30, 2024 4:41 pm WIWO 0.6.8a
  • Menu options to toggle decorative, texture, flat lighting (done)
  • Alternative to brightmap texture lighting (working on this)
Using texture brightmaps for placing lights eliminates a lot of coding to decide where lights could be.

This is still working within the texture patch format. The idea is to find a degree of brightness and/or purity in a texture and guess that it is a light. There is no way to do this elegantly (think concrete). Some basic pattern recognition may be possible. I'll experiment with this idea.
Maybe contrast rather than purity? Take the darkest pixel(s) on the texture, and the brightest, and if the difference is great enough, assume it's a texture containing lights? Often a texture that has low contrast but bright colors is just something that's well lit, while a texture with high contrast and bright colors has lights or something on it.
User avatar
Hey Doomer_
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: WIWO 0.6.8a

Post by Hey Doomer_ »

DarkkOne wrote: Tue Jun 18, 2024 11:10 am Maybe contrast rather than purity? Take the darkest pixel(s) on the texture, and the brightest, and if the difference is great enough, assume it's a texture containing lights? Often a texture that has low contrast but bright colors is just something that's well lit, while a texture with high contrast and bright colors has lights or something on it.
Maybe, although textures vary enormously. I have been so far looking at perceived brightness and the degree of color purity (blue, for example, is not perceived as "bright" by the eye). I may try pattern recognition of looking at a grid of pixels for similar light and color. I have made progress (and improved performance incidentally finding bugs etc.) viz:

Code: Select all

					[keep, perceived, howred, howgreen, howblue] = keepthecolor(temp, pc, hr, hg, hb); //, true);
					if (keep)
					{
						n++; r += temp.r;  g += temp.g; b += temp.b;
						if (perceived > 144 || (howred > 90 && howgreen == 0 && howblue == 0) || (howred == 0 && howgreen > 50 && howblue == 0) || (howred == 0 && howgreen == 0 && howblue > 30 ))
						{
							p++;
							// console.printf("     Patch perceived %i, hr %f, hg %f, hb %f", perceived, howred, howgreen, howblue);
						}
					}

Code: Select all

			index = textures.Find(text);
			if (index != textures.Size())
			{
				if (textures_light_size[index] == -1 && (p/n) > 0.70)
				{
					textures_light_size[index] = int(p/n*10);
console.printf("Texture %s size %i", text, textures_light_size[index]);
				}
			}
Screenshots:
e1m4
map15 (note the fuzzy shadow from the building to the right)

I don't have a lot of time in this, and I'm just working on it as time permits. But results are encouraging and surprisingly passable in most maps. Fuzzy lighting is also interesting (note the ceiling in the previous post pic of e1m1). This works with Doom, Doom2, Heretic, and Hexen IWAD flat and texture lumps.

Return to “Gameplay Mods”