Surfaces showing the wrong light level in game

Need help running G/Q/ZDoom/ECWolf/Zandronum/3DGE/EDuke32/Raze? Did your computer break? Ask here.

Moderator: GZDoom Developers

Forum rules
Contrary to popular belief, we are not all-knowing-all-seeing magical beings!

If you want help you're going to have to provide lots of info. Like what is your hardware, what is your operating system, what version of GZDoom/LZDoom/whatever you're using, what mods you're loading, how you're loading it, what you've already tried for fixing the problem, and anything else that is even remotely relevant to the problem.

We can't magically figure out what it is if you're going to be vague, and if we feel like you're just wasting our time with guessing games we will act like that's what you're really doing and won't help you.
User avatar
Enjay
 
 
Posts: 26430
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Surfaces showing the wrong light level in game

Post by Enjay »

I'm not posting this as a bug because I'm not sure that it is (it could just be my settings) and I'm also struggling to get a good example setup.

I've noticed that sometimes I'm seeing surfaces (always floors/ceilings as far as I have noticed) showing the wrong lighting level. I *think* it might be something to do with updating of lighting information.

Examples:

Sector 1 has light level 112. Sector 2 is set at 120 and the adjacent sectors are progressively brighter. The walls look correct, but the ceiling doesn't. The only weird thing here is that the sectors are "flickered" by a script. The brightness of all sectors in the shot apart from 1 is lowered by a random value (never more than 8 - so it never goes darker than sector 2) and then set back to what it was originally.


This one is simpler. By the time this shot was taken, the slightly darker rectangle (sector 1) should look exactly the same as the surrounding sector 2. Both sectors are set up identically, except that sector 2 is secret and sector 1 has a tag.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48330
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Surfaces showing the wrong light level in game

Post by Graf Zahl »

I can't say from screenshots alone.
User avatar
Enjay
 
 
Posts: 26430
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Surfaces showing the wrong light level in game

Post by Enjay »

OK, a little progress. What I said about the second example got me thinking - sector tags are somehow behind the issue.

If I remove the sector tag from sector 1 in image 2, it matches sector 1. I know what you're thinking - I accidentally tagged a transfer light special to the sector. I've checked and double checked. I have not made that mistake. What's more, giving the sector a tag - any tag will cause the effect to happen. I tried with sector tag 9999 which I know I have definitely not used anywhere.

[edit]
Update - yes, tags seem to be behind this... somehow. I gave the wrong-looking sector 1 from the first example a tag. All the other sectors in the image have tags because, as I mentioned, a script is making the light levels flicker. If I give sector 1 a tag too (I gave it 9999 again - which is not called from any script or line special) then the ceiling in that sector looks as it it intended to.



I will try to get an example that shows the issue.
[/edit]
User avatar
Enjay
 
 
Posts: 26430
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Surfaces showing the wrong light level in game

Post by Enjay »

OK, mark this one down to "Enjay is an idiot". Image

After pruning away the map to try to make a testable version, I noticed that whenever I deleted a particular area of the map that was nowhere near the problem area, the problem went away. I searched and searched and eventually found a tiny little transfer ceiling lights line (only 2 units long) that somehow must have got left over when I deleted something else. The reason it was causing a problem? Its tag field was not set, so it was effectively tagged to any sector without a tag/tag 0. Image

The map is reasonably uniformly lit (with lighting coming from dynamic lights) so in most of the map the problem wasn't noticeable - but it explains why the problem went away when I gave problem sectors a tag: they no longer had tag 0, so the transfer light special didn't affect them.

Yup. That's a couple of hours of my life I'm not getting back.
Enjay wrote:I know what you're thinking - I accidentally tagged a transfer light special to the sector. I've checked and double checked. I have not made that mistake.
Yeah, so apparently I did make that mistake. Kind of.
User avatar
Rachael
Admin
Posts: 13089
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Surfaces showing the wrong light level in game

Post by Rachael »

If I could count the number of times I have made similarly self-deprecating mistakes and beat myself up for it ....

Glad you found the problem though :)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48330
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Surfaces showing the wrong light level in game

Post by Graf Zahl »

That's pretty much what I expected...
User avatar
Enjay
 
 
Posts: 26430
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Surfaces showing the wrong light level in game

Post by Enjay »

Yeah, it was pretty much my first assumption too but when my initial search didn't find the offending line, I went down a rabbit hole of looking for other possibilities, blind to the idea that was actually the problem because I thought I'd already investigated it and ruled it out. I'm going to blame lack of sleep. ;)

I'm still not sure how I managed to create the offending line, why it was set for sector tag 0 or why it had gone unnoticed for so long (again, lack of sleep is the prime suspect) but at least it's gone now and the map works as intended.

Return to “Technical Issues”