Hey all, I’m excited to announce that something I’ve been working hard on for what seems like a long time now is available for use in Roblox.
MeshParts and PartOperations now have “CollisionFidelity.PreciseConvexDecomposition” as a newly available CollisionFidelity setting.
This new setting prioritizes respecting the surfaces of whatever geometry you ask the system to generate. As some of you may know, the Default algorithm we use tends to lead to strange results, such as doorways that you can’t fit through. This new fidelity setting should alleviate most of the painful cases you have been experiencing, but please keep in mind the following:
- The resulting geometry may take longer to compute.
- The resulting geometry may be more expensive for collision detection.
- The resulting geometry may not be completely “filled in”, meaning the interior may be hollow.
- The result IS NOT A 1 to 1 REPRESENTATION OF THE VISUAL. There are still features that will be simplified. Cylindrical tunnels will not have perfect smooth surfaces!
So unless you need the extra precision I still advise relying on CollisionFidelity.Hull and Default.
Here are some examples of the things that weren’t possible before with PartOperations and MeshParts, but are now due to CollisionFidelity.PreciseConvexDecomposition
Video 1: CollisionFidelity.PreciseConvexDecomposition allowing CSGed holes to pass objects through.
Video 2: CollisionFidelity.PreciseConvexDecomposition is the model on the left. Middle model is the visual input geometry, and the model on the right is CollisionFidelity.Default
When experimenting with this new setting, please be aware you can inspect the collision geometry visually with the help of a Studio setting (File → Settings)
UPDATE: 5/13/2020
- This is no longer a “Beta Feature” and can be used by everyone
- This does not mean it is bug free! Please keep submitting meshes with issues if you find them!
NOTE:
- Next release of Studio has a major improvement that isn’t released yet, so you may run into some shapes that break this process.
- Please let me know if you encounter any shapes that either cause Studio to lock up during reprocess (more than a few seconds), or shapes that result in incomplete results.
- This being a beta, I want to make sure there aren’t any issues I haven’t been able to anticipate before doing a full release.
EXTRA INFO:
- The new algorithm is a heavily modified algorithm presented here: Hierarchical Approximate Convex Decomposition
- I’ve re-written approximately 50% of it and will be posting a technical blog on the details soon ™.
- The implementation has a lot of room to add extra collision fidelity presets that allow us to customize for performance or specific distances of “important features”. Having some internal discussions on what we can expose to users.