Collision cost

For our game, use case is quite simple – all non-skeletal geometry is generated at runtime (except skybox), and collision is created by passing all triangles (as per ProceduralMeshComponent). Therefore, collision is quite complex.

In a arbitrarily selected view, we could have some 500k vertices, ALL of which participate in individual object’s collision primitives. However, all of our performance is consumed by either GPU or Render thread, and just a fraction on the CPU. Even a scene with some 50 NPCs roaming about, we don’t start noticing collision taking much of the CPU. This is probably due to fact that most of the walkable surfaces have triangles that are some 2m-5m in size. Most of the objects with higher density are not collided with very often.

Reason for curiosity (but not enough to start some elaborate measurements) is concern that at some ‘later’ stage we’ll have to redo all our collision primitives. Quite a bit of our gameplay relies on accurate collisions. If we have to simplify it, we would get into all kinds of problems requiring further rework.

Our current gut feeling is that complex collisions cost some RAM but bounding boxes of the object take care of all non-collision cases. Since bounding box processing is per-object, non-colliding doesn’t add any CPU time.