PhysX


PhysX is an open-source realtime physics engine middleware SDK developed by Nvidia as a part of Nvidia GameWorks software suite.
Initially, video games supporting PhysX were meant to be accelerated by PhysX PPU. However, after Ageia's acquisition by Nvidia, dedicated PhysX cards have been discontinued in favor of the API being run on CUDA-enabled GeForce GPUs. In both cases, hardware acceleration allowed for the offloading of physics calculations from the CPU, allowing it to perform other tasks instead.
PhysX and other middleware physics engines are used in a large majority of today's video games because they free game developers from having to write their own code that implements classical mechanics to do, for example, soft body dynamics.

History

What is known today as PhysX originated as a physics simulation engine called NovodeX. The engine was developed by Swiss company NovodeX AG, an ETH Zurich spin-off. In 2004, Ageia acquired NovodeX AG and began developing a hardware technology that could accelerate physics calculations, aiding the CPU. Ageia called the technology PhysX, the SDK was renamed from NovodeX to PhysX, and the accelerator cards were dubbed PPUs.
The first game to use PhysX was .
In 2008, Ageia was itself acquired by graphics technology manufacturer Nvidia. Nvidia started enabling PhysX hardware acceleration on its line of GeForce graphics cards and eventually dropped support for Ageia PPUs.
PhysX SDK 3.0 was released in May 2011 and represented a significant rewrite of the SDK, bringing improvements such as more efficient multithreading and a unified code base for all supported platforms.
At GDC 2015, Nvidia made the source code for PhysX available on GitHub, but required registration at developer.nvidia.com. The proprietary SDK was provided to developers for free for both commercial and non-commercial use on Windows, Linux, macOS, iOS and Android platforms.
On December 3, 2018, PhysX was made open source under a 3-clause BSD license, but this change applied only to computer and mobile platforms.

Features

The PhysX engine and SDK are available for Microsoft Windows, macOS, Linux, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, Wii,, iOS and Android.
PhysX is a multi-threaded physics simulation SDK. It supports rigid body dynamics, soft body dynamics, ragdolls and character controllers, vehicle dynamics, particles and volumetric fluid simulation.

Hardware acceleration

PPU

A physics processing unit is a processor specially designed to alleviate the calculation burden on the CPU, specifically calculations involving physics. PhysX PPUs were offered to consumers in the forms of PCI or PCIe cards by ASUS, BFG Technologies, Dell and ELSA Technology.
Beginning with version 2.8.3 of the PhysX SDK, support for PPU cards was dropped, and PPU cards are no longer manufactured. The last incarnation of PhysX PPU standalone card designed by Ageia had roughly the same PhysX performance as a dedicated 9800GTX.

GPU

After Nvidia's acquisition of Ageia, PhysX development turned away from PPU extension cards and focused instead on the GPGPU capabilities of modern GPUs.
Modern GPUs are very efficient at manipulating and displaying computer graphics, and their highly parallel structure makes them more effective than general-purpose CPUs for accelerating physical simulations using PhysX.
Any CUDA-ready GeForce graphics card can take advantage of PhysX without the need to install a dedicated PhysX card.

APEX

Nvidia APEX technology is a multi-platform scalable dynamics framework build around the PhysX SDK. It was first introduced in Mafia II in August 2010. Nvidia's APEX comprises the following modules: APEX Destruction, APEX Clothing, APEX Particles, APEX Turbulence, APEX ForceField and formerly APEX Vegetation which was suspended in 2011.
From version 1.4.1 APEX SDK is deprecated.

Nvidia FleX

FleX is a particle based simulation technique for real-time visual effects. Traditionally, visual effects are made using a combination of elements created using specialized solvers for rigid bodies, fluids, clothing, etc. Because FleX uses a unified particle representation for all object types, it enables new effects where different simulated substances can interact with each other seamlessly. Such unified physics solvers are a staple of the offline computer graphics world, where tools such as Autodesk Maya's nCloth, and Softimage's Lagoa are widely used. The goal for FleX is to use the power of GPUs to bring the capabilities of these offline applications to real-time computer graphics.

Criticism from Real World Technologies

On July 5, 2010, Real World Technologies published an analysis of the PhysX architecture. According to this analysis, most of the code used in PhysX applications at the time was based on x87 instructions without any multi-threading optimization. This could cause significant performance drops when running PhysX code on the CPU. The article suggested that a PhysX rewrite using SSE instructions may substantially lessen the performance discrepancy between CPU PhysX and GPU PhysX.
In response to the Real World Technologies analysis, Mike Skolones, product manager of PhysX, said that SSE support had been left behind because most games are developed for consoles first and then ported to the PC. As a result, modern computers run these games faster and better than the consoles even with little or no optimization.
Senior PR manager of Nvidia, Bryan Del Rizzo, explained that multi-threading had already been available with CPU PhysX 2.x and that it had been up to the developer to make use of it. He also stated that automatic multithreading and SSE would be introduced with version 3 of the PhysX SDK.
PhysX SDK 3.0 was released in May 2011 and represented a significant rewrite of the SDK, bringing improvements such as more efficient multithreading and a unified code base for all supported platforms.

Usage

PhysX in video games

PhysX technology is used by game engines such as Unreal Engine, Unity, Gamebryo, Vision, Instinct Engine, Panda3D, Diesel, Torque, HeroEngine and BigWorld.
As one of the handful of major physics engines, it is used in many games, such as ', Warframe, Killing Floor 2, Fallout 4, ', Borderlands 2, etc. Most of these games use the CPU to process the physics simulations.
Video games with optional support for hardware-accelerated PhysX often include additional effects such as tearable cloth, dynamic smoke or simulated particle debris.

PhysX in other software

Other software with PhysX support includes: