Calculating / approximating different colliders performance cost

Is there a way to calculate / approximate how many sphere, capsule and box colliders used for a single collider will be equal in performance to a custom made collider?

Sphere/capsule collision is very cheap, squares are cheap-ish, otherwise compare the number of faces and make sure the collision mesh isn’t concave.

Unreal has heavily optimized collision, so there isn’t a good way to compare performance with a graph or anything. The best way to test is to spawn a bunch of those colliders and stress-test them.

In a specifically designed scenario which you know the existing CPU cost of.

The cost is essentially “per definition” when it comes to convex collision.
If you have X number of primitives, then the cost is about the same wether you use X number of boxes, or spheres.

If you are talking about using complex as simple - just don’t.

Define custom collision for your mesh either in a DCC with UCX definitions, or use the engine to generate the collision based on parameters/number of hulls you feel appropriate.

Even with the hiest settings of that, you can have billions simulating physics with about the same load - wait, thats only true for physx. On Chaos, well, there is a reason they called it Chaos…

1 Like