The amazing triangle drawer!
-
- Developer
- Posts: 798
- Joined: Sat Jul 23, 2016 7:53
Re: The amazing triangle drawer!
Sounds like you found it. Will be nice to be able to look all the way up and down.
- Rachael
- Developer
- Posts: 3646
- Joined: Sat May 13, 2006 10:30
-
- Developer
- Posts: 798
- Joined: Sat Jul 23, 2016 7:53
Re: The amazing triangle drawer!
Excellent!
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
Re: The amazing triangle drawer!
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
- Rachael
- Developer
- Posts: 3646
- Joined: Sat May 13, 2006 10:30
Re: The amazing triangle drawer!
You mean this build I did not link?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.
With this CVAR I didn't spoiler?
Spoiler: Really, there's nothing here
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
Re: The amazing triangle drawer!
Eruanna wrote:You mean this build I did not link?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
With this CVAR I didn't spoiler?
Spoiler: Really, there's nothing here
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
- Rachael
- Developer
- Posts: 3646
- Joined: Sat May 13, 2006 10:30
Re: The amazing triangle drawer!
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.
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.
-
- Developer
- Posts: 798
- Joined: Sat Jul 23, 2016 7:53
Re: The amazing triangle drawer!
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.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).
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.
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.Nash wrote:HOLY SHIT! 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?
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..
-
- Posts: 12
- Joined: Tue Jan 07, 2014 20:56
Re: The amazing triangle drawer!
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 , so here are some screenshots for comparison
Software Renderer looking up Triangle Drawer looking up Software Renderer Looking down Triangle Drawer looking down 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.
Software Renderer looking up Triangle Drawer looking up Software Renderer Looking down Triangle Drawer looking down 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.
-
- Developer
- Posts: 798
- Joined: Sat Jul 23, 2016 7:53
Re: The amazing triangle drawer!
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.
I really like the last screenshot. I haven't dared venture past E1M2 myself with it yet.
- Rachael
- Developer
- Posts: 3646
- Joined: Sat May 13, 2006 10:30
Re: The amazing triangle drawer!
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.
-
- Developer
- Posts: 197
- Joined: Sun Nov 29, 2009 16:36
Re: The amazing triangle drawer!
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.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.
-
- Developer
- Posts: 798
- Joined: Sat Jul 23, 2016 7:53
Re: The amazing triangle drawer!
120 FPS and diminishing light.
- Rachael
- Developer
- Posts: 3646
- Joined: Sat May 13, 2006 10:30
Re: The amazing triangle drawer!
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?
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?
- Gez
- Developer
- Posts: 1399
- Joined: Mon Oct 22, 2007 16:47
Re: The amazing triangle drawer!
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.