Begining of 3D floors [continue needed]
Moderator: GZDoom Developers
-
- Posts: 70
- Joined: Sun Jul 19, 2009 9:50 pm
Re: Begining of 3D floors [continue needed]
To draw translucent images (planes, walls or floors), you must sort them to draw correctly and draw back to front. If you draw as first closest image, other images will get incorrect translucency effect against it (or if you update z-buffer, images behind this wont be visible, even if it is translucent). This also must be done in HW renderer.
And in-sector sorting should work always, maybe there is another sector with same fake floors close to it? I mean, it should work for 100% if you have only one sector with multiple fake floors and every other sector does not have any fake floor. (it might be limited to same subsector instead of same sector, i am not sure now)
Doom legacy does not have z-buffer and they have correct sorting algorithm, at least i think from what i saw. I don't know how it works, but that idea might be ported to zdoom, if it does not rely on old doom's renderer.
First i was experimenting with legacy's fake floor renderer more times, i experimentally "copied" few parts of code to heretic or hexen, with succes.
Some time later i realised how can it be done. Really simple, renderer can draw any plane at any height, to draw fake floor plane, just tell renderer to draw normal plane with different floor height before real sector's plane, don't update any cliping info and mark it as fake floor (in my zdoom mod it is marked if visplane->sky < 0). Of course to draw plane, renderer must get list of segs, these segs must be also marked as fake, so another part of code can skip them from few other things (sprite clipping, middle texture drawing + fog drawing). Maybe sorting/clipping can be done similar way? I still have no idea, but hopefully someone solve it.
And if there is nothing better, i support z-buffered "sorting", it won't be perfect (translucency will cause most problems) but at least ZDoom can support fake floors.
Heh, i am explaining how i did it ... never mind, maybe it can be helpful ... if someone needs to know something more, just ask and i will try to answer (i have not seen my code for weeks).
And in-sector sorting should work always, maybe there is another sector with same fake floors close to it? I mean, it should work for 100% if you have only one sector with multiple fake floors and every other sector does not have any fake floor. (it might be limited to same subsector instead of same sector, i am not sure now)
Doom legacy does not have z-buffer and they have correct sorting algorithm, at least i think from what i saw. I don't know how it works, but that idea might be ported to zdoom, if it does not rely on old doom's renderer.
First i was experimenting with legacy's fake floor renderer more times, i experimentally "copied" few parts of code to heretic or hexen, with succes.
Some time later i realised how can it be done. Really simple, renderer can draw any plane at any height, to draw fake floor plane, just tell renderer to draw normal plane with different floor height before real sector's plane, don't update any cliping info and mark it as fake floor (in my zdoom mod it is marked if visplane->sky < 0). Of course to draw plane, renderer must get list of segs, these segs must be also marked as fake, so another part of code can skip them from few other things (sprite clipping, middle texture drawing + fog drawing). Maybe sorting/clipping can be done similar way? I still have no idea, but hopefully someone solve it.
And if there is nothing better, i support z-buffered "sorting", it won't be perfect (translucency will cause most problems) but at least ZDoom can support fake floors.
Heh, i am explaining how i did it ... never mind, maybe it can be helpful ... if someone needs to know something more, just ask and i will try to answer (i have not seen my code for weeks).
-
-
- Posts: 3178
- Joined: Wed Nov 24, 2004 12:59 pm
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: Begining of 3D floors [continue needed]
I believe Legacy and (at one time) EDGE use partially rewritten renderers in order to achieve software 3D floors. (Never looked just heard and I'm fairly confident that proper sorting isn't possible with the way we're rendering the 3d planes as an extra phase.)
New screenshot:
Edit: Oh and on request here's a picture of what it will look like if you have a translucent sprite over a translucent plane. (Take note of how close I need to be to this sprite in order to make the effect visible.
New screenshot:
Spoiler:Less set up this time, still vary problematic.
Edit: Oh and on request here's a picture of what it will look like if you have a translucent sprite over a translucent plane. (Take note of how close I need to be to this sprite in order to make the effect visible.
Spoiler:
-
- Posts: 918
- Joined: Sat Jan 02, 2010 12:01 pm
- Location: in SlumpEd
Re: Begining of 3D floors [continue needed]
You can also see a little bleeding bar on the left side (a thin black/grey line)
-
-
- Posts: 4725
- Joined: Mon Apr 10, 2006 1:49 pm
- Preferred Pronouns: He/Him
Re: Begining of 3D floors [continue needed]
Even as buggy as it is, it's still awesome beyond words.
-
- Posts: 3975
- Joined: Fri Jul 06, 2007 9:16 am
Re: Begining of 3D floors [continue needed]
This is cool, keep it up and maybe we will see some multiplayer maps with 3D floors
-
- Posts: 624
- Joined: Tue Jun 02, 2009 5:59 pm
- Location: [Getting frisky with Xeno's]
Re: Begining of 3D floors [continue needed]
This is a dream come true.... Hope it gets finished.
-
- Posts: 486
- Joined: Tue Nov 29, 2005 2:15 pm
- Graphics Processor: nVidia with Vulkan support
Re: Begining of 3D floors [continue needed]
Is it possible for builds from the 3D Floor branch be compiled and put here? http://svn.drdteam.org/
-
- Lead GZDoom+Raze Developer
- Posts: 49183
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Begining of 3D floors [continue needed]
At the moment it's not really useful for public release.
-
-
- Posts: 3178
- Joined: Wed Nov 24, 2004 12:59 pm
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: Begining of 3D floors [continue needed]
Actually it would be nice if someone would let me know how they work on Windows right now. On x86-64 Linux the opaque, non-sloped 3D floors render fairly well. (In other words I'm able to play DE MAP07 with someone watching and they couldn't identify any of the 3 glitches I know about.) However, on the Mac the floors don't seem to render completely and so I'm wondering if it's the same on Windows.
-
- Posts: 727
- Joined: Fri Jan 01, 2010 7:14 am
Re: Begining of 3D floors [continue needed]
PM'd this to Blzut but he never got back to me so I'll post here if he didn't forward it the right people.
I assume the problem he's talking about is this.
I assume the problem he's talking about is this.
Spoiler:Compiling with NOASM fixes it.
Spoiler:Blzut's Linux build is 64bit.
-
-
- Posts: 3178
- Joined: Wed Nov 24, 2004 12:59 pm
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: Begining of 3D floors [continue needed]
I'm fairly sure I did. I didn't respond the the NOASM PM though. In anycase it's showing basically the same as it does on my Mac. I tried compiling for 32-bit Linux and it worked just as well as 64-bit so that's out of the question (not that I really thought it would be different either). I'm working on getting my Mac to be a bearable development system (read installing KDE), but other than that I haven't put too much thought into it.DaMan wrote:PM'd this to Blzut but he never got back to me
-
- Posts: 6634
- Joined: Mon Jul 26, 2004 12:59 pm
- Location: Growing from mycelium near you.
Re: Begining of 3D floors [continue needed]
Ok, I've definitely not checked this forum in too long. So I can actually play DE WITHOUT Gzdoom now? o.o
-
-
- Posts: 17934
- Joined: Fri Jul 06, 2007 3:22 pm
Re: Begining of 3D floors [continue needed]
To a limited extent.Eriance wrote:Ok, I've definitely not checked this forum in too long. So I can actually play DE WITHOUT Gzdoom now? o.o
You should be able to find a build of ZDoom with 3D floors on if you go to the DRD Team SVN site, in the seldom-used "experimental" area. Since the branch hasn't been synced with the trunk for a while it's a bit outdated, though (r2444).
-
-
- Posts: 3178
- Joined: Wed Nov 24, 2004 12:59 pm
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: Begining of 3D floors [continue needed]
And they only look moderately OK on Linux. I still haven't gotten the will power to develop on another system yet.
-
- Posts: 1212
- Joined: Sun Dec 27, 2009 9:28 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Just beyond the line horizon
Re: Begining of 3D floors [continue needed]
This is awesome, I hope this gets put into skulltag when you guys get it working