As a Roblox developer, it is currently relatively impossible to create an entire map out of meshes and have accurate collisions without jumping through hoops like such: https://www.youtube.com/watch?v=pOSTafvSWvU this can work for some use cases but for games such as mine with vehicles that rely on physics and friction, separating faces with gaps causes instability when driving over the gaps.
If Roblox is able to address this issue, it would improve everyones development experience because MeshParts have been available since 2016 and the collision solver cuts corners where possible meaning doorways are walls and changes in elevation become levelled out. I’m pretty sure this is an out-the-box feature on every other gaming engine lol
Using meshes for development on large maps is great because it allows you to manage how many triangles are in your map, and it also means you can be more precise with your modelling and detailing. The lack of this feature is completely bottlenecking our development, if anybody knows a workaround for this that doesn’t involve invisible triangles to make up for the collision hitboxes or separating faces to “trick” the solver then please reply to this or DM me.
I support this! But I think roblox isn’t adding this as it could get extremely laggy and could be abuseable. (Developers can just have a lot of meshes with exact fidelity, which causes players to lag or crash.) This would be the case until Roblox decides to fix its physics engine completely.
I saw a post that dated all the way back to 2017 on this topic, however I can’t seem to find it. You raise a valid point but there are some developers who would use it sparingly and with purpose rather than over-using it, to not add a feature due to the possibility of it being abused and causing lag/crashes isn’t really ideal
That’s why I agree with it. I would LOVE to have this. I simply provided a possible clause on why Roblox doesn’t have this already.
One thing I’d add to this is to make a slider property that would determine how exact the mesh actually is. It would vary from PreciseConvexDecomposition (Level 0) to Exact (Level 5) Collision Fidelity. It would basically replace the PreciseConvexDecomposition enum item. This would offer more control.
I am skeptical that this isn’t a thing even in other game engines at the scale you are requesting, simply due to the outrageous performance required to uphold per-triangle collision detection for every MeshPart.
To add to this, Roblox’s main demographics are mobile/tablet platforms where CPU performance is inherently weaker vs modern consoles such as the PS5 and Xbox Series S or X.
Do you have examples from other game engines that apply this method of collision logic on every aspect of the map, similar to your average instance count for MeshParts since you have mentioned extensive use of it, while also enabling mobile gameplay?
I believe it is. There’s always methods to limit the performance impact of per-triangle collision, or any performance-heavy task for that matter.
I had a feeling mobile/tablet would be mentioned, and I do agree that they should accommodate for both. But not adding relatively basic features because of a larger demographic doesn’t sit right with me as it really does limit the creativity and bounds of the platform, which are supposed to be pushed.
Unity is a good example, you can make mobile games on Unity with ease. They have a built in Mesh Collider instance which can allow for computationally-expensive but precise collisions, or in Roblox’s case a basic corner-cutting less expensive collision option. It can be used at the develoeprs discretion, and that’s an out the box feature. I wasn’t implying that it would be used on every mesh at all, it would be used sparingly and only on the ones that require it.
To follow up on my previously mentioned performance limiting method for per-triangle collisions I think the best approach would be to load/unload collision meshes based on distance using Octrees or spatial hash grids or something similar. The visible mesh would not be collidable, whilst the collision mesh would be invisible and only serve the purpose of collisions. A modern handheld device or console could easily handle such tasks even on a large scale map. As I said, when used sparingly.
This sounds like a problem with PreciseConvexDecomposition if it isn’t being very precise or (as shown in the video) needs to be forced to generate a more accurate decomposition by changing the mesh.
PreciseConvexDecomposition isn’t exact though, and it was never intended to be. It’s just more precise than Precise. What I’m pushing for is exact collision geometry based on the mesh itself, or even the ability to link/upload your own collision geometry to MeshParts.
But the video is clearly showing that you can make it more precise by changing the geometry.
The issue is that every video game physics engine out there needs convex geometry. I really don’t think a single one exists which can correctly simulate exact meshes themselves. PreciseConvexDecomposition is precise in that it creates several convex shapes out of the original geometry to match it as close as possible, while staying as just a set of convex shapes.
All the method in the video is doing is creating more convex shapes to create a more precise approximation by introducing gaps in the geometry to trick the algorithm into thinking the mesh is more complex than it really is. This sounds like it could be a bug with the PCD algorithm to me, because it’s not generating enough convex shapes, even though it could, for geometry that needs it.
If a mesh somehow has awful collisions even with PreciseConvexDecomposition, I just use Tyridge77’s MeshVox plug-in to generate a wedged version of that mesh, and then make those wedges invisible and disabling collision for the original mesh.
Providing a quantifiable example of a map in the game engines you listed making extensive use of objects with the proposed collision fidelity that you desire for Roblox would help me better understand if this is a reasonable suggestion or not; not just explaining the fact that, while this can be done in other game engines, you are still unclear on if other games/engines have demonstrable performance for hundreds/thousands of objects pertaining to per-triangle collision on mobile platforms.
Roblox already makes use of a BVH that goes at least down to the Instance level. That is then shared with both the physics system and also for raycasting for two important reasons; less calculations, and more memory saved.
What you propose in doubling a meshpart’s performance/memory footprint due to transforming & replicating it into the collision logic for the physics system is a slippery slope that can, and will, result in increased performance/memory overhead.
You’re right that you didn’t imply this. You explicitly stated it as your main point for this feature suggestion.
Second this, perfect mesh collision just simply is not a thing you can do at scale. For perfomance reasons there will always be lossy generalizations made to the shape of the mesh’s hitbox. Many games opt to use multiple hitboxes for things like player characters which have complex structures but still need a somewhat-precise hitbox rig.