How will meshes impact overall game performance in this case?

Good evening,

After doing extensive research regarding meshparts and reviewing many useful points from some notable users, it would be great and very beneficial to get an external outlook as to how meshparts will effect the overall game performance in my case.

I’ll try to give as much information as I can to give yourselves an idea for the scale of the project.

There will be approximately 1000 unique meshparts, each with approximately 4k triangles.

You’re probably thinking that this is a great way to blow up a mobile user, however there would only be 30-50 unique meshparts per area. Therefore, in my head, this is where streaming enabled would do wonders.

Alongside streaming enabled, if all collisions are optimized (box or none) where possible, could this potentially make the game fairly lightweight (considering the above conditions)?

Now I understand meshparts load and cache, therefore loading times joining the game and teleporting between areas would be longer - how much longer I’m unsure.

I also understand that client memory usage will be fairly high, estimating around 1.2k MB (a figure pulled from thin air) - making this unsuitable for mobile players.

What I don’t understand is whether client memory usage has any correlation to a player’s FPS or is FPS purely rendering based (what the client can see at that moment)

Overall, there is not really a specific question for me to ask, more so I am after an outlook highlighting/expanding on what is written above to clear any misconceptions myself and the community may have.

Any response and knowledge is greatly appreciated.

1 Like

It may be worth mentioning that the meshparts will rely on Roblox materials only.

not sure what you mean by this, but i’ll try to answer it anyway lol.

im pretty sure that chucking meshes into a game and expecting it to increase fps isnt a good idea. look at showcase games; they use a ton of meshes and are still incredibly laggy for low end users. i assume this is probably because of roblox needing to fetch all the meshes from the asset library and then importing them into the game. some assets need to be cached too so ig that plays a part in the whole thing aswell.

i have a gaming computer but still get occassional fps drops because my wifi is ass. because of my horrendous ping, meshes in games don’t get loaded properly and instead load altogether in one go whenever my ping goes down by ~100 ms. this causes extreme amounts of lag at times cuz of all that pressure on my computer to load every asset fetched at once. most low end users suffer this too. keep that in mind when you add meshes into your games. like everything else, they have downsides too.

my advice would be not to heavily rely on meshes and to instead use a mix of parts and meshes!! the good thing about parts is that roblox doesn’t need a lot of data to display it, so there’s less strain on the user’s device. it also means that if any of your meshes fail to load, your players will still be able to play the game without everything being invisible.

another lil optimization tip is to test your game as a player. see what way they’d go, places they shouldn’t access, stuff they dont see etc. delete the parts that you don’t need in these areas. parts within parts should also be deleted if they have no significance to the rest of the model!! lowering your object count is the best thing you can do when it comes to optimizing builds.

From an optimization perspective, assuming that you are utilizing StreamingEnabled, Parts > Meshes > Unions > Unoptimized Meshes in terms of performance impact, from least to most.

By utilizing meshes, you can offload work from the CPU to memory - however, not every device will have enough memory to do this without stuttering. StreamingEnabled helps in the opposite way - it offloads some of the memory usage to CPU work in the form of streaming in/out regions.

Unions, on the other hand, are basically, at least with CSG 2.x, barely optimized meshes at best, and worse than unoptimized meshes in some cases. Unions also don’t load onto the client the same way as meshes, leading to an exponentially larger performance impact the more a given union is utilized within a map. With meshes, the client only needs to load the mesh data into memory once per given session, reducing the overall load on memory if a mesh is utilized with sufficient frequency.

The main FPS impact of higher memory usage is caused by the CPU being unable to meet all of the requests received to pull data from memory (mostly as a result of Roblox currently being single-threaded), but this should hopefully be reduced greatly in the coming months with the introduction of multithreading to Roblox, which was shown off at RDC 2021.

Due to this, I would highly recommend utilizing a mix of parts and meshes, and avoiding repeatedly using higher-poly unions wherever possible - aside from that, the main hit to FPS caused by MeshParts will be from shadows, with the main thing taking up CPU cycles being calculating collisions. Assuming that you use CastShadow = False and CollisionFidelity = Box or Hull wherever you can get away with it, they shouldn’t ruin your performance unless you massively overdo it with texture resolution or triangle counts.

Hope this helps!