Doom 64 style lighting improvements

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

Moderator: GZDoom Developers

User avatar
Dark Pulse
Posts: 66
Joined: Fri Nov 21, 2014 5:35 pm
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support

Re: Doom 64 style lighting improvements

Post by Dark Pulse »

Graf Zahl wrote:
Talon1024 wrote:The Doom 64 Tech Bible is here.
That information should be sufficient. Of course doing it precisely like Doom 64 is too limited. I'd rather add a few more fields for flexibility.
Still good to see this is finally moving forward.

I don't think anyone who is using the GZDoom engine would expect it to be "exactly" functional compared to Doom 64 - if you want that, that's what Doom64 EX is for.

As long as it can replicate the end "effect," even if the implementation is done differently compared to the implementation as in Doom 64, then that works, and it gives even mappers who don't care about Doom 64 even more options for map enhancement.

It also means theoretically Doom 64 support could be added as an official IWAD, of course, albeit that would also mean either supporting Doom 64's map format, or else needing to go through some kind of WAD generator that would generate the GZDoom-compatible WAD from the game's ROM file, like Doom 64 EX does. The former would allow for the same generated IWAD Doom 64 EX uses to be used in GZDoom though.

Either that or the mod itself could report itself as an IWAD I suppose, but then it's a bit tricky if other mods begin depending on it.

Anyway, AFAIK, with this addition, all that'd need to be added is for ACS specials to take this into account as well, as I said with my earlier suggestions that got linked in the first couple of posts.
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 »

Dark Pulse wrote: I don't think anyone who is using the GZDoom engine would expect it to be "exactly" functional compared to Doom 64 - if you want that, that's what Doom64 EX is for.

The way these things were done in Doom64 are often too closely tied to the hardware, so for proper editing they are often very awkward. I guess once everything is working technically one can write a map loader that translates the native Doom64 properties to work with the syste.
User avatar
Dark Pulse
Posts: 66
Joined: Fri Nov 21, 2014 5:35 pm
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support

Re: Doom 64 style lighting improvements

Post by Dark Pulse »

Graf Zahl wrote:The way these things were done in Doom64 are often too closely tied to the hardware, so for proper editing they are often very awkward. I guess once everything is working technically one can write a map loader that translates the native Doom64 properties to work with the syste.
Then at the very least ACS would need to account for several of the extra macro/linedef specials that Doom 64 has that GZDoom currently lacks.

Basically, the ones most at question are the Sector_Copy stuff - I think everything in there can already be done via ACS, except for setting D64-style colors (so basically Sector_CopyLights and Sector_CopyLightsAndInterpolate, although I'm not 100% sure on Sector_CopySpecials as well, but I'd think we could just tell ACS to change the sector special - but that could just be me being somewhat of a noob on ACS). Maybe the Line_* actions as well, but it seems like most of those should be in as well (or at the very least, can be just set directly pretty much via an ACS script I'd think).

You can find the full macro/linedef specials reference list here, most of which are similar to ACS (and most of which are probably already in GZDoom, in some form). The actual Macros themselves could basically be converted to ACS, since all Doom 64 Macros are is basically collections of line actions - no expressions, variables, or conditional statements. If you want scripting information, that's here.

Then this way even if we don't have "exact" ability to set things via the other ACS specials (i.e; extending Sector_SetColor), they could likely be faked via some dummy sectors (which is precisely what Doom 64 EX does as even it doesn't replicate things exactly like the N64 does) as long as there's equivalents for the linedef specials prepared in GZDoom. From that point on, converting should be pretty trivial.

(Well, there is the fact that it has a different "ending wipe" as can be seen at the end of the intro and upon player deaths in this video, but that's being pretty nitpicky and kind of demanding.)
Last edited by Dark Pulse on Sun Nov 25, 2018 2:09 pm, edited 1 time in total.
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 »

In ZScript you can change any of these properties easily, I haven't done any ACS exports yet, but since ACS can run ZScript functions directly it's not that it cannot be done.
User avatar
Pixel Eater
 
 
Posts: 667
Joined: Wed Aug 02, 2017 12:31 am
Location: In between the Moon and you, between the buried and me.

Re: Doom 64 style lighting improvements

Post by Pixel Eater »

Dark Pulse wrote:it has a different "ending wipe" as can be seen at the end of the intro and upon player deaths in this video
I liked that effect so much I've just tried to replicate it. It's not identical though and it only changes the death animation...
Attachments
DPWipe.pk3
(1.07 KiB) Downloaded 87 times
Talon1024
 
 
Posts: 374
Joined: Mon Jun 27, 2016 7:26 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Doom 64 style lighting improvements

Post by Talon1024 »

Now that GZDoom can clamp, flip, and/or disable the Doom64 lighting gradients, the only Doom 64 lighting effect left to implement is additive blending on each sector.
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 »

What precisely does that mean?
Talon1024
 
 
Posts: 374
Joined: Mon Jun 27, 2016 7:26 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Doom 64 style lighting improvements

Post by Talon1024 »

I'm referring to the effects described on page 34 and 35 of the Doom64 tech bible. These effects are referred to as "Glowing textures" (§12.2.1) and "Flashes" (§12.2.2) in the tech bible.
Gez
 
 
Posts: 17833
Joined: Fri Jul 06, 2007 3:22 pm

Re: Doom 64 style lighting improvements

Post by Gez »

To wit:
Glowing textures replaces the original Doom's glowing sector effects like flickering or pulsating lights. Instead of the special effects changing the light level per sector, it applies an additive blending effect to the textures used in that sector.

This effect additively blends a white constant color to the textures and sprites within that sector. The strength of the blending is based on the sector's light level.
User avatar
Dark Pulse
Posts: 66
Joined: Fri Nov 21, 2014 5:35 pm
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support

Re: Doom 64 style lighting improvements

Post by Dark Pulse »

Pixel Eater wrote:I liked that effect so much I've just tried to replicate it. It's not identical though and it only changes the death animation...
Not a bad little thing! Yeah it's not perfect, but it's pretty close. :)

For the record, it only ever happens normally in four scenarios to the best of my knowledge: 1) Intro end, 2) Player death, 3) Level Exit activated, 4) End of the Cast kill. In the case of the first and last, it automatically trips; the middle two are triggered upon pressing Use (to respawn or exit the level respectively). Everything freezes in the last two, it fades out to black after some time, and then things proceed.

You may want to consult the Doom 64 EX source. The relevant chunks can be found here (F_Stop shows it stops all game music, freezes all game actions, and fades after 6 seconds) and here (WIPE_Fadescreen and WIPE_Meltscreen are probably what you're after).
Gez wrote:To wit:
Glowing textures replaces the original Doom's glowing sector effects like flickering or pulsating lights. Instead of the special effects changing the light level per sector, it applies an additive blending effect to the textures used in that sector.

This effect additively blends a white constant color to the textures and sprites within that sector. The strength of the blending is based on the sector's light level.
Probably the "quickest" way to see this in action is to get to MAP32: Hectic, since it will affect both the green armor at the start, as well as the blue armor trap when you activate it by picking it up. For those not in the know, unlocking the level requires exploding every barrel on MAP01, and then rushing to the one-time open secret exit behind the spawn. (Of course, you could always just load it up via the console in Doom 64 EX as well.)

Also, there is the need for those ACS scripts or something akin to them being implemented still, since several maps definitely use interpolation between two sets of sector colors - unless I'm mistaken, those are yet to be implemented despite the D64-style line lighting being in.

(Though I think Graf if is saying you can do that via ZScript? Maybe it's me being tired but I'm not 100% sure. If ZScript can mess with line properties at runtime and stuff I guess that will work.)
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 »

Yes, you can do it by creating a custom thinker that periodically alters the colors,
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: Doom 64 style lighting improvements

Post by drfrag »

Talon1024 wrote:Here's a test WAD for both the Doom 64-style lighting gradients, as well as the "additive" lighting. All ACS and ZScript code within is licensed under the MIT license.
User avatar
Mav3r1ck
Posts: 262
Joined: Thu Jul 16, 2015 11:09 pm

Re: Doom 64 style lighting improvements

Post by Mav3r1ck »

Sorry to bump this topic but I came across it and was intrigued.

Has this had any further development to be implemented into GZDoom?
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 »

Right now we believe we got everything covered. So it's just waiting for the game's re-release and then seeing whether it can be natively supported.
User avatar
Mav3r1ck
Posts: 262
Joined: Thu Jul 16, 2015 11:09 pm

Re: Doom 64 style lighting improvements

Post by Mav3r1ck »

Is it ACS usable or just ZScript? Does it also include the phased lighting and light sequence start specials with addictive properties?
Post Reply

Return to “Feature Suggestions [GZDoom]”