Making walls out of roblox part or two sided mesh?

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 many walls/parts do you estimate will be in the build?

No idea but a lot

80k maybe even 100k

Use Roblox parts. They’re more optimized (as everyone has it on their device) and they have less faces.

Unlike meshes, parts don’t have to be obtained from Roblox’s library. Also, Frustum Culling and Occlusion Culling are easily achievable with parts.

1 Like

There’s no point in using double sided faces like that. If you wanted to save geometry, you’d only have the outsides.

Also, it’s not 2010 anymore, you have a lot of leeway

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.

1 Like

That mesh has 2 rectangles, but squished.

So, 6 faces for a part (12 triangles) + 6 faces for the other part (12 triangles) = 24 triangles in total.

Also, meshes take more time loading, since they’re obtained from the Roblox library.

1 Like

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 already in the client, thus more performant, but only by a FEW miliseconds.

True!

We don’t know if the OP’s mesh is a rectangle, or a VERY thin part, so we can’t verify it.

You are right. That’s why I mentioned that it’s OPs choice to choose what they want.

One is performant long term but one is performant for short term. But at the end both are pretty much the same.

Good observation! It could just be a part with 0 size or maybe a mesh with double sided enabled.

1 Like
  1. 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.
  2. If you worry about triangle limit, then roblox did occlusion culling.

I would say: Use parts.

1 Like

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.

2 Likes