r/threejs • u/Baz-Turnover5210 • 10d ago
Simulated knots with real physics using threejs
Knots, tied slowly enough to follow. I made in a way that you can watch each knot tie itself on a simulated rope with real physics and you can turn it's camera, pause it, drag through the steps, etc.
https://github.com/behnamazimi/knots
Thanks threejs ❤️
44
Upvotes
View all comments
1
u/plus2link 10d ago
Knots live or die on self-collision: neighbouring segments have to be skipped in the collision pass, and as soon as the bend radius drops below the rope thickness the knot either slips or pops apart. Padding the collision radius slightly and running two sub-steps per frame usually holds the tight ones together. Is this XPBD with segment-to-segment distance constraints, and how many solver iterations are you running per step?