ZDoom rendering piece-by-piece
ZDoom rendering piece-by-piece
You've probably seen how Doom renders a scene. But what about ZDoom, and its vastly more complex maps? Watch and learn how the software renderer constructs everything piece by piece.
(This isn't quite pixel by pixel, because if it was we'd be here forever watching it generate a 1920x1080 scene, with overdraw. That's not fun.)
Maps in order of appearance:
CyberCrime3 - Map04
Abandonedrig (CutmanMike)
KDIZD - Z1M8
Back to Saturn X E1 - Map01
Frozen Time - Map01
DWFORUMS3
KDIZD - Z1M5
ZArena - Map01
ZDoom Community Map Project 2
Crusharghs ( http://crantime.org/wads.html )
KDIZD - Z1M10
Vela Pax - Map05
(This isn't quite pixel by pixel, because if it was we'd be here forever watching it generate a 1920x1080 scene, with overdraw. That's not fun.)
Maps in order of appearance:
CyberCrime3 - Map04
Abandonedrig (CutmanMike)
KDIZD - Z1M8
Back to Saturn X E1 - Map01
Frozen Time - Map01
DWFORUMS3
KDIZD - Z1M5
ZArena - Map01
ZDoom Community Map Project 2
Crusharghs ( http://crantime.org/wads.html )
KDIZD - Z1M10
Vela Pax - Map05
Last edited by edward850 on Sun Aug 16, 2015 9:12 pm, edited 2 times in total.
- Sgt. Shivers
- Posts: 1743
- Joined: Fri Jun 22, 2012 5:39 am
Re: ZDoom rendering piece-by-piece
Neat stuff!
- Xeotroid
- Posts: 446
- Joined: Sat Jun 23, 2012 7:44 am
- Graphics Processor: nVidia with Vulkan support
- Location: Czech Rep.
Re: ZDoom rendering piece-by-piece
This is amazing. How does Doom decide which walls / floors to draw first? It seems to be somewhat random, even though the original Doom draws walls closest to player first (according to Doom wiki).
-
-
- Posts: 3203
- Joined: Wed Nov 24, 2004 12:59 pm
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
- Contact:
Re: ZDoom rendering piece-by-piece
It appears random since sorting only needs to be done for segments that touch the same column of pixels (which sets up the clipping region for when the farther segment is drawn).
- Zanieon
- Posts: 2059
- Joined: Tue Jan 13, 2009 4:13 pm
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
- Location: Somewhere in the future
- Contact:
Re: ZDoom rendering piece-by-piece
Very impressive, this reminds me of the VFX Breakdowns that Industrial Light & Magic likes do on their Youtube channel.
- Siberian Tiger
- Posts: 476
- Joined: Fri Jun 12, 2009 11:23 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): KUbuntu 22.04.1 LTS
- Graphics Processor: nVidia (Modern GZDoom)
- Location: United States
- Contact:
Re: ZDoom rendering piece-by-piece
Very interesting, thanks for sharing this!
- Kappes Buur
-
- Posts: 4177
- Joined: Thu Jul 17, 2003 12:19 am
- Graphics Processor: nVidia (Legacy GZDoom)
- Location: British Columbia, Canada
- Contact:
Re: ZDoom rendering piece-by-piece
What wizardry did you use to accomplish this?edward850 wrote:ZDoom rendering piece-by-piece
Re: ZDoom rendering piece-by-piece
Very careful rendering page flips around select rendering calls. Each time rows or columns drew (usually after batch calls to improve time), it would then flip to DirectX, finish the frame, reset, sleep (1-10ms), then relock and continue the scene. Very quick and dirty. That's also why you see the HUD display instantly, as that's all done on the hardware layer.
I could have done it pixel by pixel using the C renderer, but that would be a minimum of 2073600 draw calls. The overdraw (Frozen Time, 9 minutes in, for example) would have made that much worse. So I just did everything a couple of levels beforehand.
I could have done it pixel by pixel using the C renderer, but that would be a minimum of 2073600 draw calls. The overdraw (Frozen Time, 9 minutes in, for example) would have made that much worse. So I just did everything a couple of levels beforehand.
Re: ZDoom rendering piece-by-piece
I did something quite similar with Chocolate Doom's renderer, except since it renders to a buffer in main memory I just dumped it to a PNG after each draw call.
The first instance of someone doing such a thing happened in 2011.
The first instance of someone doing such a thing happened in 2011.
Re: ZDoom rendering piece-by-piece
Neat stuff, I Always liked to see how the engine Works "by the looks". Could the sme thing be done in gzdoom?
Re: ZDoom rendering piece-by-piece
It's just polygons assigned by a BSP. Not exactly something we haven't seen before. 

Re: ZDoom rendering piece-by-piece
Hmmm, but the frame redone all the time like in zdoom or all the geometry created is saved on gpu memory to save some performance?
I'm still curious about the difference btw vavoom and gzdoom, at the end, they do the same thing right? (polygon meshes)
I'm still curious about the difference btw vavoom and gzdoom, at the end, they do the same thing right? (polygon meshes)
Re: ZDoom rendering piece-by-piece
Well I don't see how you would think static meshes would work in a world that can be updated anywhere at any time. VBOs are used to optimize the CPU->GPU transfer time, however.ibm5155 wrote:Hmmm, but the frame redone all the time like in zdoom or all the geometry created is saved on gpu memory to save some performance?
- enderkevin13
- Posts: 1383
- Joined: Tue Jul 07, 2015 7:30 am
- Location: :noiƚɒɔo⅃
Re: ZDoom rendering piece-by-piece
That was hot.
10/10 would bang again. -Everyone
10/10 would bang again. -Everyone
- Hindsight2020
- Posts: 261
- Joined: Wed Mar 20, 2013 3:29 am
- Location: Indiana, USA
Re: ZDoom rendering piece-by-piece
Thanks for sharing this edward850.
This an insane amount of work... and if I understand it correctly, it goes through this every time a frame is drawn? So like 30+ times a second?
This an insane amount of work... and if I understand it correctly, it goes through this every time a frame is drawn? So like 30+ times a second?