[4.0.0] Light penetrates through lifts

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
User avatar
Apeirogon
Posts: 1590
Joined: Mon Jun 12, 2017 12:57 am

[4.0.0] Light penetrates through lifts

Post by Apeirogon »

Dynamic light with very big LIGHT_INTENSITY value penetrate lifts and illuminates walls which it physically could not illuminate. It also dont take into account sectors height differences in some cases.
As example on vanilla map, load file
light through lift bug.pk3
and doom 2 with commands
-dmflags 4096 -map map06 -warp 1220 1200 56
After this turn back and press use on lamp. It starts to glow red.
Lower the lift with a key on the right and step on it. Wait until it go up. Red glow on the flood will disappear, while on the corner of a wall dont.
You do not have the required permissions to view the files attached to this post.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47973
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [4.0.0] Light penetrates through lifts

Post by Graf Zahl »

This is a known limitation of the lighting system. It's strictly 2D to save calculation time and will probably require far more powerful graphics hardware to be enhanced..
User avatar
Apeirogon
Posts: 1590
Joined: Mon Jun 12, 2017 12:57 am

Re: [4.0.0] Light penetrates through lifts

Post by Apeirogon »

As I suspected.
require far more powerful graphics hardware
What do yo mean?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47973
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [4.0.0] Light penetrates through lifts

Post by Graf Zahl »

What it says. The entire shadowmap is a 2D construct to save time. It calculates the 2D visibility of up to 1000 lights with 1000 samples each. If you add another dimension you not only need a lot more data but also a lot more calculations. If you want 1000 vertical samples you end up at 1000*1000*1000 = 1 billion.
User avatar
Apeirogon
Posts: 1590
Joined: Mon Jun 12, 2017 12:57 am

Re: [4.0.0] Light penetrates through lifts

Post by Apeirogon »

"require far more powerful graphics hardware to be enhanced" mean "all gzdoom users need to change their videocard to gtx 1080" or "it require videocard with tremendous computing power, which does not exist yet"?

Also, why dont construct 2D shadowmaps using two other plane, YZ and XZ and then combine elements of each in one 3D shadowmap? It just increase processing time in three times, instead of power of three.
Or because doom concept of height a bit fake this decomposition on a planes would not work?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47973
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [4.0.0] Light penetrates through lifts

Post by Graf Zahl »

How would that work? If you combine two dimensions, the calculations do not add up, they multiply up. And that's the problem here, it's simply far too expensive with today's hardware.
No modern game has the power to do real time 3D shadowmaps, they all have to take massive shortcuts to work.

It is far more feasible to wait until ray tracing hardware becomes more mainstream than to extend the shadowmap feature, but that's still a few years off.
User avatar
Apeirogon
Posts: 1590
Joined: Mon Jun 12, 2017 12:57 am

Re: [4.0.0] Light penetrates through lifts

Post by Apeirogon »

Well, that works real world fields, so...
But look like I misunderstood how shadowmap work.
I thought shadomap "return" matrix for every point on map, so by using two 2D shadomaps, and knowing which line of matrix correspond to which axis, you can mix them in one 3D shadowmap.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47973
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [4.0.0] Light penetrates through lifts

Post by Graf Zahl »

That's not 3D. That's just two planes.
Darkcrafter
Posts: 508
Joined: Sat Sep 23, 2017 8:42 am
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [4.0.0] Light penetrates through lifts

Post by Darkcrafter »

May I complain here a bit? Raytracing is a good thing but why no doom engine can't clip lights yet so they don't light up things even behind a one-sided linedef? There is so many problems witht this 2.5d unterengine that implementing a real 3d polygon based engine would be the only right solution. I was quite shocked that my msi hd6770 handles doom 2016 in 900p with stable 30 fps but I can't run some non-vanilla maps with brutal doom that would work at least in 30 fps. BF4 feels like over 60 with the medium preset, all the older games like HL2, BF2, BF BC2 just fly as well. But in GZDoom even lowering resolution won't help a bit. I'm sorry, but should I indeed get GTX 1080 to play THIS? As you said before it's because a doom map must contain one-sided linedefs to leave redundand things behind and cut them from the rendering pipeline. The maps I play have almost zero one-sides and heaps of 3d floors and they naturally don't block anything. Think of lots dynamic actors inside of them that consume the power too. I know it's easy to say and hard to do but If I was coding I would implement a real 3d renderer with polygons, but I'm afraid I'm not that intelligent and young yet. If you want to tell me that I should keep to traditional mapping then why I need to update or use GZDoom. The 4th version's gl renderer already works significantly slower thatn 3.7.2 here:
You do not have the required permissions to view the files attached to this post.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47973
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [4.0.0] Light penetrates through lifts

Post by Graf Zahl »

Well, it's clear that you have no idea where the problems are. Doom 2016 is a modern engine designed for today's hardware. That means that all those things that cause slowdowns are not present and that it has been optimized to handle modern techniques well.

The original Doom, on the other hand, was written in 1993 for a low resolution software renderer. Even modern ports have tp preserve all that cruft and that's what makes it hard to optimize.

You'd actually be surprised how little actual geometry a modern engine really has. A lot of content is just prefab models that always get rendered as a single entity (Guess what SnapMap actually is!) You cannot do that with Doom's maps. And since a moving sector actually changes map geometry it also means that most approaches for reducing processing time simply do not work.
User avatar
Rachael
Admin
Posts: 12882
Joined: Tue Jan 13, 2004 1:31 pm
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: [4.0.0] Light penetrates through lifts

Post by Rachael »

If I had a dollar every time I heard the "Doom 2016 is faster than GZDoom" complaint I'd buy out Wall Street.

Just as a tornado doesn't give a flying fuck that you'd be very upset if it ripped through your house, the mechanics of how the Doom engine actually works don't respond to how you "feel" they should. We'd all like GZDoom to spend less time on the CPU, but that's just not going to happen in its current form, not until significant advances are made and it sheds away all of its old 1993 code.

To put it simply: It has to be redefined on an architectural level - and then it begs the question: is it really still Doom?
User avatar
Enjay
 
 
Posts: 26402
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: [4.0.0] Light penetrates through lifts

Post by Enjay »

My modern citrous-compliant computer does a perfect job of running these oranges that were designed for it, so why can't it run these apples?
User avatar
Caligari87
User Accounts Assistant
Posts: 5994
Joined: Thu Feb 26, 2004 3:02 pm
Discord: Caligari87#3089
Github ID: caligari87

Re: [4.0.0] Light penetrates through lifts

Post by Caligari87 »

Enjay with the familiar-but-cleverly-adjusted-to-be-on-point quirky old sage allegory as usual. ;)

8-)
Darkcrafter
Posts: 508
Joined: Sat Sep 23, 2017 8:42 am
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [4.0.0] Light penetrates through lifts

Post by Darkcrafter »

Well, maybe it is really prefabs, but I thougth they still consist of geometry. On the other hand quake 1 wasn't a a much of a prefab usage? I certainly don't know how the engines work but I can say that visually quake 1 had more geometry than any modern GZDoom map? Well I must conduct an experiment to see how a big map performs in quake. An interesting thing is that both brutal doom and project brutality drop fps like 2 or 3 times because without them some maps run at 60 fps. All these fancy graphical enhancements these mods provide must be the reason I think, but they even feature reworked coprses that have animation of decomposition (damn perverts), flys and etc so having a plenty of them in a room also reduces performance. Glowing lava and slime sectors with doom 64 lighting also don't make a use for performance.
User avatar
phantombeta
Posts: 1981
Joined: Thu May 02, 2013 1:27 am
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [4.0.0] Light penetrates through lifts

Post by phantombeta »

Brutal Doom and Project Brutality are terribly coded and horribly unoptimized, so that's not surprising at all.
Here's a thing to think about: Doom ticks at 35 Hz. Most modern games tick at far less than that. The more often you tick the game and update the actors, doors, lifts, etc., the less time you have to render frames. That's already one issue right there.

Doom's level geometry is also highly dynamic. Every sector can move up and down in it. The reason Quake is so much faster is because the actual level geometry is *completely static*.
Lifts, doors, moving ceilings and floors, etc. are not part of the level geometry at all - they're entities. Those entities' polygons also don't have to be uploaded every frame - any animation they have is uploaded to the GPU only once, and any movements they do is simply made by translating, rotating or scaling their meshes.
Doom sourceports, meanwhile, have to reupload the level's mesh every frame due to the maps' sectors' dynamicness, which is extremely slow, as the GPU bus isn't meant for that, and re-generating the level geometry so often wastes a lot of CPU time.

Return to “Closed Bugs”