Read triangle count of MeshParts and UnionOperations

I find it odd that only UnionOperations have the ablity to get its triangle count and not normal BaseParts or MeshParts so I would like to change that an include the property to both BaseParts and MesshParts alike, it wouldn’t have much use other then being able to limit a player to a specific triangle count in a building game/being able to display how many polygons a player is rendering. (Other then Shift+F#, but not a lot of people know about the stat keys)

Just a simple request.

32 Likes

Had performance issues in my game in certain areas. Wanted to make a “heatmap” plugin of where I needed to optimize, but couldn’t because MeshParts don’t have a TriangleCount.

Full support. :slight_smile:

10 Likes

Heatmap plugin idea is great

6 Likes

Support

2 Likes

Support.

2 Likes

Running into this issue now. I want to make a plugin where users can analyze the level-of-detail in their builds to identify places that may cause performance issues (areas with many objects). A MeshPart with only 50 tris is obviously not going to cause as much of a performance impact as one with 5000 tris, so I want to take that into consideration in my plugin. Unfortunately I cannot distinguish the complexity of individual meshes, which will impact the accuracy and usefulness of my plugin.

I assume the reasoning behind having a TriangleCount property for unions is because there is no way to figure out the complexity of a union until you export it, whereas you will know the detail of every MeshPart you upload if you have created them yourself. However, in cases where you are accessing meshes created by others (e.g. in the case of published plugins or when you are working in a Team Create with others), this feature would be super useful and informative.

8 Likes

I’m going through this right now - I’m trying to get a rather more “realistic”-looking map done albeit small in scale, it still has lag spikes when entering certain areas. So I suspect that there may be a few meshparts with higher than usual polygons, but it’s hard to determine which, without having to import several meshparts one by one into external programs for viewing. This process is not applicable for games with lots of meshparts.

6 Likes

Currently in Roblox it’s very hard to calculate the triangle count of a mesh, which is the biggest factor in determining how much a mesh affects performance.

Roblox currently has functions to count the number of triangles in a mesh but it’s only usable inside Roblox core scripts.
[ContentProvider:CalculateNumTrianglesInMeshSync]
[ContentProvider:CalculateNumTrianglesInMesh]

Making these functions usable outside of just the Roblox core scripts would make it very easy to determine which meshes in a game affect performance the most, and could possibly be used during game runtime to treat higher poly meshes differently to increase client performance.

9 Likes

This would be really useful for UGC games that allow users to import meshes / hats to impose a triangle limit.

In our game, we let users change hat MeshIDs and sometimes they use really large / high polycount ones to try and ruin the experience for others.

5 Likes

As a Roblox developer, it is difficult for me to optimize projects with respect to memory usage/required rendering resources for MeshParts/UnionOperations.

As of now, you cannot view the vert/triangle count for a MeshPart/UnionOperation in studio, and cannot view specific memory usage for a mesh/union operation.

I propose that Roblox adds a read-only property (That the client/server can read) for MeshParts/UnionOperations that displays the triangle count for that specific instance (Integer).

Example use case: I have a game that has performance issues w/the amount of MeshParts. I run a script and create a table of mesh IDs/individual unions w/their triangle count, and sort it descending to find meshes that need to be edited/replaced for memory/render reasons.

This would make my job of finding performance-optimizations for existing games much easier, and allow further performance improvements to be made to games in order to maximize the reach of our projects.

I am aware that 3D modeling software allows you to view that specific data; but with my scope of work (Optimizing existing games), I cannot feasibly ask for the 3D artists to go back and view the triangles count for each individual mesh (Out of thousand of possible meshes).

17 Likes

Afraid of necro-bumping a post that’s been around for years, but where there has been community tooling for measuring triangle count, they have either ended up broken or lost partial support due to APIs being closed off for platform safety reasons (most recently this)

With the client beta of in-experience editable meshes now out, it is really surprising there isn’t a native method to check the vertex/tri count, or memory impact of any selected part/mesh part yet. It is a very common metric provided by modelling software and even directly competing game engines. Making such a metric visible would help for many different use cases, and also would probably serve as a constant and clear reminder to new and existing developers to keep an eye on the weight and performance intensity of a specified asset, especially if the use of this was reinforced by guides in the creator hub on standard practice for assets.

The main use case of a polygon count is really simple. Currently, the standard of modelling across Roblox ranges from modeller to modeller, and assets can be anything from extremely performant to eating up client memory and increasing a scene’s triangle count. Some games that feature models in the latter category might want to become more performant down the road but with bigger studios and large games where the number of assets tends to increase tenfold and are much trickier to track and assess in Roblox Studio itself. Clear problem children assets that don’t scale well become harder to optimise because finding them studio is akin to looking for needles in a haystack, (or should I say wire-frame and render stats :stuck_out_tongue: ). You could argue that we could try and remake every asset ingame so they’re performant, or adopt a performance-first strategy to development, but with new contractors coming in and a lot of different hands on a project, optimisation takes time that we can’t always fit into a weekly update schedule, time that ideally we’d want to use where necessary.

There are also a lot more instances nowadays of games transferring ownership and the new owner of a game wanting to make a game more performant. Another use case in this instance, of having read-only access to the triangle count of meshes would be that it enables the creation of community tools like the one linked above, which can help them assess the big problem children among the many meshes and assets uploaded to our games by utilising their triangle count.

This is of course also not mentioning the fact that many games still utilise meshes found on the toolbox. The Toolbox Search feature already has a triangle count filter. This is great, but most developers with budgets for drawcall or a scene’s triangle count need tangible numbers to work with, to ensure that these items still fit within their rendering budget. Creators also might be looking for singular meshes in a much greater pack, such as in an asset pack, but there is currently no way of assessing the value of an already-uploaded asset’s performance against another, without trying to export that into a blender or some weird hacks that really shouldn’t have to happen.

In my eyes, this feels like a pretty big QoL improvement which is absent at the moment. Wireframe Rendering and Render Stats are still great tools but for the scale and speed our team needs to work at, having triangle count per asset, readily accessible and common knowledge within Roblox Studio would make it easier to work quicker and more effectively while minimising time spent squirrelling away at finding assets in a game to optimise.

2 Likes