Fex
Gold Supporter
|
Cloth Physics
Cloth Physics (XPBD)
A first-party CPU cloth solver built into the engine at Engine/Source/Physics/Cloth.{h,cpp} + Engine/Source/Physics/Cloth Solver.{h,cpp}, sitting behind the existing Cloth / ClothMesh public API. Replaces NVIDIA's deprecated PhysX 3.x cloth (removed in PhysX 4+) with an XPBD (Extended Position-Based Dynamics) implementation — stable, deterministic, tunable, and owned entirely by the engine.
Core idea — each cloth is a set of mass-weighted particles connected by constraints. Per simulate(dt) the solver substeps (default 8) Jakobsen-style: semi-implicit-Euler predict → XPBD Gauss-Seidel constraint solve (Δλ = (-C - α̃λ)/(w_i+w_j+α̃), α̃ = compliance/dt²) → collision projection against author-placed balls/capsules → derive velocity from position delta. Pinned particles (inv_mass == 0) follow skeleton bones each sub-step via smooth prev↔cur lerp so fast character motion doesn't yank the cape.
In this repo: https://github.com/DrewGilpin/EsenthelEngine
See README.md for more info.
(This post was last modified: Yesterday 06:44 PM by Fex.)
|
|
| Yesterday 01:56 PM |
|
Zervox
Member
|
RE: Cloth Physics
Nice, It's been a blast looking at your fork commits since your first AI code post.
I've personally just used AI for class separation and first past structure cleanup on my own code.
|
|
| Today 01:14 AM |
|