Lighting in GZdoom

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Lighting in GZdoom

Post 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 104 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.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Lighting in GZdoom

Post 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.
User avatar
chopkinsca
Posts: 183
Joined: Thu Dec 29, 2005 8:09

Re: Lighting in GZdoom

Post by chopkinsca »

Thankfully there is a 'lightmode" variable in MAPINFO. Personally I tweak lighting to fit for one specific mode.
User avatar
Firebrand
Dev Builds Team
Posts: 126
Joined: Mon Aug 10, 2009 21:00
Location: Mexico
Contact:

Re: Lighting in GZdoom

Post 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
I'm the ruler of the Fire Power.....
Locked

Return to “GZDoom”