Hacker News new | ask | show | jobs
by hackits 2759 days ago
Got into some heated debates with people about physx where from a developer standpoint it was off-loading all calculations to the CPU with the present of a physx GPU. Typically in game engines you need to pause the world and look into the physx simulation to get the object's pos/vel/mass. This causes the physx engine to stop the world to finish it's calculations so crossing the PCI bus becomes more and more expensive.

Vast majority of the time, most game engine's to solve this problem just let non interactive objects (cloud's, waves, lighting) to be calculated by the phyx sub-system, and only poking it now and then to prevent the phyx hardware from swamping to the CPU.

1 comments

> Typically in game engines you need to pause the world and look into the physx simulation to get the object's pos/vel/mass. This causes the physx engine to stop the world to finish it's calculations so crossing the PCI bus becomes more and more expensive.

PhysX keeps two copies of the simulation, you read from one while PhysX is updating the other, and then they swap the pointers. You don't cross the PCI bus to get every position/velocity, that info is transferred in bulk at every step.