Dynamically parameterized Bezier spline: Releasing into the wild


Hi there.

I just wanted to show off a new plugin I’ve been working on: A dynamically reparameterizing, twisting spline. It’s still not “done”, but it’s at a point where I think it’s worth it to get other people looking at it.
So here it is: https://github.com/blurstudio/TwistSpline
Sorry, no precompiled releases yet. Perhaps in the future.

A couple years back, I went to SIGGRAPH, and Pixar was showing off their Octopus (Septopus?) rig for Finding Dory. They showed off how it behaved, but (of course) not how it worked. I was able to take some quick notes, but that’s about it. It’s been in the back of my mind since then.

One thing I remember from that presentation is that any point along the spline could be pinned to a control at any time. Meaning if you’ve got a rope rig, that any control can be turned into a non-sliding (or partially sliding!) grip control at any time, and then release at any time without any pops or jittering.

Similarly, orientations are calculated along the spline, and re-parameterized in the same way to allow for smoothly interpolating twist values across multiple CV’s

A quick rundown of the core math and algorithms this is built on:
I probably wouldn’t have been able to do this without the awesome Primer on Bezier Curves.

The trick to smoothly interpolating between different curve behaviors is to put each parameter into terms of itself and the lengths of the neigboring bezier segments, and the paremter values of the neighboring CV’s. This setup builds a matrix with only the 3 main diagonals filled in, and that’s really good because there’s an efficient algorithm to solve that called the Tridiagonal Matrix Algorithm.

Orientations are handled using an approximation of the Rotation Minimizing Frames called the Double Reflection Method. Twist pinning is handled through tridiagonalization.



Dude, this is awesome!
We have a similar node at work and it’s great, thanks a ton for sharing this!


Thanks for the kind words!
So are there any other killer features I should put into this thing?