I would like to know from a render performance optimization expert here if the size of a basic cube part affects the amount of data required to replicate/load into the workspace/client (Streaming enabled purposes)
For example, would a basic size (2,2,2) standard plastic material part be worth the same amount of memory as a, say, 10,10 ,200 plastic material part ? I assumed yes as I believe triangles/faces are the cause of a higher memory cost?
My only guess is that if it would be worth more data, itâd have to be material-related? (Robloxâs material mapping having to tile more as the part grows in size?)
Side note-
I am currently creating a âCellâ system for my game (remote Building interiors physically located far from the main map) , and have noticed that while building, I noticed that some ambient lighting passes through the corners of the roomâs edges, so I want to know if it would be efficient to use thicker parts to completely block the lighting without wasting more memory than I should.
EDIT: Here are some examples of the âleaky lightingâ to clear things out:
The answer is actually very complicated, because there are a lot of optimizations to cut down on memory. There might be more, but here are two examples that I know of (but cannot confirm)
Default properties are not stored. So if you insert a part and do not change its color, the color property will not take up any memory.
Objects with similar properties are stored together in memory. So letâs say you have a house made out of many parts that share the same material, color, shape, elasticity, friction and so on. Instead of storing the data for all these parts separately, it is âgroupedâ together in memory to take up less space. Grouping is possible because many properties are shared, so you only have to store the differences.
Again, I am not 100% sure about the accuracy of all of this. And in reality, you donât really have to know it either because these kind of optimizations arenât needed in 99.9% of the cases.
Also, the more complex the shape of an object/mesh, the more memory has to be stored for the mesh. However, the scale of the mesh does not matter at all. If you scale up a mesh it will not take up any extra memory because the number of triangles stays the same. The shape is not changed. The mesh has just become bigger.
Textures are stored only once in memory. Five objects with the same texture wonât take up more âtexture memoryâ than two objects with the same texture, because they reference the same memory space. What does matter though is the complexity of the texture. The higher the resolution, the more memory it takes up. However, what you see often is tileable textures, which can be copied and pasted next to each other to look like one big texture, while itâs just small patches of the same texture. This tiling means small objects and large objects can have the same detail without requiring any extra memory.
Using the info from above, itâs safe to say that making your part thicker isnât going to waste any extra memory. And if anything, one part is dirt cheap anyway. There are Roblox builds and games with up to a hundred thousand BasePart objects nowadays that still run totally fine. Donât worry about it.
tl;dr Donât worry about memory. Just make sure youâre not making shapes that are super complex and youâll be fine.
Thank you very much for clarifying! I can now return to building safely.
From what you told me, I think Iâll go ahead and change all of my radius detection partsâ (That use a .touched event) color to default and pretty much every part I have in workspace meant to serve as a CFrame reference for spawning, Camera angles, etc.
So to find a way to see if this theory is true (With the partâs memory use) you could try to convert a bunch of parts into meshes (Iâd suggest using spheres to speed up the results.) Letâs say you have about 50 spheres youâd like to convert into a mesh. On one side, all of those spheresâ size are 1,1,1, on the other, 10,10,10. Try converting both of them one at a time to see if they have any differences, thus, this theory can easily be tested as Roblox Studio will reveal the amount of triangles your mesh contains if it exceeds the 10k tris limit.