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

Moderator: GZDoom Developers

Post Reply
kgsws-CZ
Posts: 70
Joined: Sun Jul 19, 2009 9:50 pm

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

Post by kgsws-CZ »

Well suddenly i got idea how to sort all in scene, and it worked!
Almost - it does not support sloped 3D floors at all, not even opaque. It also have small problems if 3D floor is touching sloped real floor, but not so often.
There are also 2 another, maybe bad things, you can't use skybox or mirror while watching 3D floor. It is good to add skybox in map with 3D floors, but when any 3D floor visible, skybox won't be. Mirrors are something different - if you use them, it will not render 3D floors correctly. You can use mirrors on places where it is not possible to see 3D floor(s).
I guess there are places for optimization, but right now i have no better idea.

EDIT: fixes, patch is few posts below

So, what does work:
- non sloped 3D floors
- 3D floor lighting (on sprites and other walls)
- mirrors
- skyboxes

What does not work:
- sloped 3D floors
- extra effects (like fake fog)
- polyobjects (inside 3D floors, outside its OK)
Spoiler: here are few screenshots
More screenshots here.
Last edited by kgsws-CZ on Wed Dec 15, 2010 10:56 am, edited 6 times in total.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

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

Post by NeuralStunner »

Yay, more progress! =:)
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 »

I can't merge this into the 3D floor branch. I only get errors.
kgsws-CZ
Posts: 70
Joined: Sun Jul 19, 2009 9:50 pm

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

Post by kgsws-CZ »

Graf Zahl wrote:I can't merge this into the 3D floor branch. I only get errors.
This patch is made for trunk revision 3025. I considered it will be a lot easier to start again, from clean code.

EDIT: i found better way to draw fake walls, expect patch fix soon
EDIT2: patch finished, get it again in first post
kgsws-CZ
Posts: 70
Joined: Sun Jul 19, 2009 9:50 pm

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

Post by kgsws-CZ »

Well, i made even more fixes. Skyboxes and mirrors now works.

Again, this patch is for trunk revision 3025.
Attachments
3Dfloors.zip
mirrors and skyboxes fixed
(14.48 KiB) Downloaded 237 times
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 »

I hope it's still usable against r3042...
Blzut3
 
 
Posts: 3202
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

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

Post by Blzut3 »

Patch works fine against the latest trunk. I would commit it myself, but I'm not sure if we want to create a concurrent branch or delete the old one?

Edit: I'm not seeing a significant performance issue with the patch like is claimed over at Skulltag. The only complaint I have is in its current state it makes no attempt at all to render sloped 3D floors.
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 »

Create a new branch off your working copy. Let's keep the old one for now separately.
kgsws-CZ
Posts: 70
Joined: Sun Jul 19, 2009 9:50 pm

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

Post by kgsws-CZ »

Will this ever get merged with main branch?
Or what else is remaining on this.
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 »

It first needs to be tested. I am planning to check this with several 3D floor using maps today to see if it's usable for the trunk.
User avatar
TIHan
Posts: 81
Joined: Mon Aug 13, 2007 7:10 am

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

Post by TIHan »

Wow, good job kgsws-CZ! This is badass!
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 »

This is definitely impressive. There's still some problems though:
  • Texture alignment is wrong. Please update from the SVN (to get updated linedef translators) and check the start of MAP05 in Nimrod. It should look like in GZDoom with the stripes on the wall properly aligned.
  • Fog volumes do not work. You can check one of those in Nimrod MAP02 at position (-2570, 3310) Admittedly they are not that important because they didn't work in Legacy as well but if possible you should check it. Since something is drawn I guess it can be fixed.
  • Vavoom style 3D floors are not properly rendered. Their outer walls only get drawn when the view z position is between the floor's top and bottom. The floor and ceiling in the control sectors are inverted so obviously some checks are wrong.
  • I got frequent out of memory crashes. For example I was unable to test MAP110 in Enjay's Burghead mod.
  • Pure light transfers do not seem to get handled. I checked a map using ZDoom's linedef type 50 and this does not affect sprites even though these definitions get added to the 3D floor table. Speaking of which, I think that the old code needs to go if the 3D floor code can be used to render such effects.
Overall good work though. If these can be addressed I see no reason not to promote it to the trunk.
kgsws-CZ
Posts: 70
Joined: Sun Jul 19, 2009 9:50 pm

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

Post by kgsws-CZ »

Graf Zahl wrote:Texture alignment is wrong. Please update from the SVN (to get updated linedef translators) and check the start of MAP05 in Nimrod. It should look like in GZDoom with the stripes on the wall properly aligned.
fixed
Graf Zahl wrote:Fog volumes do not work. You can check one of those in Nimrod MAP02 at position (-2570, 3310) Admittedly they are not that important because they didn't work in Legacy as well but if possible you should check it. Since something is drawn I guess it can be fixed.
right now i don't know how to do it
Graf Zahl wrote:Vavoom style 3D floors are not properly rendered. Their outer walls only get drawn when the view z position is between the floor's top and bottom. The floor and ceiling in the control sectors are inverted so obviously some checks are wrong.
fixed
Actually it was classic HOM but on fake plane because of wrong boundary calculation.
Graf Zahl wrote:I got frequent out of memory crashes. For example I was unable to test MAP110 in Enjay's Burghead mod.
no idea
I was able to test MAP110, no crash at all. It was unplayable because of 1 FPS while looking at main building.
However, i made dynamic clip allocation, it should allocate memory only for visible 3D floors.
Using old way, each F3DFloor structure had MAXWIDTH*4 more bytes.
Graf Zahl wrote:Pure light transfers do not seem to get handled. I checked a map using ZDoom's linedef type 50 and this does not affect sprites even though these definitions get added to the 3D floor table. Speaking of which, I think that the old code needs to go if the 3D floor code can be used to render such effects.
seems to be working for me

I made even more fixes, those flags are now working:

Code: Select all

2: Restricts the lighting properties into the area between the 3D floor's top and bottom. Logically this is only useful if the 3D floor is not solid.
16: Uses a sidedef's upper texture to draw the sides of the 3D floor instead of the transfer linedef's mid texture.
32: Uses a sidedef's lower texture to draw the sides of the 3D floor instead of the transfer linedef's mid texture.
Attachments
3Df002.zip
fixes
(2.69 KiB) Downloaded 207 times
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, this one's better. But I still spotted 2 problems that prevent me from merging it into the trunk:

1. For Vavoom type 3D floors top and bottom texture need to be swapped.
2. Fog in 3D water may not be rendered as fog. It has to be applied as a screen blend. Checking MAP02 of Silent Steel the waterfall looks odd otherwise and I'm certain there will be other problems, too.

But I wasn't able to make the 3D floors themselves glitch even once. This is truly impressive and looks a lot more stable than what Legacy ever managed in software mode.
kgsws-CZ
Posts: 70
Joined: Sun Jul 19, 2009 9:50 pm

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

Post by kgsws-CZ »

I fixed point 1, that was easy.
But fog in 3D water will be little tricky. I think i will have to do some trick with FDynamicColormap.
My idea is to store fade color of all model sectors outside of FDynamicColormap::Fade, so it will never be faded to specified color.
I can probably add new value, something like FDynamicColormap::FakeFade. It will be used only in fake model sectors and only for screen blending.

And what is best way to make screen blend, so it will not conflict with other possible blend effects?
I already have some success with screen->SetFlash, but it conflicts with other blends.

Also, it might be good idea to provide EXE on forums, so everyone will have chance to test it. And maybe forum thread about 3D floors testing?
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”