Gradient lighting improvements

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

Moderator: GZDoom Developers

Gradient lighting improvements

Postby grahf78 » Sun Jun 21, 2020 10:56 pm

I will start with some context. I have been writing a ZScript level post processor that parses the original Doom 64 map lumps to apply gradient lighting (sector.SetSpecialColor) over Nevander's Doom 64 Retribution TC. Overall it's working great. However, there are a couple of inconsistencies that have popped up after I analysed the results:

  1. If sprite sector lighting is used, decals retain their original color, giving them a glowing look. This becomes more noticeable if I load a mod such as Nashgore, which spawns blood sprites and models in floors.

    This is what I mean:
    Spoiler:


    How they look like without gradient lighting:
    Spoiler:

  2. If PBR materials are used, lights cast over textures look very rough, as if they were not attenuated. Brightmaps also appear to be always tinted according to the special color.

    More comparison shots. The lights around the door have a brightmapped texture, notice that they only appear white if special colors are not applied:

    With sector special colors, no PBR:
    Spoiler:


    No sector special colors, with PBR:
    Spoiler:


    With sector special colors, with PBR:
    Spoiler:

[*] To replicate Doom 64's lighting, sector colors are not enough, there are some line flags that alter how they are colored. I am aware that similar flags were added to UDMF sidedefs, but they have not been exposed to ZScript. It would be nice to have them exposed.

Since the flags can't be changed by ZScript, I tried to replicate their behaviour by using Side.SetSpecialColor. However, it does not seem to do anything. I skimmed through the GZDoom source code and it appears that they only have an effect when an additional flag is set, which is also not available from ZScript.

Here's a test wad that contains only the programmatic colorization:
64LightTest2.pk3
(5.11 KiB) Downloaded 2 times
grahf78
 
Joined: 22 Jun 2020
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)

Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests