The amazing triangle drawer!

Truecolor ZDoom with extra features and some unofficial/beta GZDoom features.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Libs (Win)] [Repo] [Bugs&Suggestions]

Moderators: Rachael, dpJudas

dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: The amazing triangle drawer!

Post by dpJudas » Tue Nov 08, 2016 6:42

Sounds like you found it. Will be nice to be able to look all the way up and down. :)

User avatar
Rachael
Developer
Developer
Posts: 3617
Joined: Sat May 13, 2006 10:30

Re: The amazing triangle drawer!

Post by Rachael » Tue Nov 08, 2016 6:46

The change is pushed.

One caveat, though: It only works on map restart.
Spoiler: Zen Sarcasm

dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: The amazing triangle drawer!

Post by dpJudas » Tue Nov 08, 2016 6:54

Excellent!

User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Re: The amazing triangle drawer!

Post by Nash » Tue Nov 08, 2016 9:07

I'm starting to feel wet in my pants right now and I'm not even seeing any screenshots yet! The anxiety is killing me. :D :D :D

User avatar
Rachael
Developer
Developer
Posts: 3617
Joined: Sat May 13, 2006 10:30

Re: The amazing triangle drawer!

Post by Rachael » Tue Nov 08, 2016 9:19

Nash wrote:I'm starting to feel wet in my pants right now and I'm not even seeing any screenshots yet! The anxiety is killing me. :D :D :D
You mean this build I did not link?

With this CVAR I didn't spoiler?
Spoiler: Really, there's nothing here
Spoiler: Zen Sarcasm

User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Re: The amazing triangle drawer!

Post by Nash » Tue Nov 08, 2016 9:43

Eruanna wrote:
Nash wrote:I'm starting to feel wet in my pants right now and I'm not even seeing any screenshots yet! The anxiety is killing me. :D :D :D
You mean this build I did not link?

With this CVAR I didn't spoiler?
Spoiler: Really, there's nothing here
Image

I... what... how... what have you and dpJudas created... software rendered Doom with true freelook... is this black magic... :OOO

[ahem]

HOLY SHIT! :D Okay... I need to calm down. Whew. So um... I have a question. The triangle drawer can co-exist in the old renderer right? Looks like poor non-GL folks can finally enjoy GZDoom's +FLATSPRITES with the triangle drawer! Also, I get like 20 FPS with the new renderer but I'm sure this is heavily WIP and eventually the renderer will run at playable framerates?

OH I noticed a funny thing - when switching from new renderer back to old renderer mid-game, I could infinitely freelook in the old renderer. It looks really amusing to say the least. XD

User avatar
Rachael
Developer
Developer
Posts: 3617
Joined: Sat May 13, 2006 10:30

Re: The amazing triangle drawer!

Post by Rachael » Tue Nov 08, 2016 10:31

dpJudas did it, not me.

I had an idea of how to do it but he's already done it. My idea would've been to hook GZDoom's GL commands at a higher level before they reach the driver and render the image from there (discarding whatever commands would simply take too much time to process). His method may actually be better - because he's still using the software renderer still but he's simply using GZDoom's structs directly rather than hooking the code. Which makes it a little more future-proof.

Yes, the triangle drawer co-exists with all 3 existing renderers (ZDoom, GZDoom, and QZDoom's true-color one). I wouldn't shoot ribbons and rose petals just yet, though - it's still entirely a WIP as you said and it will need to be optimized if it is ever completed.

And yes, the freelook thing is a known issue. Once you reset the map it will go back to its old limits. Since this is an alpha feature to begin with I saw no real point in making the freelook thing production-friendly. The bigger concern was making it usable so that dpJudas could more comfortably work with it. The "quirk" with requiring a map restart is a GZDoom thing. I think what happens is the look limits are serialized into the game sim so that inputs that go beyond the limits are ignored by playback sims (i.e. other players in multiplayer, as well as playing back demos). In order to change this, the user preference must be updated into the game sim on renderer change, and if I do that I may as well make a pull request for GZDoom for that to happen when "maxviewpitch" is changed, as well.
Spoiler: Zen Sarcasm

dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: The amazing triangle drawer!

Post by dpJudas » Tue Nov 08, 2016 11:51

Eruanna wrote:I had an idea of how to do it but he's already done it. My idea would've been to hook GZDoom's GL commands at a higher level before they reach the driver and render the image from there (discarding whatever commands would simply take too much time to process).
Actually, the way it is doing it here is virtually identical to how GZDoom does it. When Graf indirectly revealed to me that what GZDoom does is to "just" walk a GL BSP tree where you can triangle fan draw the floor and ceiling (ignoring sky here) I figured I could just do the same with the triangle drawer.

The biggest difference between GZDoom and what I'm doing is that GZDoom renders the scene front to back with a zbuffer, while I render it back to front instead.
Nash wrote:HOLY SHIT! :D Okay... I need to calm down. Whew. So um... I have a question. The triangle drawer can co-exist in the old renderer right? Looks like poor non-GL folks can finally enjoy GZDoom's +FLATSPRITES with the triangle drawer! Also, I get like 20 FPS with the new renderer but I'm sure this is heavily WIP and eventually the renderer will run at playable framerates?
The frame rate is surprisingly good at the moment, all things considered. Right now it does not cull in the scene beyond a simple bounding box test on each subsector. That means that anything in the direction you are looking is being rendered, even if there's a big fat wall straight in front of you. The triangle drawer itself is also just plain C++ code, even still using floats for its texture coordinates - plenty of room here for making it much much faster.

But as Eruanna said, don't get your hopes too high, because what I've done so far is really the easy part. Water, mirrors, portals and skies aren't being dealt with. Even doing those things might require a stencil buffer. Could create one of course, but.. :)

XxMiltenXx
Posts: 12
Joined: Tue Jan 07, 2014 20:56

Re: The amazing triangle drawer!

Post by XxMiltenXx » Tue Nov 08, 2016 14:25

Well, just for the fun of it I converted a Doom map to UDMF and the Triangle Drawers actually works pretty well with it. There's still clipping mostly on the edges of the screen or sometime through walls or the ceiling, but definitely worth taking a picture. The pictures I chose are "Best-Case-Scenarios". But it might show us what can come in the future :D, so here are some screenshots for comparison

Software Renderer looking up
UpS.jpg
UpS.jpg (180.11 KiB) Viewed 201 times
Triangle Drawer looking up
UpT.jpg
UpT.jpg (419.85 KiB) Viewed 201 times
Software Renderer Looking down
DownS.jpg
DownS.jpg (309.99 KiB) Viewed 201 times
Triangle Drawer looking down
DownT.jpg
DownT.jpg (444.06 KiB) Viewed 201 times
As said, these positions are best-case-scenarios and only worked that well because I converted the maps to UDMF. In Doom 2 map formats the triangle drawer doesn't perform that well - yet.
Last edited by XxMiltenXx on Wed Nov 09, 2016 15:21, edited 1 time in total.

dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: The amazing triangle drawer!

Post by dpJudas » Tue Nov 08, 2016 14:52

That clipping bug sure is annoying me, but I'll get it fixed - eventually. Just need to figure out how to clip a line to 6 clipping planes correctly. Should be so easy, yet my code doing it fails horribly. Sniff!

I really like the last screenshot. I haven't dared venture past E1M2 myself with it yet. :)

User avatar
Rachael
Developer
Developer
Posts: 3617
Joined: Sat May 13, 2006 10:30

Re: The amazing triangle drawer!

Post by Rachael » Tue Nov 08, 2016 17:55

Is there any way I could convince you not to use that file sharing host in the future? It's one of the ones that doesn't work without Javascript and the forum accepts attachments just fine.
Spoiler: Zen Sarcasm

Edward-san
Developer
Developer
Posts: 197
Joined: Sun Nov 29, 2009 16:36

Re: The amazing triangle drawer!

Post by Edward-san » Tue Nov 08, 2016 23:55

Eruanna wrote:And yes, the freelook thing is a known issue. Once you reset the map it will go back to its old limits. Since this is an alpha feature to begin with I saw no real point in making the freelook thing production-friendly. The bigger concern was making it usable so that dpJudas could more comfortably work with it. The "quirk" with requiring a map restart is a GZDoom thing. I think what happens is the look limits are serialized into the game sim so that inputs that go beyond the limits are ignored by playback sims (i.e. other players in multiplayer, as well as playing back demos). In order to change this, the user preference must be updated into the game sim on renderer change, and if I do that I may as well make a pull request for GZDoom for that to happen when "maxviewpitch" is changed, as well.
I think the best thing would be to move the min/max pitch settings to the userinfo, like I was suggesting here, so that multiplayer may benefit from it.

dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: The amazing triangle drawer!

Post by dpJudas » Wed Nov 09, 2016 1:38

Image

120 FPS and diminishing light. :D

User avatar
Rachael
Developer
Developer
Posts: 3617
Joined: Sat May 13, 2006 10:30

Re: The amazing triangle drawer!

Post by Rachael » Wed Nov 09, 2016 1:42

With sprites too, even. It's almost playable now. :)

I just tried it out again with the latest commits, and wow. This is the most amazing thing I've seen in a Doom engine since... I dunno, ZDoom? ;)
Spoiler: Zen Sarcasm

User avatar
Gez
Developer
Developer
Posts: 1394
Joined: Mon Oct 22, 2007 16:47

Re: The amazing triangle drawer!

Post by Gez » Wed Nov 09, 2016 2:41

I hope this won't suffer from GZDoom's "hey this subsector is technically behind the camera so why render it" issue at steep pitches because it always annoys me to see slivers of sky suddenly appear just because I'm looking at the floor or the ceiling.

Locked

Return to “QZDoom”