Page 1 of 1

Lighting in GZdoom

Posted: Wed Aug 12, 2009 17:07
by Enjay
I've been meaning to ask about this for a while. I think that there was a similar discussion over at Doomworld and maybe even a similar test map but I don't remember much about the outcome and I can't find it so I thought that I'd ask here.

I know that there are different sector lighting effects and that these try to emulate different situations but I just wondered how intentional all the effects are.

Consider the attached file that I made. It is a long tunnel of 256 sectors. The first sector has light level 0 and the last one has light level 255. Each sector is 1 unit brighter than the one next to it.
lightlevels.zip
(21.38 KiB) Downloaded 103 times


In some lighting modes, if you load the file and run down to either end of the tunnel then look back, you can see a definite step in brightness around the middle of the tunnel. I am wondering if this effectively compresses the light levels visible? ie, at a distance, are light levels lower than 128 effectively compressed into a range of, I dunno, 0 to 96. Or is something else going on? I don't know if this is strictly down to brightness as it isn't so obvious when you are standing in the middle of the tunnel. Perhaps it is something to do with distance fog? Anyway, the modes which show this most obviously are Doom, Dark and Bright.

Also, the dark end of the tunnel isn't always that dark. In "Legacy" for example, light level 0 really isn't that dark at all.

The setup that shows this tunnel as it might be expected from the settings in the level editor is "standard" with ambient light levels turned down as low as possible. At those settings, the dark end is pretty dark, the light end is pretty light and the transition across them is quite smooth and consistent. However, turn up the ambient light level and the dark end isn't fully dark (which, of course, is the expected outcome - are you listening Id, with your Doom 3 excessive darkness. :P )

So, I'm just really wondering how intended these effects are.

Re: Lighting in GZdoom

Posted: Wed Aug 12, 2009 19:25
by Graf Zahl
It's really quite simple:

Standard uses a linear light gradient
Doom tries to approximate the light levels of the software renderer
Legacy uses the same calculations as Legacy's GL renderer

What's left is just a combination of Doom and Standard's settings.
All modes also use depth fading but with different values each.

Re: Lighting in GZdoom

Posted: Wed Aug 12, 2009 22:05
by chopkinsca
Thankfully there is a 'lightmode" variable in MAPINFO. Personally I tweak lighting to fit for one specific mode.

Re: Lighting in GZdoom

Posted: Thu Aug 13, 2009 14:38
by Firebrand
I haven't found a good light mode that I really like in GZDoom if one is too bright, the other is too dark... I guess I haven't played enough with the options, heh! :P