Skip to content

Separate colliders have worse perf than compound #730

Open
@JulianKnodt

Description

@JulianKnodt

I was testing out rapier on a number of primitives acting as a single collider, and from the docs it would appear that using a single compound collider versus multiple individual colliders is identical, except for the fact that using multiple would provide the collider which hit the object. What I found is that with many colliders (a few hundred), the performance slowly becomes worse and worse over time. I'm not sure what's causing this or if it's intended, but it was certainly unexpected.

If it's intentional, then it would be good to make a note of what causes it and to be wary. Otherwise, I was testing it in my own test in the testbed app. I'm not currently able to make that available, but I essentially had a large number of boxes, cylinders, and capsules and was testing collisions by dropping 5k balls on top of them. In the tail of the simulation (i.e. after the first 500 frames), the frame duration slowly creeps up.

After switching to a compound collider, the performance was stable through the whole simulation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions