NVIDIAGameWorks / PhysX

NVIDIA PhysX SDK
Other
3.16k stars 802 forks source link

PxVolumeCache raycast vs PxScene raycast #567

Closed pkusilence closed 2 years ago

pkusilence commented 2 years ago

When optimizing raycast comsuption for vehicle games built on Unreal 4.27 (PhysX 3.4.1), we observed that

  1. regular raycasting(not PxBatchQuery) for a 4-wheeled vehicle takes 2.25us each ray, and PxVolumeCache raycasting almost uses the same time.
  2. raycasting for a 1-wheeled vehicle takes 6.5us each ray, which is much more than 4-wheeled vehicel version;

So we guess that there might be some mechanism utilizes space coherence of rays in PhysX. How does it works? And Is it the reason that PxVolumeCache is deprecated in PhysX version 3.4?