MeshPart Usage, Performance & Optimizations

Wow! This is a nice tutorial about Meshes. Thanks for all the information, now I know how I can optimize my game! :smiley:

5 Likes

Working on reformatting the topic and adding more FAQs. Let me know if I should add anymore sections about MeshParts. I’ll probably end up adding stuff about DoubleSided next.


Really nice to hear! I hope your games turn out great!

2 Likes

This tutorial is is great! You could have added a little bit more about meshes for beginners but this is so far good!

1 Like

Love this it helped so much thx keep up the informatinal post!

1 Like

Thank you so much for this really well documented tutorial !

1 Like

Sorry if this is a dumb question, but would a roblox cube (regular part) be the same as a cube that you made in blender and imported in roblox as a meshpart, in terms of performance? For example, the tree trunk would be made in blender, but if I wanted my leaves to be cube, I could just use the regular roblox parts instead of meshpart cubes from blender. Would it have the same performance?

3 Likes

I was actually wondering the same thing! I don’t think this is a dumb question.

3 Likes

@robloxdestroyer1035 @BlockyHead2006

They would not be the same. Roblox parts (CornerWedges, Wedges, Spheres, etc) are pre-downloaded on your device. MeshParts have to be downloaded from the website. In your case, I suggest using Roblox parts.

The only difference in terms of performance would be loading times. Since it takes time to download the mesh geometry while the Roblox part geometry is already downloaded onto your device. For one block MeshPart, it wouldn’t have any effect at all, but it’s a waste of time, so just use Roblox MeshParts.


There are cases where using MeshParts instead of basic parts can (arguably) perform better. I won’t get into it here and unless your game is struggling with lag you won’t really have to read up on it. I do however think it’s a useful tool but it can be kind of time consuming.

In simplicity, it reduces triangles while reusing the same MeshIds for optimal loading speeds and better FPS (frames per second).

5 Likes

Updated the topic for spelling and grammar mistakes as well as adding some more information. I’ll be working on adding TextureID compression next, then I’ll work my way around to StreamingEnabled and DoubleSided.

7 Likes

Thank you! I never knew about disabling CanCollide, CollisionFidelity, and CanTouch for unnecessary parts of your game. This will help me a lot! And you just saved me a lot of memory from doing this method. I can’t thank you enough for it, you’re a life saver. Thank you very much!

2 Likes

Hey, I was wondering if there is any point to changing the CollissionFidelity if the object doesn’t collide.

2 Likes

If possible, yes, you should change the CollisionFidelity to Box if the object has CanCollide disabled. You should also disable CanTouch if the object is never going to be interacted with. (ex. if it’ll never use a .Touched event, disabled CanTouch as well.)

As for why you should do this, on atleast Future lighting, I’ve found that if you have a MeshPart with a CollisionFidelity that isn’t Box, it’ll create this weird shadow. Reminder that this shadow is only visible if EnvironmentDiffuse/SpecularScale is higher than 0.

Also if you set ~50 MeshParts CollisionFidelity to Box in bulk, it’ll take no time at all but if you set them all to Default/PreciseConvexDecomposition it might take some time depending on how many triangles your MeshPart has.

In short, set it to Box CollisionFidelity to be safe.

1 Like

Thanks for these tips and tutorials now my game will be compatible with nearly any device!

2 Likes

thanks for this tutorial it will help me a lot

2 Likes

Amazing explanation and it all works! 10/10!

1 Like

There’s a small performance change from toggling this? I thought that these properties don’t affect performance as stated on this DevHub on collisions.

Do not, however, take time to set this property on distant objects that will never collide with anything, as it will not improve performance.

If this does affect performance then is it worth changing the collision settings on hundreds of assets and will the performance gain stack?

1 Like

I believe that DevHub page is outdated and is only talking about CanCollide. Back when CanTouch didn’t exist, I believe that it had extremely small (probably negligible) performance boosts when disabling CanCollide on parts that didn’t need collisions.

However with CanTouch and CanCollide being disabled, there is a performance gain. You can read the entire post here, I suggest reading the replies too (if you see mine I specifically ask about the performance boosts and whatnot), the staff themselves said on the post that it does have a performance boost, as shown here:

I asked this question to the staff, you can read it yourself on the post I linked above.

In short, it’s always worth it to disable CanCollide and CanTouch whenever possible. It will provide a performance boost of some kind, but that depends on the size of the part, if it’s moving, and how many parts have both of those properties disabled.

Hope this helps!


Note: Also completely forgot, if you’re disabling CanTouch and CanCollide, it’s worth it to disable CanQuery as well. It completely removes collision calculations across the board. However I still assume CanTouch and Collide disabled will provide FPS boosts, like stated by the staff.

4 Likes

This is a extremely helpful tutorial. I learned lot about collision fidelity and render fidelity, thanks!

3 Likes

Best post on this topic! Really love how in depth this is. I wish I found this when I was first starting out!
I will recommend this post to my friends :]

1 Like

Sorry for the bump :smiley: amazing tutorial!

I understand that this is a plugin, but anyone got any idea on how to troubleshoot precise problems with the collisions? I’ve noticed that using roblox parts usually gives them a bit of sinking space so they go inside each other, this may also be why thin parts phase through stuff easily.

I made a train track which is a mix of roblox parts and meshes and it has some scary collision jumps making it unstable and unusable. The plugin shows a seemingly accurate, yet somehow false collision decomposition. I’d assume this is more of a problem with the engine than the plugin.

Basically sometimes the parts sink, sometimes they don’t. In this image the front wheel is above the decomposed mesh collision shown by the plugin and the rear wheel is sinking inside a roblox block part. Wheels are roblox cylinders.

When I set the decomposition to precise it seems less precise than default, but apart from that initial jump the middle of the mesh is fine. With default on every edge of collision there’s a jump. By jump I mean a difference in how much the wheel sinks. This causes an unstable vertical movement that is obviously unhealthy for a rail vehicle. I would make it path based instead of physics so this can be avoided and performance can be spared, but idk how to do that yet.

In this image the left is precise and right is default mesh collision. I would assume it kinda fails because the curve is towards the inside as when you do a hull collision it completely flattens any indentations, inside curves or holes in a mesh.


1 Like