Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add triangle / vertex count display for MeshInstances #248

Open
lawnjelly opened this issue Nov 21, 2019 · 4 comments
Open

Add triangle / vertex count display for MeshInstances #248

lawnjelly opened this issue Nov 21, 2019 · 4 comments

Comments

@lawnjelly
Copy link
Member

lawnjelly commented Nov 21, 2019

Describe the project you are working on:
Splitting and merging meshes for balancing draw calls / culling, and optimizing levels for fast rendering

Describe the problem or limitation you are having in your project:
There doesn't appear to be an easy way to determine the poly count of a mesh from the IDE.

Some other stats that are useful:

  • NumTris / Primitives
  • NumIndices
  • NumSourceVertices
  • Normals Yes / no
  • UVs Yes / no
  • Colors Yes / no
  • NumIndices / NumSourceVertices - to give a measure of how good vertex sharing is
  • Post Transform Vertex cache utilisation - calculated assuming a certain cache size (e.g. 16 / 32)
    https://www.khronos.org/opengl/wiki/Post_Transform_Cache

Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:
I just asked on IRC in devel and none of us were aware of a current way of seeing this basic info. There were suggestions ranging from putting it in the inspector (when the mesh instance is selected) to putting it as a label in the 3d viewport.

There are actually 2 aspects here:

  1. Is an indication of stats of meshes that are currently being rendered (which the monitor already does to an extent)
  2. Purely information stats of the info in the mesh instances, which could be queried from the mesh instance directly

One advanced consideration might be if multiple nodes are selected, or only some are MeshInstances.

If this enhancement will not be used often, can it be worked around with a few lines of script?:
It will probably be useful quite often.

Is there a reason why this should be core and not an add-on in the asset library?:
Could perhaps be made as an add-on (I'm not familiar with making IDE add-ons) but the consensus was that we should put it up here as a proposal as it might be widely useful functionality.

@Calinou Calinou changed the title Triangle / vertex count display for MeshInstances Add triangle / vertex count display for MeshInstances Aug 16, 2020
@Zireael07
Copy link

I was going to make a new issue, but then I realized it probably belongs here:

I am trying to figure out the best sub-scenes to optimize in a medium-complexity game. So far the only way I can figure out what I should work on is by enabling/disabling visibility one by one and seeing draw calls go down. This is NOT tenable, as you can imagine, with only a dozen or so intersections plus a dozen or so roads (every road has 3 parts, and a dozen or so buildings alongside, so I estimate 12 to the power of 3 nodes or something around 1800 nodes), whether I go the completely manual route or trying some sort of a technique presented here: https://www.youtube.com/watch?v=QXUCGzJUfkc

Godot really needs something like https://unrealartoptimization.github.io/book/profiling/view-modes/ (shader complexity view) or https://docs.unity3d.com/Manual/FrameDebugger.html, and it also ties to #2704 (mipmap levels view)

@me2beats
Copy link

me2beats commented Sep 8, 2022

what about draw calls, material count/changes etc as well

@me2beats
Copy link

me2beats commented Sep 8, 2022

It would be nice to see info for any selection as well imo.
You select one or several meshes and it shows info for it

@lawnjelly
Copy link
Member Author

This is now merged in 3.6, although leaving this open as there is some interest in having the same feature in 4.x.

@clayjohn clayjohn added this to the 4.x milestone Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants