New Studio Feature - CollisionFidelity.PreciseConvexDecomposition (Enabled Globally)

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.
image

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)
image

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: http://khaledmammou.com/hacd.html
  • 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.
333 Likes

Yay, I really enjoy this update not only it can do for fun physics or anything but it also helps other people. the feature is really good by the way and also we thanks you for make this beat feature much useful for other players.
Job well done

18 Likes

Ah yes now i can Union door ways with out the possibility of not being able to fit through them. Great job!

35 Likes

Thank you for this - this will definitely help with generating more realistic/physically consistent union behavior.

On the other hand: the marble video may be the thing I remember from this update most c:

14 Likes

Can’t wait to test it out, this is an interesting beta feature.

7 Likes

Marble Roracers here we go :sunglasses:

seriously though this is awesome

11 Likes

At last! And just yesterday I was worrying about how complicated it’d be to make underlying collision made of triangles if I ever wanted to do something with a custom model or texture. I can already imagine this feature will see heavy use by many developers.

11 Likes

This is amazing! Great Job! :slight_smile: :grinning: :smiley: :star_struck:

7 Likes

Amazing update. If you have beta feautres enabled in Studio does that cross over to live servers?

14 Likes

Finally, this feature that has crashed Studio every time I selected it is finally enabled!

Now if I enable the beta feature, selecting this won’t crash Studio anymore? :stuck_out_tongue:

7 Likes

It was… crashing before? That is very not good, it was simply supposed to block you from setting it! Did you report that previously?

7 Likes

No, thought it was my specific studio. Guess you forgot to remove the option from the dropdown when the feature wasn’t enabled? Was it under a fast flag for a while, present but disabled? That would explain it.

10 Likes

Will we ever have access to geometry data within studio? If not, are there any alternatives to retrieving geometry data outside of studio? I’d like to have support for meshes and CSG models on my own collision engine, but I haven’t found a way to get Roblox’s generated geometry.

Since you have to upload meshes to Roblox, I’d assume you could download the data somewhere?

8 Likes

No plans for this right now.

The drop down wasn’t removable, but I made to the option was “grayed out and unselectable”. Are you on Mac or PC?

9 Likes

feature good, good faeture i like it, good. reply good, good reply., yes good. very physics have collide, very cool and realistic colide

(P.s. I love this, it’s the solution to all of my CSG problems)

12 Likes

No more mesh splitting. No more making your own collisions. No more unneeded pain and suffering. Thank. You. So. Much.

Edit: I was playing around with this. This is much more powerful than we all think.

Here’s a hallway I made that was previously restricted (& dropped) due to the lack of collisions.
Mind you, this is all meshparts.

What it looks like:

Before:

After:

26 Likes

This is kinda hot though, thanks a lot for this. This’ll make alotta peoples’ lives easier. I know it’d make mine easier… XD

6 Likes

I made a road model in blender to see how well the new feature works.

Blender

Before

After

There’s only one odd area on the decomposition geometry, but that can easily be fixed by tweaking the mesh inside of blender.

Deformities


image

This is an amazing update! I can see car games switching to meshes for their roads in the near future. Hopefully the minor deformities are gone by the time the feature comes out of beta, but so far, the geometry is pretty spot on for 99% of the mesh.

13 Likes

Part of how the algorithm works is that, when it thinks its safe to combine objects into a convex hull it has some sample points along the original triangle surface input and it raycasts outward. If it hits the back surface of a convex hull, it measures the distance.

Currently the “max allowed” distance is set to be 1/100 of the bounding box of the average shape, meaning you can close a concavity that is 1% of the shapes bounding box size. Do you mind PMing me the mesh so that I can make sure this is performing within those restrictions?

11 Likes

I sent you the mesh, but I’d like to point out that I’m a horrible modeler and there’s probably an error on my end.

4 Likes