NVIDIAGameWorks / PhysX

NVIDIA PhysX SDK
Other
3.11k stars 793 forks source link

Merged / separated trimesh, which is better for collision detection? #608

Closed pkusilence closed 5 months ago

pkusilence commented 1 year ago

In game dev, visible trimeshes are often merged to reduce drawCall, which leads to huge AABBs for collision detection. We are wondering if those meshes are separated, the collision detection can be faster?

I have done a test that 168 convexes move along a straight racing line, with merged / separated trimesh as roads and fences. The result shows that the performances have no difference. (But if the convexes are not aligned with roads and fences, the simulation consumption increases 0.22ms. since midphase has easier codes to transverse AABB rather than OBB).

image

pkusilence commented 5 months ago

The test results have no large difference between merged / separated trimesh.