fix(cloth-icm): stop fold chatter on the ground in drop scene
Folds lying on the ground were pushed out by proximity and pulled back by stretch constraints every two frames, so the cloth never settled. Remove the velocity along the proximity push and smooth velocities with the neighbour mean once per frame. Drop scene only. The drop scene is now 40x40 with gap 0.02 and an initial spin, so more folds cross. Add the cloth ICM next steps to the roadmap.
This commit is contained in:
1 parent
9c55298ab7
commit
6b9ede516a
8 files changed
+226
-33
No files matched your search
+7
-1
@@ -15,11 +15,17 @@ Open ideas for the playground frontend. Tick a box when done.
|
||||
## Tests
|
||||
|
||||
- [ ] `seo.service.ts`: spec for title/meta update on route change and language change.
|
||||
- [ ] **Cloth ICM drop specs near timeout**: drop specs in `cloth-icm-solver.spec.ts` take 2.5-3 s each vs Vitest's 5 s default; give them an explicit timeout before a slow CI runner fails them.
|
||||
- [ ] Pure logic without specs: `pathfinding-animator.ts`, cloth and pendulum GPU strategies (the math around them, not the shaders), `fractal3d`.
|
||||
|
||||
## Features
|
||||
|
||||
- [ ] **Cloth ICM drop scene**: hits mostly solved, cloth settling and CCD open. With ICM on, drop scene 35x35 (spacing 0.145, same 4.9 m cloth), gap 0.035, one mid-frame proximity re-detection: ~0 intersections after landing (avg 1.5/frame and 82 % of frames at 0 after frame 150; 0 at the marks 100-450 except 11 at 600), 9-10 ms/frame headless; was 263 at frame 900 on 50x50. ICM off: avg 148 (max 356) after frame 150 (125 at frames 100-240), 68 avg over 1800 frames, bounded but reaches the 3 m/s speed cap at times. Finer grids or a gap >= 0.04 at this size make ICM off blow up (thousands of hits, 60-100 ms frames). Cloth still does not settle (fold flutter beside the sphere, max speed 0.6-1.0 m/s with ICM on, also with collisions off). Next: Bridson 2002 CCD + velocity repulsion, then damping of the fold flutter.
|
||||
- [ ] **Cloth ICM next steps** (page `algorithms/cloth-icm`, CPU; detection + contours in `collision/`, one response file per paper in `response/`):
|
||||
- [x] **Fold flutter damping**: drop cloth never settled (fold vertices flutter at 0.6-1.0 m/s). Done 2026-11-01: cause was the proximity push on folds lying on the ground (push out, next frame stretch constraints pull back, ~1 m/s chatter), not XPBD. Velocity smoothing (neighbour mean) + proximity velocity clamp, drop scene only, drop gap 0.035 -> 0.02: after landing (frames 600-900) max speed median 0.107, p90 0.207 (was 1.2 / 2.0 at 35x35), mean 0.012, same fall and drape, landing frame 20 as before, 11-12 ms/frame headless on 40x40 (was 10.3 on 35x35). Tangled scene bit-identical.
|
||||
- [ ] **Bridson 2002**: CCD + velocity-level repulsion, so fast motion cannot jump through the gap; allows a finer drop grid. Large.
|
||||
- [ ] **Papers extending ICM**: Ye et al. 2017 (untangling via discrete collision detection), Buffet et al. 2019 (implicit untangling, layered clothing). New `response/` file + scene each. Medium per paper.
|
||||
- [ ] **GPU port**: detection on the GPU, contours stay on the CPU (serial walk). Very large.
|
||||
- [ ] **Cloth ICM drop scene** (state): hits mostly solved, cloth settles. Drop scene 40x40 (spacing 0.145, 5.7 m cloth, user-set), gap 0.02, initial spin 1.5 rad/s around y, one mid-frame proximity re-detection (every 5), velocity smoothing + proximity velocity clamp. Frames 100-240: ICM on avg 1.0 hits per frame (59 % of frames at 0, max 10), ICM off avg 9.8 (max 43), bounded over 900 frames (max 92 after frame 150). Settled: max vertex speed median 0.107 / p90 0.207 m/s (frames 600-900, ICM on; target was 0.1; ICM off median 0.089), mean 0.012, rare snaps to 0.6-0.7. 11.4 ms/frame headless (60 fps budget 16.7). Spin sweep (values above ~0.75 rad/s are capped at the rim to 3 m/s in the first frame; ICM on / off hits, ratio): none 0.31 / 3.9 (12.7x); 0.1 2.6 / 4.3; 0.4 3.5 / 5.8; 0.7 1.3 / 5.1; 1.5 1.0 / 9.8 (chosen, most hits); 3 0.7 / 7.2 (rest speed worse). Finer grids or a gap >= 0.04 made ICM off blow up before the fix (not re-measured). Next: Bridson 2002 CCD + velocity repulsion.
|
||||
- [ ] **Shareable demo state**: keep demo settings in query params (fractal zoom/center, sorting algorithm, seeds). Opening the link restores the view.
|
||||
- [ ] **New algorithm demos** (pattern: route + `RouterConstants` + `AlgorithmsService` entry + i18n + information panel):
|
||||
- [x] Boids / flocking (GPU path like cloth)
|
||||
|
||||
Reference in new issue
Block a user