Doom 64 style lighting improvements

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

Moderator: GZDoom Developers

Guest

Doom 64 style lighting improvements

Post by Guest »

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?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Doom 64 style lighting improvements

Post by Graf Zahl »

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.
Antnee
Posts: 4
Joined: Tue Nov 06, 2018 10:54 am

Re: Doom 64 style lighting improvements

Post by Antnee »

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!
Gez
 
 
Posts: 17833
Joined: Fri Jul 06, 2007 3:22 pm

Re: Doom 64 style lighting improvements

Post by Gez »

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)
Guest

Re: Doom 64 style lighting improvements

Post by Guest »

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?
Antnee
Posts: 4
Joined: Tue Nov 06, 2018 10:54 am

Re: Doom 64 style lighting improvements

Post by Antnee »

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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Doom 64 style lighting improvements

Post by Graf Zahl »

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
Erick194
Posts: 35
Joined: Sat Nov 10, 2018 3:12 pm
Location: Costa Rica

Re: Doom 64 style lighting improvements

Post by Erick194 »

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Doom 64 style lighting improvements

Post by Graf Zahl »

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
Erick194
Posts: 35
Joined: Sat Nov 10, 2018 3:12 pm
Location: Costa Rica

Re: Doom 64 style lighting improvements

Post by Erick194 »

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 5:20 pm, edited 1 time in total.
User avatar
Rachael
Posts: 13530
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Doom 64 style lighting improvements

Post by Rachael »

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
Erick194
Posts: 35
Joined: Sat Nov 10, 2018 3:12 pm
Location: Costa Rica

Re: Doom 64 style lighting improvements

Post by Erick194 »

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
Rachael
Posts: 13530
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Doom 64 style lighting improvements

Post by Rachael »

32 or 64-bit?
User avatar
Erick194
Posts: 35
Joined: Sat Nov 10, 2018 3:12 pm
Location: Costa Rica

Re: Doom 64 style lighting improvements

Post by Erick194 »

64-bit
Post Reply

Return to “Feature Suggestions [GZDoom]”