From PhysX Wiki
|Authoring application(s):||PhysX plug-in for 3ds Max|
PhysX plug-in for Maya
|Capabilities:||Cloth and clothing simulation|
APEX Clothing (PhysX Clothing) is a module responsible for authoring and real-time simulation of dynamic clothing for game characters. APEX C is a part of the NVIDIA APEX Framework.
Currently, APEX Clothing is supporting PC (CPU and GPU), Xbox 360, Xbox One, PS3, PS4, iOS and Android platforms.
First public release - APEX Clothing 1.0 as part of APEX 1.0 Beta.
Clothing module is using so-called constrained cloth functionality (or Hybrid Cloth), introduced in PhysX SDK 2.8.3. In this case physical mesh is constrained to the animated mesh and is fully controlled by the artist, while regular simulated cloth behaves too unpredictable.
Authoring tools are provided to create a physics meshes from the given graphics mesh. Parts of the character clothing that are chosen to be simulated cloth are not directly skinned to the animation skeleton, instead, a few steps are performed to constrain the physics mesh to the animation. This provides the region within each vertex of the simulated cloth is allowed to move, since created physics mesh is skinned to the animated skeleton. After simulation the graphics mesh is transformed with the simulated physics mesh (mesh-mesh skinning).
With the release of PhysX SDK 3.x, new cloth solver, fully oriented on character clothing simulation, was presented. Being more effective and faster that previous SDK 2.8.x clothing simulation engine, it is now used as default simulation solution in APEX Clothing module.
PhysX 3.x cloth solver is called "embedded", as it is a standalone module that can be utilized by both APEX on SDK 3.x and APEX on SDK 2.8.4. At the same time, 2.8.4 cloth solver is supported only in 2.8.4 version of APEX.
Generally, authoring pipeline of Clothing assets can be devided into several stages:
- Generating physical mesh for the cloth (from graphical mesh, iso-mesh or custom mesh)
- Specifying Max Distance value per vertex. Max Distance is the keystone of constrained cloth approach - it defines how far each simulated vertex is allowed to move away from its skinned position.
- "Painting" secondary parameters, like Latch-to-Nearest (this one allows to simulate two-layered cloth as one mesh).
- Setting up collision with the character - either by using kinematic rigid body skeleton, or simplified animated mesh collision (Backstop).
- Determining simulation settings and cloth parameters - LOD, solver iterations, stifness, damping, self-collision, etc
After Clothing asset is complete, it needs to be exported (APEX is using it's own .apb and .apx formats), so it can be deserialized at runtime.
Several examples of authoring process can be viewed here
Latest versions of DCC plug-ins can be used to create assets, compatible with both old SDK 2.8.4 (plug-ins 2.9.x and below) and new PhysX 3.x cloth solvers.
The ClothingAsset object contains all the data coming from the authoring pipeline, like the information about bones, physical meshes, graphical meshes, the mapping between multiple physical meshes and Clothing material parameters.
The ClothingActor, instance of the ClothingAsset, is placed into a scene where it is simulated and rendered. The actor state is updated with the character animation that is provided with the current bone transformations. Skinned positions of the physical mesh are updated accordingly as well as the collision volumes that clothing will collide with.
APEX Clothing runtime is supporting Physical LoD feature - in order to fit a given resource budget (defined by developers according to platform capabilities), ClothingActor can decrease the Max Distance of the simulated vertices or remove them from simulation completely. In addition, it is possible to use physical/graphical meshes with different resolution and switch them dynamically.
GPU acceleration feature,SIMD optimizations and multithreading support are available as well. On PS3 platform clothing actors can utilize multiple SPUs for simulation.
- Per-actor scaling
- Teleportation without simulation reset
- Vertex velocity callback
- Support for morph targets
- Asynchronous cooking
- Render Proxies functionality for multi-threaded rendering.
Cloth solvers comparison
With release of APEX Clothing 1.2, developers now have access to two cloth simulation solutions: multipurpose cloth engine, based on PhysX SDK 2.8.4, and new "embedded" PhysX 3.x cloth solver, developed specifically for clothing simulation.
|PhysX SDK 2.8.4 Cloth solver||PhysX SDK 3.x Cloth solver|
|Purpose||All-purpose cloth simulation||Clothing simulation|
|Performance||100 %||Up to 500 %|
|Supported platforms||PC (CPU and GPU), Xbox 360, PS3, Android||PC (CPU and GPU), Xbox 360, Xbox One, PS3, PS4, Android|
|Optimizations||Multithreading + SIMD||Multithreading + vector SIMD|
|Collision detection||All dynamic and kinematic shapes, static meshes, heightfields, particles||Special objects: spheres, tapered capsules, planes|
|Collision accuracy||Per cloth vertex||Per cloth vertex + virtual particles|
|Continuous collision detection||Yes||Yes|
|Inter-cloth collisions||No||Yes (3.3+)|
|Constrained cloth functionality||Yes||Yes|
|Stretchiness prevention||Limitation via projection tree||Long Range Attachments algorithm|
|Control over cloth parameters||Basic||Detailed|
|APEX Clothing 1.3||Dec 11, 2013||Adds rendering proxies functionality and support for inter-cloth / self-collisions. Compatible with PhysX SDK 3.3 and SDK 2.8.4 (excluded from public version).|
|APEX Clothing 1.2||Aug 6, 2012||Includes new "embedded" PhysX 3.x clothing solver. Is compatible with PhysX SDK 2.8.4 and SDK 3.2|
|APEX Clothing 1.1||Feb 15, 2012||Updated public release. Adds per-actor scaling, asynchronous cooking, velocity callback, support for morph targets and adaptive simulation frequence. Uses PhysX SDK 2.8.4|
|APEX Clothing 1.0||Mar 24, 2011||First public release. Features several improvements: faster mesh-mesh skinning, Max Distance scaling and per-actor tasks for fine grained parallelization. Uses PhysX SDK 2.8.4|
|APEX Clothing 0.9||N/A||Initial internal release. Uses PhysX SDK 2.8.3|
Latest APEX Clothing 1.3 module is included in public build of APEX SDK 1.3
For info on Clothing module licensing options, please refer to APEX SDK description
Games and game engine integrations
APEX Clothing module was used in following games:
- Batman: Arkham Origins (GPU)
- BioShock Infinite (CPU)
- Batman: Arkham City (GPU)
- EvE Online (CPU)
- Mafia II (GPU)
APEX Clothing module is integrated into following engines:
- Unreal Engine 3/Unreal Development Kit (Epic Games)
- Carbon (CCP Games)
- Illusion Engine (2K Czech)
- Hero Engine (Simutronics)
- Additional solution for simulation of strand-based cloth (hair, fur, grass) - HairWorks - is available as part of VisualFX tools.
- NVIDIA APEX - Official page
- APEX Clothing - Unreal Developer Network
- APEX - DevZone Forums
- Clothing simulation solutions for games
- APEX Clothing tutorials - 3ds Max (official from NVIDIA)
- APEX Clothing tutorials - Maya (official from NVIDIA)
- APEX Clothing tutorial: from Maya to UDK
- New APEX Clothing tutorials released
- Supplementary files for NVIDIA tutorials (textures, models, etc)