Library:NVIDIA PhysX
| On this wiki | Facts · Code · Notes · Topics |
|---|
NVIDIA PhysX is a physics SDK (BSD-3 open source since 4.0) used in many engines and games; in a binary it is recognised by its DLL names, the exports PxCreatePhysics and PxGetPhysics, the version word PX_PHYSICS_VERSION and, in data files, the SEBD binary collection header or a PhysXCollection XML (RepX) file.
Identification
- Version word:
PX_PHYSICS_VERSION = (major << 24) + (minor << 16) + (bugfix << 8) + 0. The application passes this constant toPxCreatePhysics(version, foundation, scale, trackOutstandingAllocations, pvd, omniPvd); the library compares it with its own and refuses on mismatch. See Fact:NVIDIA PhysX/identification/PX_PHYSICS_VERSION encoding. Looking for the immediate0x03040000-style value pushed before the call to the exportedPxCreatePhysicstherefore tells the SDK version a game was compiled against. - Exports:
PxCreatePhysicsandPxGetPhysicsare declaredPX_C_EXPORT PX_PHYSX_CORE_APIininclude/PxPhysics.h, so they are plain unmangled C exports of the PhysX core library. - Mismatch message (a good string to search):
Wrong version: PhysX version is 0x%08x, tried to create 0x%08x, printed byNpPhysics::createInstancewhen the header version differs from the library version. - Class names: the open sources use the
Px,Np(implementation),Sc,Gu,Pxsprefixes, so RTTI names such asphysx::NpSceneorphysx::Gu::...identify a static link. In a static build (PX_PHYSX_STATIC_LIB defined) PX_PHYSX_CORE_API expands to nothing (include/PxPhysXConfig.h lines 26-27 at commit b97365c6ddb32fda8469bc788ec18024862b0368), so the functions carry no dllexport and there is no export table entry; the strings and the version constant are then the evidence.
DLL names by generation
Checked in the repository: source/compiler/cmake/windows/CMakeLists.txt lines 165-167 (commented out) copy PhysXGpu_64.dll, the 64-bit GPU module name. Unverified (the rest from memory, not read in the repository, check against the file's PE exports and version resource): 2.x ships PhysXCore.dll, PhysXLoader.dll and NxCooking.dll; 3.x ships PhysX3_x86.dll / PhysX3_x64.dll (with PhysX3Common, PhysX3Cooking and PhysX3CharacterKinematic siblings, Debug/Checked/Profile builds adding CHECKED/PROFILE/DEBUG name postfixes); 4.x and 5.x use PhysX_64.dll, PhysXCommon_64.dll, PhysXFoundation_64.dll, PhysXCooking_64.dll and, for GPU simulation, PhysXGpu_64.dll and PhysXDevice64.dll. What the repository confirms: its Windows CMake files delay-load PhysXFoundation and PhysXCommon from the PhysX library (a name pattern PhysXFoundation<postfix>.dll, PhysXCommon<postfix>.dll) and delay-load nvcuda.dll for the GPU path.
Binary collection (SEBD)
Serialized collections written by the extensions (PxSerialization::serializeCollectionToBinary) begin with a 48-byte header: the FOURCC SEBD, the PX_PHYSICS_VERSION, a 32-character binary-version GUID, a platform FOURCC and a padding marker. See Fact:NVIDIA PhysX/struct/Binary collection header. The platform tags are listed in Fact:NVIDIA PhysX/enum/Binary platform tags. The loader refuses a mismatch of the GUID (Buffer contains binary data version ... incompatible) or of the platform (platform mismatch), so these files are tied to one SDK generation and one platform.
RepX (XML) collections
The XML serializer writes a root tag PhysXCollection (source file SnXmlSerialization.cpp); the RepX format was versioned (the repository carries defaults tables SnRepX1_0Defaults.h, SnRepX3_1Defaults.h, SnRepX3_2Defaults.h and an upgrader SnRepXUpgrader). The collection writes its version as an attribute named version on the root (SnXmlSerialization.cpp line 579, read back at line 615). The upgrader table in SnRepXUpgrader.cpp (lines 404-415) lists the version strings 1.0, 3.1, 3.1.1, 3.2.0, 3.3.0 to 3.3.4, 3.4.0 to 3.4.2, upgrading the last to 4.0.0 (line 372), so the version text is a dotted string. Unverified: which SDK release wrote which RepX version.
Sources
- NVIDIA-Omniverse/PhysX (BSD-3-Clause): the SDK source, including the serialization extension read for this page.
Code & repositories
- https://github.com/NVIDIA-Omniverse/PhysX @
b97365c6ddb32fda8469bc788ec18024862b0368· license: BSD-3-Clause
NVIDIA PhysX SDK source (BSD-3): physx/include/foundation/PxPhysicsVersion.h, source/physx/src/NpPhysics.cpp and source/physxextensions/src/serialization/ were read for version, export and SEBD header facts
Tested on: source read, not run: source read only · checked 2026-10-18; last activity 2026-10-15; Note: the latest release ships binaries; the wiki links only the source, never the binaries