# Are low poly collision meshes necessary?

## Recommended Posts

When modeling my stuff I always wonder if it is really necessary to model low poly collisionmeshes. It is said you should for performance reasons, but usually you can just use the visible mesh and it works fine, there is no performance problem with that. Organic high poly shapes like player models of course should have low poly collisions, but in case of the player a whole other system is used with the bounding box.

So when does it make sense to use low poly collision meshes?

I made some tests and only really high poly objects give performance hit if you use visible mesh for collision, for example I made a metal grid that the player walks on, all out of meshes and with visible mesh collision and there was a noticeable performance drop when walking over it.

For regular scenery objects visible mesh works fine in most cases, also I could imagine physical objects that are rigid and/or destructible and fly around a lot profit a lot from as low as possible collision polygons.

##### Share on other sites

The lowpoly/convex collision meshes will always be cheaper to process, and it's not too hard to understand why when you look at how collisions are actually processed.

When you test a collision mesh, the Convex object is created, which containts the vertex/tri info of that convex collision mesh, and it's all stored in a singular package. When we go to test collisions against this, we can quickly iterate the entire mesh because we know the data inside it is stored as a convex, which lets us make several - efficient - assumptions about the math we need to successfully test for a collision. The math to test convex intersections is far simpler - and therefore faster - than concave.

When setting up a collision for a visible mesh, aka polysoup, we have no way of knowing how the tris are set up, so the smart assumption is that if they're doing a visible mesh collision, it's not going to be convex shaped. So what we end up doing is iterating over each triangle, which gets it's own Convex entry, where we can use the efficient math. This keeps it simple and standard, but does mean that the denser your mesh is, the more Convex are created, and the more time it takes to process a collision. So it ramps linearly.

##### Share on other sites

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.