Use Case #1
I often run into problem with scaled down versions of character models due to the minimum part size limitation of 0.05:
To work around this I need to add invisible point triangles to a lot of accessories/decoration to increase the bounding box size. With a larger bounding box encompassing the mesh, I can resize it while staying above 0.05.
As you can imagine, I need to do this for a lot of meshes and it’s a waste of time. It’s an especially difficult limitation to work around when developing customizable insect characters.
At the very least it would be nice if that extra bounding box triangle didn’t affect performance. It’s important that these triangles aren’t discarded entirely, because there are valid use-cases for needing meshes to line up in specific ways. It’s also important to note that these parts are purely graphical, and the part size limitation of 0.05 only makes sense relative to parts that need physics.
Use Case #2
For my terrain system I decided to cut back on the number of triangles by switching over to MeshParts.
My system processes the mesh to optimize for special concave cases to reduce the number of parts, but it still needs to render up to 14 triangles (actually 18 triangles according to the performance tab) on the underside of terrain to draw a single triangle:
I go into more detail about how this works and why I decided not to use smooth terrain in this post:
So I need to create a MeshPart with just 1 triangle that has reliable WedgePart physics. I tried 3 approaches:
MeshPart A’s physics did not work at all, and the bounding box centered around the triangle. MeshPart C looked like the best option because the back face doesn’t render, however, C’s hull physics is sharper than I want, and could cause small characters to fall through the MeshPart’s edges. I really need B’s collision behavior for my use-case. To work around this I saved MeshPart B and MeshPart C to .rbxmx files and manually copied the PhysicalConfigData
data from B to C.
Engineers have made it clear that you shouldn’t rely on this because physics data could be re-generated in the future, but the current physics data that gets generated doesn’t work or is poorly optimized most of the time. Often I just want a slightly better approximation than Box, or simply don’t want my save file to be huge and affect performance with complex collision data. Anyways, I’m careful to only copy physics data between MeshParts that share the same bounding box.
This is great, I have a WedgePart alternative that uses 1 triangle and has correct physics. The problem is that according to the graphics performance tab, each MeshPart still has 2 triangles even though one of them is just a point that’s used to get the correct bounding box. I created 10k of each part and measured the triangle count in the scene:
I would like to be able to define the bounding box of a MeshPart using point-sized triangles without the client trying to render them. MeshParts still use about 1/10 the triangles WedgeParts did for this use case though, even with the infinitesimal triangles there.
Here are some other use-cases for controlling MeshPart bounding boxes.
- Sharing or copying physics data between similar meshes by manually copying PhysicalConfigData between within a file. This isn’t ideal and won’t necessarily be supported, but there isn’t any other way to fine-tune physics data.
- Changing the center of the bounding box to equal a pivot point so that the part can be cframe’d efficiently without needing a
ToWorldSpace
operation. - Creating specialized meshes where all points are coplanar and controlling where that plane is relative to the part’s size.