[No] Wireframe mode for debugging and optimizing maps

Moderator: GZDoom Developers

Wireframe mode for debugging and optimizing maps

Postby kevansevans » Tue Apr 28, 2020 2:42 pm

Apologies in advanced if this is already a thing, google hasn't yield anything and the few responses I got on Discord told me it wasn't in.

Wireframe mode dasically instructs the engine to draw outlines of the tris that are currently being drawn in the scene. With this information, a mapper can see where they can place spots to cover up map geometry and reduce unnecessary draw calls. Since people are starting to make mods that push GZDoom to it's limits making it look and feel more like a modern engine, it'd be useful to have some modern tools. Some screenshots as an example of how the source engine does this:

mat_wireframe 0: https://imgur.com/a/kJ7du3h
mat_wireframe 2: https://imgur.com/Ct9l7Xv

The wireframe mode illustrates all geometry that the engine thinks is visible, and some models despite not being visible, are being drawn as such. Obviously worrying about every object being drawn when it's not supposed to be is a fools errand, but it's still a better option than praying the engine knows better.
User avatar
kevansevans
Disciple of The Great God Imp
Spotlight Team
 
Joined: 05 Oct 2010
Github ID: kevansevans
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Wireframe mode for debugging and optimizing maps

Postby Rachael » Tue Apr 28, 2020 3:56 pm

The issue here is more the CPU than the GPU. It's not how much is being drawn, it's the number of subsectors being processed, and those are created with the lines and various shapes the sector takes. A square or rectangular sector with nothing inside of it is much less likely to be split into subsectors than a sector that has a lot of pillars or interior sectors.

And for that, there's already a tool that you can use to look at this: "gl_render_walls false"

That will remove the wall drawing so that you can see what sectors are being drawn at a given time. Keep in mind though, that there might be cases where sectors are not seen but they still can be drawing (as well as being drawn through), i.e. when the ceiling of a sector in front of the player is significantly lower than the player's actual view. Wireframe would not help here, either.

What might be more useful is an automap mode that keeps the automap completely clear other than what is being currently drawn, and splitting that into a subsector wireframe. That would be a lot more handy for this kind of a use case, in my opinion.
User avatar
Rachael
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Wireframe mode for debugging and optimizing maps

Postby Nash » Tue Apr 28, 2020 11:45 pm

I'd rather see a tool (either in UDB or in-game automap) that works like the Visplane Explorer, where you move around and can see how "hot" a particular position is.
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: Wireframe mode for debugging and optimizing maps

Postby Graf Zahl » Wed Apr 29, 2020 12:12 am

In form of text output you already got that with 'stat rendertimes' and 'stat renderstats'.
But as it always is - pure numbers are rarely representative, there's other, non-quantifiable factors as well.
And most importantly, if someone benchmarks on a fast system it won't help a bit on a user's underpowered laptop.

But the most important thing is: Measuring triangles is pointless. You can have millions of triangles on the screen - if they are batched - like drawing a model or a heavily split sector, these are one single draw call that's no more costly than rendering a single wall.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest