3 ms·
There are a lot of comments about CUDA and GPU compatibility, etc. PhysX is mostly a CPU library, although there are systems that can run on the GPU, GPU physi
by Impossible 8y ago
There are a lot of comments about CUDA and GPU compatibility, etc. PhysX is mostly a CPU library, although there are systems that can run on the GPU, GPU physics are not widely used in shipping games. Both Unreal Engine and Unity use PhysX as their default physics engine. It runs on all platforms these engines support (Windows, Max, Linux, Android, iOS, Nintendo Switch, Xbox One, Playstation 4), Nvidia hardware is not required.
The position based dynamics code is in a separate SDK called Nvidia Flex ( https://developer.nvidia.com/flex https://developer.nvidia.com/flex). Flex is closed source, runs on the GPU and is implemented in CUDA (Nvidia only).
- ygra 8y agoIs that at the game's discretion where to run the physics code or does that selection between GPU and CPU in the NVidia control panel actually work?
- deleted 8y ago[deleted]
- dlahoda 8y agoso oss what is useless in future because of inevitable volumetric future(flex)
- Impossible 8y agoIf you want OSS Position Based Dynamics code you can get Mueller's original C++ implementation here (https://github.com/InteractiveComputerGraphics/PositionBasedDynamics https://github.com/InteractiveComputerGraphics/PositionBased...). The GPU implementation is not open, but this code can be adapted to run on the GPU outside of Flex. Scrawk converted the code to C# in order to support Unity and implemented a Unity based version of the fluid dynamics code that runs on the GPU (using portable compute shaders instead of CUDA) as well. https://github.com/Scrawk/Position-Based-Dynamics https://github.com/Scrawk/Position-Based-Dynamics https://github.com/Scrawk/PBD-Fluid-in-Unity https://github.com/Scrawk/PBD-Fluid-in-Unity The only game that I'm aware of that uses position based dynamics on the GPU is Claybook (https://twvideo01.ubm-us.net/o1/vault/gdc2018/presentations/Aaltonen_Sebastian_GPU_Based_Clay.pdf https://twvideo01.ubm-us.net/o1/vault/gdc2018/presentations/...). Because PDB is basically an extension of Jakobsen style verlet physics (http://www.cs.cmu.edu/afs/cs/academic/class/15462-s13/www/lec_slides/Jakobsen.pdf http://www.cs.cmu.edu/afs/cs/academic/class/15462-s13/www/le...) which is used in a lot of games (Fantastic contraption, Gish, World of Goo, various Bridge builders, etc.) In all cases the developers are using custom physics code and not using a library. This is very different than rigid body dynamics where most shipping games use a licensed physics engine (Havok, PhysX, Bullet, ODE, etc.)
- jsheard 8y ago> Flex is closed source, runs on the GPU and is implemented in CUDA (Nvidia only). Flex 1.0 did require CUDA hardware, but with 1.1 they added a Direct3D backend that runs on any DX11-class GPU. https://developer.nvidia.com/nvidia-flex-110-released https://developer.nvidia.com/nvidia-flex-110-released