Mesh and CSG Collision Detection Improvement

As a Roblox developer, it is currently too hard to use large meshes.

Problem:
Roblox collisions are extremely bad on large meshes. Mesh buildings and terrains have been out of the question all the way back since Free-D came out. Now, because Free-D was technially a hack, I can let it slide, but now that we have actual meshes in roblox, I think we should seriously consider finiding an alternative to the low-poly collision meshes.

Example Photos:


Solution
There are a few ways to fix this problem. Here are the ways I came up with:

  1. Cumulative Triangle Count
    If your game is small, you would rather have perfect collsion meshes because it will still perform fine with the high-poly collision meshes. So you could tell the game that you want your max triangle count to be cumulative of everything in workspace (i,e. there is a max of 50000 collision triangles in the workspace at one time or something). This would keep performance under control as well as make the collisions work.

  2. Collision Mesh editor
    Roblox could have a built-in collision mesh editor that would recalculate specific parts of the mesh at the expense of another part of the mesh. This would allow us to take out unimportant parts of the mesh (For instance, a window too small to do anything with) and use the triangles that Roblox used on the unimportant part somewhere else in the mesh (like a vase on a table.)

  3. Imported Collision Meshes
    Roblox could check the model for an instance called “Col_MeshName” in the imported mesh, and if the mesh has a good amount of triangles, it will use the predefined collision mesh instead of the Roblox-generated one.

  4. “Perfect” collision mesh Fidelity
    A lot of games won’t need a whole lot of the “Perfect” collsion meshes due to the fact that most the time, default collisions work fine. But in the rare case that the whole gameplay of the game relies on one mesh’s collision (like an FPS map or something) this Collision Fidelity would come in clutch if all else doesn’t work. This would duplicate the original mesh and use it as a collision mesh. This would be useful on doorways, curvy hallways, etc.

Conclusion
Collision meshes are one of the most important pieces of a game. Without them, you have nothing but a 3D photograph. Collisions bring meshes to life, and having a perfect collision fidelity would be a whole lot better than attempting to split a mesh, then re-import each piece as it’s own.

15 Likes

This should go in Client Features (#feature-requests:client-features).

Think about it like this: if it doesn’t just affect Studio, but also live games, it should go in Client Features instead since it’s an engine feature then, rather than something that only occurs in Studio.

You can change the category of your post by hitting the pencil icon next to the icon and then selecting a different category. Just a tip!


Also, good job on the effort you put into writing this thread! :+1:

2 Likes

Ah, good to know. I’m new to the forums so sorry if I make a few mistakes :slight_smile:

1 Like

i utterly support this idea ; it currently takes far too long to get proper collisions ; time which should be spendable on other parts of game development ):

1 Like