Hi!
I’m in the process of making quite a large game and want to optimize it as much as possible.
I am considering replacing most walls with two a two sided mesh instead of using the roblox parts. Wondering if anyone knows if this would have any affect on performance at all and if it’s even worth doing?
While im at it, any drawbacks that come to mind using this instead of roblox parts?
How is a 6 sided shape with 2 triangles for each side i.e 12 triangles have less triangles than a shape with 2 faces with 2 triangles i.e 4 triangles?
The math is not mathing.
Also to OP: Use whatever you find well, both are good methods and both will have a negligible difference. But in the end, just ensure streaming is enabled.
A mesh with 2 faces will take almost to no seconds loading. It’s also worth noting that if OP uses the same mesh over and over then it will be more performant.
What?
2 rectangles is equal to 4 triangles. And you already said 12 triangles for the part so the mesh has 4x less triangles.
Parts are optimized by roblox itslef. It’s just plain cube, and thus rendering it knowing that it’s a cube will be MUCH faster than rendering the same cube but like mesh.
If you worry about triangle limit, then roblox did occlusion culling.
1- The renderer doesn’t know the part is a cube
2- I don’t think there will be a difference between a part and a meshpart that has the same mesh as the part
Cuz part is Roblox default part - it knows that. If it mesh - it needs to check especially for each face and vertex.
There will be diffirence. Try it out on giant scale, like 100k if you want. But to make fair experiment, make it so all cubes are fully visible.
As many have indicated, Roblox parts would likely be the way to go. As a more specific answer, optimization has two parts: geometry and resolution.
Geometry can be looked at via wireframe rendering. As there isn’t a lot of Roblox support on this, I will briefly explain that wireframe rendering shows voxels and triangles. A voxel is where a line originates from, and a triangle connects three different lines. A part can share voxels: the more voxels, the more triangles, the more lag. Unions tend to add more triangles that aren’t needed, which is why people say they are unoptimized. This is also why meshes are preferred to complex furniture, tools, etc.
The resolution is textures and images. The more textures and images in a game, the laggier the game. Roblox preloaded textures are more optimized than most textures you can add onto meshes.
Take these two into account and plan your game from there. For walls, I typically follow the one-stud rule (all walls are one stud thick and are sized using one-stud increments) and then split them in half as needed (0.5 on either side) for different looks on either side. Even in massive games, I’ve never run into optimization issues following this rule.