Building Verlet physics (position and acceleration) and XPBD (collision) in Geometry nodes!

[https://www.youtube.com/watch?v=YTUYyL9tbro](https://www.youtube.com/watch?v=YTUYyL9tbro)

https://www.youtube.com/watch?v=YTUYyL9tbro

I’m following this step by step, which requires lots of pausing, but I’m learning a bunch about how physics works with Geometry Nodes, Simulation Zone, Repeat Groups, etc. I’m only doing a few small changes as I follow along.

Log

January 7, 2025

Verlet physics with constraints for keeping endpoints still, and keeping points elastic, with gravity.

010-rope-solver-tutorial.png

24 minutes into video, about an hour of my time.

010-verlet-rope.mp4

It’s alive. 🤩

January 9, 2025

Continuing the tutorial to add collisions.

image.png

🎉

010-rope-solver-tutorial-2.png

image.png

Repeat group to make the simulation solve “better” on each frame. Without this, the points jump around a bunch between frames. Gravity is only added once per frame, then these elastic and collision constraints can run 10 - 100 times.

image.png

Elastic (points want to maintain their distance). These “previous” and “next” frames are basically duplicated logic with +1 and -1, could they be abstracted?

image.png