Hey!
Our studio is expanding it’s map constantly - the current map size being 30,000 x 30,000 studs. The map uses default parts almost exclusively, and this can lead to some issues with rendering lag, as Parts do not allow for LoD rendering, since, after all, they’re individual parts rather than 1 object of triangle data like meshes and CSG. This leads to a question I’ve yet to find an answer to - would it be more worthwhile to convert large batches of parts, which share the same color, material ect into a CSG (I.e union), to be able to utilize the RenderFidelity property?
I believe this should have some beneficial impact on performance, but I can’t be sure since this possibly means a client would have to download four different types of LoD versions of an object, which could lead to some pretty bad load-times.
The reason I’m even more confused about this is that default Roblox Parts are directly baked into the engine, making it even obscure when trying to measure the performance impact.
Since I don’t believe many people would be in the knows of this, I would be really grateful if a Roblox engineer or the like could answer this question. Thank you!
EDIT: After asking some people, I’ve got the following answer:
Seems like it’s a good idea, and also makes sense from a performance side of view. Is this correct?
The answer is “it’s complicated.” Also the person in Discord telling you that is dangerously generalizing the use cases to the point where that’s not great information.
Here’s a few things that make the answer complicated:
Each Part is an Instance, true, by they definitely don’t cost “more data in general” and they’re so incredibly efficient because the Client knows that geometry (what you’re calling “baked in”), and Instancing takes this optimization even further.
Depending on how much the Union/Mesh is Instanced will greatly sway the Union/Mesh’s performance. Used a lot across the map? Probably better to use a Mesh. Used once or twice? Keep to parts, maybe?
The complexity of the Union/Mesh.
The required Parts needed to accurately replace a Union/Mesh.
If the asset needs to be edited, modular, or otherwise changed in any way.
In short, you should 1. stop thinking of performance in the context of Part counts, or tri counts, or size, or anything like that, and instead refer to Memory Usage to know what’s more performance friendly. And 2. You absolutely should test your game to see if Unions/Meshes work best for your situation, but be prepared to undo those changes if they aren’t. The best way to know is through testing.
Every game has different needs. Blanket statements typically aren’t helpful.
I talk more about performance optimization in my RDC 2020 talk here:
Not to sound rude, but this information is already something I knew - including your useful talk regarding building performant games
I’m mostly wondering about more of the theory behind the optimizations and speed, I.e how much slower a union is when taking into account with having to load in four different LoD levels of the union (levels 1-4) ect. Though the chances of an engineer replying to this are probably very slim, lol
This is what I’m getting at: It varies greatly depending on a large number of factors, so much so that it might actually be faster, not slower, depending on how it’s used. Because of this, no engineer can reasonably give you a definite answer.