[Not a bug] [4.0.0] Light penetrates through lifts

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

[4.0.0] Light penetrates through lifts

Postby Apeirogon » Sun Apr 21, 2019 2:04 pm

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
(595 Bytes) Downloaded 11 times

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.
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: [4.0.0] Light penetrates through lifts

Postby Graf Zahl » Sun Apr 21, 2019 2:21 pm

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
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [4.0.0] Light penetrates through lifts

Postby Apeirogon » Sun Apr 21, 2019 2:30 pm

As I suspected.
require far more powerful graphics hardware

What do yo mean?
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: [4.0.0] Light penetrates through lifts

Postby Graf Zahl » Sun Apr 21, 2019 2:56 pm

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
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [4.0.0] Light penetrates through lifts

Postby Apeirogon » Mon Apr 22, 2019 2:48 pm

"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?
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: [4.0.0] Light penetrates through lifts

Postby Graf Zahl » Mon Apr 22, 2019 2:52 pm

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
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [4.0.0] Light penetrates through lifts

Postby Apeirogon » Mon Apr 22, 2019 3:15 pm

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.
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: [4.0.0] Light penetrates through lifts

Postby Graf Zahl » Mon Apr 22, 2019 3:44 pm

That's not 3D. That's just two planes.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [4.0.0] Light penetrates through lifts

Postby Darkcrafter » Mon Apr 22, 2019 4:30 pm

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:
Attachments
D1.jpg
User avatar
Darkcrafter
 
Joined: 23 Sep 2017
Location: South Russia
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: [4.0.0] Light penetrates through lifts

Postby Graf Zahl » Mon Apr 22, 2019 4:38 pm

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
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [4.0.0] Light penetrates through lifts

Postby Rachael » Mon Apr 22, 2019 4:41 pm

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
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Graphics Processor: nVidia with Vulkan support

Re: [4.0.0] Light penetrates through lifts

Postby Enjay » Mon Apr 22, 2019 4:49 pm

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
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: [4.0.0] Light penetrates through lifts

Postby Caligari87 » Mon Apr 22, 2019 5:27 pm

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

8-)
User avatar
Caligari87
I'm just here for the community
User Accounts Assistant
 
Joined: 26 Feb 2004
Location: Salt Lake City, Utah, USA
Discord: Caligari87#3089

Re: [4.0.0] Light penetrates through lifts

Postby Darkcrafter » Mon Apr 22, 2019 5:29 pm

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
Darkcrafter
 
Joined: 23 Sep 2017
Location: South Russia
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: [4.0.0] Light penetrates through lifts

Postby phantombeta » Mon Apr 22, 2019 6:06 pm

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.
User avatar
phantombeta
In the meadow of sinful thoughts, every flower's a perfect one
 
Joined: 02 May 2013
Location: The United Soviet Socialist Dictatorship of Hueland
Discord: phantombeta#2461
Twitch ID: phantombeta_
Github ID: Doom2fan
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia with Vulkan support

Next

Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 5 guests