Triangle mesh sim performance

Hello! We are trying to use triangle mesh for static ground simulation. We have 78400 triangles in it and very slow sim (~1fps for ragdoll on it). This mesh is exported from 3dsmax PhysX dcc. PVD profiler say narrowPhase is slow part, looks like all 78400 triangles are iterated for collusin detection. I thought, what PhysX uses BVH for triangle mesh simulation - but it looks like, it is not so. I tried to reCook my mesh on loading with different flags - nothing changes. So we have to split our mesh on multiple small shapes/actors to involve broadPhase optimisation? Why there is no BVH embeded?

Hi,

Having 78400 triangles shouldn’t be a problem for the sdk but it might be a problem if all 78400 triangles were under the ragdoll. Another way of saying this is that triangle density is more of a problem than triangle count.

The sdk picks out a sub-set of triangles that might be involved in collision before doing the collision detection. Selecting the sub-set of triangles is almost never the bottleneck and I’d be surprised if this turned out to be the case here. If there is a high triangle density under the ragdoll then there will be a lot of pressure on the collision detection part of the algorithm.

Could you verify that you have a low density of triangles under the ragdoll? Also, could you try to drop the ragdoll on a simple quad to compare performance?

Cheers,

Gordon

Here is PVD: https://drive.google.com/file/d/0B1SCg9e5O89zU1ZlSWswc0Y3amc/view?usp=sharing
Slow begin after enabling ragdoll articaulation (est 1 sec offset).

I made a repro using your mesh. I wasn’t able to import the ragdoll but I made my own with pretty much the same complexity and dropped it at roughly the same coordinates.

I’m afraid I can’t repro the performance numbers that you report. Narrowphase is never the bottleneck in my repro and peaks at around 0.5ms for the insertion frame. In your scene, pvd reports 320ms in the insertion frame.

I’m wondering if you are getting warnings in your scene. Repeated warnings to the tty, for example, might account for the excessive times you are experiencing. Could you take a look at the warning stream just to make sure?

Cheers,

Gordon