Page 1 of 1

Dynamic Lights shining through walls, doors, etc

Posted: Sat Aug 04, 2012 0:29
by Cerberus
I uploaded a screenshot of what looks like the Dynamic Lights of Armor shining through the secret wall-door of MAP 06 in Doom 2. any reply wouold be nice. :)
UPDATE: uploaded image

Re: Dynamic Lights shining through walls, doors, etc

Posted: Sat Aug 04, 2012 2:54
by Enjay
Well, I'm not sure where your screenshot is but this thread may provide some information. I guess that it's about the same kind of thing:

http://forum.drdteam.org/viewtopic.php?f=22&t=5897

Re: Dynamic Lights shining through walls, doors, etc

Posted: Sat Aug 04, 2012 9:15
by Gez
This is not something that is going to be changed any time soon, unfortunately.

Re: Dynamic Lights shining through walls, doors, etc

Posted: Sat Aug 04, 2012 16:04
by Lars
Would it make sense to create a new sticky topic "Known bugs" inside the "Bugs" forum?

I also reported this bug although it had been reported before, and people will probably do so in the future.

With a sticky topic, all posters would immediately see that their issue is already known and they don't need to post it again.

Two bugs that should be listed there come to my mind:
- This one (dynamic lights shining through walls)
- And the screen clearing bug: http://forum.drdteam.org/viewtopic.php?f=24&t=4434
Because these are graphical glitches that are somehow obvious.

Re: Dynamic Lights shining through walls, doors, etc

Posted: Sat Aug 04, 2012 18:32
by Blue Shadow
... Or they could do a little searching first to see whether or not there is something like the issue they're having has been reported already.

Re: Dynamic Lights shining through walls, doors, etc

Posted: Sat Aug 04, 2012 19:21
by Nash
Even Skyrim has this "bug", when a light source is not flagged to cast shadows - I guess it's not easy to fix...

Re: Dynamic Lights shining through walls, doors, etc

Posted: Sat Aug 04, 2012 20:16
by Gez
It's not a bug, it's a limitation. Clipping lights is a very non-trivial task which, if actually implemented, would hamper performances.

The thing to keep in mind is that light is something extremely complicated to simulate. So, it is simplified considerably. For example, Doom has sectors with a given light level, and some simple light-diminishing algorithm. Inside a level, light is ambient -- it has no source, and casts no shadows. Light is treated differently for thing sprites, HUD sprites, floor/ceiling textures, and wall textures. GZDoom adds dynamic lights, which are points from which light emanates spherically up to a given distance. There is no shadow casting, so this light is not cut off by geometry, sprites, or anything else. Games like Quake added volumetric light maps that affected static geometry but not moving platforms or actors; and dynamic light that, like in GZDoom, wasn't clipped by geometry. (There's even a walkthrough for Quake that tells a hidden door can be noticed from the glow of the bonus item behind it.)

Doom 3 was the first game in which there was a unified model for light and shadow, meaning that everything was rendered in the same way, with proper shadow casting and stuff. It also was a very dark game because that was crazy expensive.


The thing about lights being specifically flagged to cast shadow is for that same reason of performance. If all lights are flagged to cast shadows, the game slows down to a crawl, so most lights are excluded from shadow casting and will happily shine through everything, which is a lot simpler to compute.