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.

29 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:

9 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).

15 Likes