I am still alive! I haven't been lazy, there is just not much I can show yet. Let's hope that changes "soon"...
Anyways, one of the projects I did for my student reel was a chameleon rig. Something that bothered me back then was that I didn't manage to build an intuitive spiral rig for the tail. And while I do know some workarounds today, it always bothered me that I didn't have a simple, one-node solution for that problem.
Last weekend I sat down and looked a little further into what spirals actually are (mathematically speaking) and how I could generate and edit them easily.
As the title suggests, I used the Bifrost Node Graph to make this. My output is a vector array that is fed into the CVs of a curve so that it can easily be hooked up to a rig. The math is pretty straightforward.
The two spiral types I implemented are the archimedean spiral, given through
radius = a * φ
and the logarithmic spiral, given through:
radius = a * e^(b*φ)
a and b are exposed on the node as attributes, while the angle is indirectly as well. If I was to draw a spiral beginning from the center, I would just start turning, measure the angle, calculate the radius and then draw a point. In this case, however, the center isn't static and I can't measure anything useful from there. Instead, I exposed the angle through my coils attribute (in retrospection windings or turns may have been better names...). If my spiral is fully rolled up my angle for that last point would be
angle_max = coils * 2 * π
If it is not rolled up and straightened out, my angle is 0. So for every point on the curve, I can sample it's angle by interpolating between my angle_max and 0. Now that I had the angle for each point, I could also calculate it's distance to the spiral's center.
To get the actual center, I picked the very first point (from the beginning) that gets rolled up, took it's x-position as x-coordinate, calculated it's distance and picked that as my y-coordinate.
From here on, I had my center, I had the angles, I had the distances so I could plug that all into the cartesian form of the spiral formulas.
Currently, the spiral is built from its center so the points will start to go around it. However, the most recently added point should always lie on the original curve. To accomodate for that, I needed to rotate the entire spiral by this points angle.
And that's pretty much everything.
The last thing to add was the self correcting length. There is nothing special about it though. In scaling mode, I measure the length, get the ratio and scale all segments by 1 over the ratio. In offset mode, I check if the length is shorter than the original and if so, offset all points except the first one by the difference.
On the node itself, I also added a distance attribute and a divisions attribute. They determine the length of the original curve and the number of CVs. The envelope attribute is used to determine how much of the curve is curling up.
That's it for my little spiral adventure. Hopefully I can find some time again soon to get back to my pointWrangle node and post some more stuff.
Cheers!
hi thank you for sharing this video please can you make a tutorial or share this maya file with bifrost Compounds