Doom 64 style lighting improvements

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

Doom 64 style lighting improvements

Postby Eliza Gemmerchet » Tue Nov 06, 2018 12:03 pm

Hi- this is carried over from a discussion on the DW forums. In short, creating D64-like colors and gradients is quite an ordeal currently, and I wonder if there is a way to make things easier?

The issue really is that the sector uses "doom 64 style colors" *and* traditional sector brightness. The combination of the two is really quite confusing, and in this regard I find that D64ex's approach of using *just* the colors is far more intuitive.

Also, the sector specials (blinking lights etc) don't really play well with this.

I'm not really sure what to do to make it easier- perhaps a sector flag that forces the engine to *only* use the D64 style colors would help? No flag would = default behavior, so nothing breaks.

Thoughts on this?
Eliza Gemmerchet
 

Re: Doom 64 style lighting improvements

Postby Graf Zahl » Tue Nov 06, 2018 1:03 pm

I need a brief writeup of how exactly this is supposed to work. The main problem is that all those features need to coexist and at some point the entire setup will just become too confusing.
What does 'just colors' mean? Does it have any depth fading or other effects on top of it, and how should blinking light specials interact?

All in all I think the best option would not be some sector flag but an entirely different light mode that would emulate how Doom 64 lighting was implemented and completely sidestep the code for the regular light modes. Such a thing would be map global, though.

But without some more comprehensive technical information I don't see this happening.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Doom 64 style lighting improvements

Postby Antnee » Tue Nov 06, 2018 1:40 pm

In 64ex, this is how you "light" a sector:

[imgur]https://imgur.com/a/uf6gupL[/imgur]

That is all, there's no "brightness" or anything else, just straight RGB values. I'm not exactly sure how the light specials work in that port, but it seems like they add a certain amount of brightness overall. (some seem to use colors, I guess Kaiser would be the person to ask about that)

In ZDoom, you have the added complexity of the colors, and the brightness. So if I were to try and copy, say, the top half wall color from my example (RGB = 239, 171, 80) into Zdoom, I can't just replicate those exact RGB values- I have to contend with those plus the brightness.

So let's try just directly copying the RGB values from a map in 64ex to GZdoom- you end up with this:

[imgur]https://imgur.com/a/J4XXF0J[/imgur]

The brighter of these is 64ex, the darker GZdoom. In GZDoom, I used 255 as the brightness.

It's *almost* there, but doesn't really seem like it's truly using the RGB values I'm dumping in. The other issue that I forgot to mention is that currently, there's no way to fade these colors in and out through ACS. That's kind of a big one IMO!
Antnee
 
Joined: 06 Nov 2018
Discord: 1522

Re: Doom 64 style lighting improvements

Postby Gez » Tue Nov 06, 2018 3:32 pm

Some ACS function to change D64-style colors would be sufficient for most cases. Additionally, perhaps some new thinkers for pulsing or strobing between different colors could be useful.

Let's say a signature like this:
light special(sector tag, color identifier, argbvalue, tic length of cycle)
And there's another arg usable if needed (for example for a random effect which could ask for two different tic lengths, one min and one max). Color identifier would be which color we want to change (floor, ceiling, thing, wallup, walllow -- and perhaps even light, fog, floorglow, ceilingglow too so that these functions could be truly multipurpose).

Function list:
- set color (instantaneous)
- fade color (thinker over a number of second until color fully faded)
- pulse (perpetual thinker continually fading between the sector's original color and the other, and back)
- strobe (perpetual thinker randomly alternating between the sector's original color and flashes of the other)
Gez
 
 
 
Joined: 06 Jul 2007

Re: Doom 64 style lighting improvements

Postby Eliza Gemmerchet » Tue Nov 06, 2018 4:18 pm

Yeah, I think the ACS stuff is more important to be honest- but setting the RGB values for each of the 5 colors seems like it would be a bit arduous. Could you add a function that copies one sector's colors to another?
Eliza Gemmerchet
 


Re: Doom 64 style lighting improvements

Postby Antnee » Tue Nov 06, 2018 6:42 pm

Yeah, basically all of that. The first is probably the best in depth explanation.

The third, I didn't even think of that. Color pegging would be insanely useful.
Antnee
 
Joined: 06 Nov 2018
Discord: 1522

Re: Doom 64 style lighting improvements

Postby Graf Zahl » Sat Nov 10, 2018 2:09 pm

I just committed a very important change that is essential to implement proper handling of wall gradients like Doom 64.
But I need a bit of help now, someone has to refresh my memory about how the different flags affect the gradients and how they are applied in general.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Doom 64 style lighting improvements

Postby Erick194 » Sat Nov 10, 2018 4:21 pm

Again here in the zdoom forums after a long time.

Ok Graf, from what I see even the changes you have made are not applied in the main branch, so I want to ask, what changes have you made, maybe it is possible to see the lights of doom64 without gl shaders ?.

I would like to know what changes you have made since I am willing to help with this, really the PsxDoom Master Edition project has changed the way I see things, and it is good to help and be helped.
User avatar
Erick194
 
Joined: 10 Nov 2018
Location: Costa Rica

Re: Doom 64 style lighting improvements

Postby Graf Zahl » Sat Nov 10, 2018 4:56 pm

The change I mean was the hw_FakeFlat thing.
This was a major blocker here because it was impossible to keep the needed data safely around until it is needed and the main reason why gradients always reached from floor to ceiling on all walls even where it should not.

What I need to complete this is a detailed description of how these gradients are applied and what flags can alter them.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Doom 64 style lighting improvements

Postby Erick194 » Sat Nov 10, 2018 5:31 pm

Maybe insist with this but to achieve the effect of colors you need to be the 4 vertices of colors. As you can see in the following image,

I do not have access to the d64 lights in the current gzdoom since it uses glshaders and I do not have support for that, in the image you can see it by modifying the version Gzdoom 3.5.0 Legacy and it is in Poly Render Mode
Last edited by Erick194 on Sat Nov 10, 2018 6:20 pm, edited 1 time in total.
User avatar
Erick194
 
Joined: 10 Nov 2018
Location: Costa Rica

Re: Doom 64 style lighting improvements

Postby Rachael » Sat Nov 10, 2018 5:33 pm

What are your system specs? It might be possible to get you some Mesa hardware rendering drivers, if your GPU supports a high enough pixel shader model - at the very least for the purposes of testing. If not, then CPU rendering is also possible but only at very low resolutions.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Graphics Processor: nVidia with Vulkan support

Re: Doom 64 style lighting improvements

Postby Erick194 » Sat Nov 10, 2018 5:42 pm

Agreement with gzdoom 1.9 is as follows:

GL_VENDOR: Intel
GL_RENDER: Intel (R) Q45 / Q43 Express Chipset
GL_Version: 2.1.0 - Build 8.15.10.2869
GL_SHADING_LANGUAGE_VERSION: 1.20 - Build 8.15.10.2869

The funny thing is that when I started to modify this version I did not have support for shaders like "BrightMaps, Software Render Lighting, Fuzzy, among others", but force the port to 4.4 and enable those shaders without problems, only the dynamic lights and glows floors do not They worked well.
User avatar
Erick194
 
Joined: 10 Nov 2018
Location: Costa Rica

Re: Doom 64 style lighting improvements

Postby Rachael » Sat Nov 10, 2018 6:21 pm

32 or 64-bit?
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Graphics Processor: nVidia with Vulkan support

Re: Doom 64 style lighting improvements

Postby Erick194 » Sat Nov 10, 2018 6:22 pm

64-bit
User avatar
Erick194
 
Joined: 10 Nov 2018
Location: Costa Rica

Next

Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest