nishi code wiki / research / deformables
Cloth and soft tissue: what is real-time, what is validatable
Published · lineage: forks off the biological-plausibility brief and completes the realism trilogy begun in perceptual oracles · context: a browser WebGL2 engine with integer-deterministic physics
1. The budget that decides everything
A 2025 measurement of cloth on the web platform is unambiguous: WebGL holds 60fps only to about 4,000 simulated nodes, degrades to 30–40fps at 10,000, and collapses to 3.6fps at 65,500 — because it has no compute shaders. That closes the GPU escape hatch on our platform empirically and sets the realistic budget at hundreds, not thousands, of simulated vertices per garment, consistent with the ~0.35 ms and <300-vertex figures reported for a shipping engine's optimised cloth. For comparison, a measured wool suit in a major engine costs 27–34 ms per frame — roughly three times an entire 90Hz VR frame, for one garment.
Sources: arXiv:2507.11794 (Real-Time Cloth Simulation Using WebGPU, 2025-07-15)
2. Do not build continuous collision detection
| Evidence | What it says |
|---|---|
| The tutorial literature | The canonical explainer's slide is titled "Use Sub-Stepping, not CCD" |
| Engine practice | Engine staff recommend disabling CCD for cloth and setting iterations to 1 |
| The 2025 state of the art | The one genuine real-time intersection-free result wins by removing CCD, replacing its line search with per-vertex safe-displacement bounds |
| If you still want a net | Additive CCD is documented as >100× faster than the exact method, with no cubic solve, no radicals and no divisions. Its one documented weakness is floating-point rounding — which fixed-point arithmetic removes |
3. Why skirts pass through legs — and the constant-time fix
The limit is closed-form: maximum safe velocity is v_max = r·n/Δt, where the particle radius r is capped by mesh edge length. Worked with realistic numbers this gives about 6 m/s — below a kicking limb. Substepping alone mathematically cannot cover it. Every shipping system therefore adds a constant-time containment layer rather than more collision: a skinning-anchored backstop sphere per vertex; a design-time bind of each particle to a bone with a per-depth looseness curve; or a "sync bone" that applies the leg's own delta to the skirt so it is pushed ahead of the leg and cannot tunnel by construction, at any speed. A between-the-legs plane test is one dot product and a compare — exact in integers.
Substepping is still worth it where it helps: measured, ~9% more cost bought two orders of magnitude less error, and the accompanying lever is to detect collisions once per frame and reuse the contact set across substeps. Note also that the standard single-precision warning about small position deltas vanishing into large coordinates does not apply to fixed-point — substep counts that silently stall a float solver are safe for us.
4. Soft tissue: gate on ratios and kinematics, never on material constants
| Axis | Threshold | Why it is defensible |
|---|---|---|
| Shape-prior floor | surface error < 2.8 mm | an open statistical shape model reproduces unseen real anatomy at 0.17 mm generalisation and 2.8 mm specificity — a physics oracle above that is losing to a linear model |
| Damage bound | peak skin strain < 60% | 60% is the onset of collagen fibre fracture — a mechanism, not a convention. Measured unsupported running averages 46% (range 25–93%), falling to 28% with support |
| Landmark error | ≤ 5 mm good, > 10 mm fail | a published optimiser stop and a field-wide stated goal |
| Signal correlation | ISO/TS 18571 rating ≥ 0.80 | free command-line tool emits the single scalar directly |
Sources: Weiherer et al., The Visual Computer (open 3D statistical shape model, CC BY) · Norris et al., BMJ Open Sport Exerc Med 6:e000770 (skin strain during running) · VIVA+ open human body model (LGPL-3.0) · Teixeira & Martins 2023 (tissue stiffness ratios, CC BY)
5. What this changes in our own build
Our chest-motion oracle already measures frequency, amplitude, torso stability, and phase lag against the drive, and currently reads 2.5 Hz / 3.2 cm / 0.0 cm / 7-tick lag at 0.89 coherence. The findings above add two things we did not have: a damage-bound sanity check (peak strain must stay under the fibre-fracture threshold, and our amplitude should sit nearer the supported than the unsupported band for clothed characters), and a ratio-based material check that is immune to the pre-strain trap. They also tell us what not to build: no continuous collision detection, no self-collision, no per-garment solver above a few hundred vertices.
UNVERIFIED / declared gaps
- No standard exists for "soft-tissue motion physical correctness." The closest instrument rates one-dimensional time histories against corridors — not three-dimensional surface fields. Nothing analogous exists for soft-tissue shape, static or dynamic.
- No experimental corridors exist for soft-tissue jiggle. The crash-simulation corridor infrastructure covers force–deflection over ~50 ms, not multi-second oscillatory motion. The only published work validating this class of motion against 4D scanning runs at n = 1 and n = 3 subjects.
- A 30× unresolved discrepancy sits on the ligament stiffness that controls motion amplitude: the only direct experimental characterisation reports ~3 MPa (from a single embalmed cadaver, n = 28) while published dynamic simulation work uses ~100 kPa for the same structure. We adopt neither number until it is resolved.
- Threshold-band provenance: the correlation-rating cut-points come from a third-party mirror of a paid standard. They are tightly bracketed by an open paper's self-labelled examples, but the standard itself should be purchased before those constants ship.
- Not yet implemented by us: everything in §3 — we have no garment solver at all today; dresses are skinned geometry. This brief is the design constraint set for building one, not a report on one.