Search Unity

PhysX.BpSAP.updateWork 60ms (i5-8400)?

Discussion in 'Physics' started by xVergilx, Jun 2, 2019.

  1. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Got an issue with performance. Title.

    Does anyone know what that BpSAP is? Or what might be causing this issue?

    I've got a bunch of primitive colliders attached to the bones of animated characters.
    (That have all collision disabled between each other / world via collision matrix)

    Could it be causing this kind of issue?
     
  2. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Bump, UT?
     
  3. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Yes, it is caused by large collider count. I've just counted total colliders and it is 72 per entity (oof).

    Albeit I was pretty sure there shouldn't be that much of an overhead while having all collisions disabled.

    I guess they still need to be synced once they're moved by the animation.
    And zero optimizations done for this use case.

    30 x 72 == 2160 collider updates. Hmmm....

    I guess I'll need to find different solution to limb based damage system. Or use less colliders.
    Or by doing some weird tricks.

    I wonder, if detaching colliders from bones / updating them once in like 0.5 seconds will help in this case.