Page 3 of 4

Re: Begining of 3D floors [continue needed]

Posted: Fri Jul 16, 2010 6:27 pm
by kgsws-CZ
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).

Re: Begining of 3D floors [continue needed]

Posted: Fri Jul 16, 2010 9:52 pm
by Blzut3
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:
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:

Re: Begining of 3D floors [continue needed]

Posted: Sat Jul 17, 2010 3:23 am
by ZDG
You can also see a little bleeding bar on the left side (a thin black/grey line)

Re: Begining of 3D floors [continue needed]

Posted: Sat Jul 17, 2010 3:51 am
by Jimmy
Even as buggy as it is, it's still awesome beyond words. :P

Re: Begining of 3D floors [continue needed]

Posted: Sat Jul 17, 2010 5:50 am
by CaptainToenail
This is cool, keep it up and maybe we will see some multiplayer maps with 3D floors :twisted:

Re: Begining of 3D floors [continue needed]

Posted: Tue Jul 20, 2010 1:10 pm
by Tragos
This is a dream come true.... Hope it gets finished. :)

Re: Begining of 3D floors [continue needed]

Posted: Thu Jul 22, 2010 1:09 pm
by StrikerMan780
Is it possible for builds from the 3D Floor branch be compiled and put here? http://svn.drdteam.org/

Re: Begining of 3D floors [continue needed]

Posted: Thu Jul 22, 2010 1:11 pm
by Graf Zahl
At the moment it's not really useful for public release.

Re: Begining of 3D floors [continue needed]

Posted: Thu Jul 22, 2010 2:05 pm
by Blzut3
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.

Re: Begining of 3D floors [continue needed]

Posted: Sun Aug 08, 2010 1:35 pm
by DaMan
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.
Spoiler:
Compiling with NOASM fixes it.
Spoiler:
Blzut's Linux build is 64bit.

Re: Begining of 3D floors [continue needed]

Posted: Sun Aug 08, 2010 9:36 pm
by Blzut3
DaMan wrote:PM'd this to Blzut but he never got back to me
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.

Re: Begining of 3D floors [continue needed]

Posted: Wed Aug 25, 2010 11:51 am
by Amuscaria
Ok, I've definitely not checked this forum in too long. So I can actually play DE WITHOUT Gzdoom now? o.o

Re: Begining of 3D floors [continue needed]

Posted: Wed Aug 25, 2010 12:11 pm
by Gez
Eriance wrote:Ok, I've definitely not checked this forum in too long. So I can actually play DE WITHOUT Gzdoom now? o.o
To a limited extent.

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).

Re: Begining of 3D floors [continue needed]

Posted: Wed Aug 25, 2010 2:05 pm
by Blzut3
And they only look moderately OK on Linux. I still haven't gotten the will power to develop on another system yet.

Re: Begining of 3D floors [continue needed]

Posted: Thu Aug 26, 2010 11:50 am
by cq75
This is awesome, I hope this gets put into skulltag when you guys get it working :)