3D floors ... again (impossible comes true)

Moderator: GZDoom Developers

User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: 3D floors ... again (impossible comes true)

Post by Graf Zahl »

Nash wrote: So I can't help but wonder... what was it EXACTLY that kgsws-CZ managed to figure out that neither Randy nor Graf couldn't figure out for past several years?

As far as I understand it he used the brute force method: Split the entire map into horizontal slices for each visible 3D floor. Obviously such a method creates quite a bit of overhead and as some recently split off discussion indicated the slowdowns are evident.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: 3D floors ... again (impossible comes true)

Post by Graf Zahl »

NeuralStunner wrote:I don't know if it was a matter of "couldn't figure it out" nearly so much as "had other priorities".

Or "had no desire working on this code" :P
koverhbarc
Posts: 230
Joined: Mon Dec 06, 2010 6:26 am

Re: 3D floors ... again (impossible comes true)

Post by koverhbarc »

Graf Zahl wrote:As far as I understand it he used the brute force method: Split the entire map into horizontal slices for each visible 3D floor. Obviously such a method creates quite a bit of overhead and as some recently split off discussion indicated the slowdowns are evident.
Ah! If multiple 3D floors cause a split for each, that could explain the observed slowdown. In that case one could solve it by ensuring that any number of floors at the same Z height lead to only one split.
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Re: 3D floors ... again (impossible comes true)

Post by randi »

Nash wrote:Right down to the clipping . . . everything works as expected.
Unfortunately, I have found this problem in njbgpabh:
Screenshot_Doom_20110118_205300.png
Screenshot_Doom_20110118_205300.png (110.28 KiB) Viewed 1486 times
The sprites behind the railing are drawn in front of it.
User avatar
Nash
 
 
Posts: 17485
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: 3D floors ... again (impossible comes true)

Post by Nash »

Oh, I didn't test with that WAD...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: 3D floors ... again (impossible comes true)

Post by Graf Zahl »

koverhbarc wrote: Ah! If multiple 3D floors cause a split for each, that could explain the observed slowdown. In that case one could solve it by ensuring that any number of floors at the same Z height lead to only one split.

Well, obviously same z coordinates can only produce one split.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: 3D floors ... again (impossible comes true)

Post by Graf Zahl »

randy wrote: The sprites behind the railing are drawn in front of it.

The code seems to get totally confused if a sprite has to clip into the floor but there's several splits due to other 3D floors. It starts to clip into all of them which effectively makes the whole sprite appear in front of all of them.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: 3D floors ... again (impossible comes true)

Post by Graf Zahl »

Ok, problem fixed. It's not 100% glitch free but I think that's not possible with how sprites are handled by the software renderer. The mess that has been there from the start can't be undone.
koverhbarc
Posts: 230
Joined: Mon Dec 06, 2010 6:26 am

Re: 3D floors ... again (impossible comes true)

Post by koverhbarc »

Graf Zahl wrote:
koverhbarc wrote: Ah! If multiple 3D floors cause a split for each, that could explain the observed slowdown. In that case one could solve it by ensuring that any number of floors at the same Z height lead to only one split.
Well, obviously same z coordinates can only produce one split.
I can't figure it out by looking at the source but this seems to be true based on a test level I created. I made a 8*8 grid of 3D floors and found them to be substantially slower when all heights were different than with all heights the same. The slowest speed I got was 20 fps, though, so I don't know what it is about the Inca HQ level that maks it ridiculously slow (there are fewer than 64 3D floors there, I'm sure).
User avatar
Enjay
 
 
Posts: 26944
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: 3D floors ... again (impossible comes true)

Post by Enjay »

It's probably not just about the 3D floors. The level also (ab)uses a situation that Doom isn't very happy with: the 3D floors are set in a pretty large open area with quite a few lindefs visible and, of course, there are textures that Zdoom has to force into the Doom palette ( some are hi-res), there are scripts running and there is generally a lot going on with enemies etc much of the time too.

I suspect that all of these things coming together with the large number of 3D floors leads to a situation that Zdoom is struggling to cope with. The 3D floors could well be the major slow down but other things will be adding to the problem.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: 3D floors ... again (impossible comes true)

Post by Graf Zahl »

The textures only need to be processed once and the scripts are not relevant.

The wide open area though, that's a different matter. But it's mostly the 3D floors that cause the slowdown. The problem is actually quite simple. There is absolutely no view blocking geometry around the house so everything in it needs to be processed by the renderer, even if it is not visible. Essentially the map is a showcase example of what you should NOT do when you want to get good 3D floor performance.

That it works reasonably well with modern 3D hardware is another matter. It's more a testament to the processing power than to the map's layout. On my old computer (3.2 GHz P4, Geforce 6800) it also gets quite slow around the house.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: 3D floors ... again (impossible comes true)

Post by Graf Zahl »

Merged back into the trunk. Now let's see some maps using these 3D floors. ;)
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: 3D floors ... again (impossible comes true)

Post by Edward-san »

This is a pretty big news here... now it's [added], definitely.
User avatar
Nash
 
 
Posts: 17485
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: 3D floors ... again (impossible comes true)

Post by Nash »

Good news! What about sloped 3-d floors? Randy kinda had a solution in one of the posts in the the past pages...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: 3D floors ... again (impossible comes true)

Post by Graf Zahl »

Does it make sense to wait, and wait, and wait until he finds time to do it? If he manages to do it better the code can always be replaced later but putting it on hold indefinitely is stupid, if you ask me.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”