Which algorithm Unity uses for creating the 3D convex hull when generating convex Mesh colliders?

I was here wondering. Does anyone know, has any idea or suggestion on the reference for which algorithm Unity currently uses to generate the 3D convex hull when users add Mesh collider component and then select the “convex” option?

I always like to understand what is going on under the hoods in my applications, but I’ve been struggling for a while to find that one out.

Thanks!

It’s whatever PhysX does, since that’s the physics engine Unity uses for 3D.

–Eric

That makes sense, of course. The issue is that I was not sure whether PhysX even had its own convex hull implementation. But now that you mention, sounds reasonable since the engine would need a way of creating convex hull bounding polyhedra.

Look up convex hull algorithms in Google, there’s one that takes a series of points and finds the minimal bounding polygon. If I were to guess, they’d be using that one.

Thanks for your reply, macdude2. The problem is which of the many algorithms that do that. Because there is more than one. And what I am interested in is precise in finding exactly which one.