Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Alphawolf

Wall brightness?

Recommended Posts

Sometimes in GZdoom a wall will be brighter than adjacent walls, even when the sector brightness is the same for both walls and the sector it is part of. Is this a glitch or something else?

Share this post


Link to post

Doom lights straight vertical and horizontal lines 16 units brighter or darker than the sector light level, to create contrast around corners. It's not a bug.

You can avoid this by not using any perfectly straight vertical/horizontal lines in curved shapes where you want a consistent light level.

In modern sourceports like (G)ZDoom and Eternity, you can also disable this 'fake contrast' feature entirely by use of a mapinfo command.

In (G)ZDoom, you can also use the UDMF map format to disable fake contrast on a per-sidedef basis, and/or set customized per-sidedef lighting yourself.

Share this post


Link to post
esselfortium said:

In (G)ZDoom, you can also use the UDMF map format to disable fake contrast on a per-sidedef basis, and/or set customized per-sidedef lighting yourself.

I knew about the MAPINFO thing but I had no idea you could do it on a sidedef level in UDMF. That's pretty cool. I know there have been multiple instances where certain angles will look a little odd at certain light levels because of the fake contrasting.

Share this post


Link to post
esselfortium said:

Doom lights straight vertical and horizontal lines 16 units brighter or darker than the sector light level, to create contrast around corners. It's not a bug.


This might be one of Doom's most under-appreciated features. Sure, it looks weird when you're designing a circular room and one panel is the wrong brightness. But, usually, this feature doesn't draw any notice at all - because it works so well. It's an extremely low-tech trick that adds a touch more depth to every scene. I admire the insight of the guys over at id.

Share this post


Link to post

They should have used a dot product instead. That way the corners with small angles will have small change in brightness and corners with large angles have a large change in brightness. In other words; 90 degree corners will behave exactly like they do in vanilla Doom and a circular room will not have any walls with a sudden, unexpected change in brightness (they will be shaded gradually around the room). A dot product is even fast to calculate, there can be no question about performance here (probably even faster than different code paths for the specific angles) and it can even be pre-calculated since the walls don't move anyway. They (Carmack?) probably just didn't think of it at that time. [end of my useless babbling]

Share this post


Link to post

Wouldn't a "round" pillar alternate between dark/light, though? That would look kind of goofy.

Share this post


Link to post

There's some information about the topic on the ZDoom wiki.

CodeImp said:

They should have used a dot product instead.


Keep in mind that the engine only handles light levels by blocks of 16 units. Since they didn't have a finer granularity, they couldn't offer a gradual change and keep the amplitude reasonable. (I guess they could have used steps of 8 units and covered 45° angles as well, though.)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×