Geometry nodes to create a spline deformer?

First let me start off by saying that I am aware of the curve modifier and this is not what I’m looking for.

I’m hoping that it’s possible, but I’ve barely touched Geometry Nodes yet so I figured I would ask here first- I sometimes have a need to deform already modeled and posed tubes/hoses/cylinders, etc. These objects are already placed in the world, and are very complex (imagine a snaking bundle of cables that is partially wrapped in cloth with various couplers and whatnot)- not something that the curve modifier is capable of handling.

I can easily create a bezier curve to match the general flow of one of these objects, what I would like is to create a deformer that can sample the closest point on the curve and transform the vertices to follow the curve. Think of it like a spline/bendy-bone rig without any armature involved.

in the past when I’ve needed to do this I’ve converted the spline to a mesh, generated an armature from it, and then basically made a spline IK rig out of the whole thing. So it’s not a huge problem, just a bit of an inconvenience that I’m hoping I can use GN to solve.

Any ideas on whether or not this is possible, and if so any leads on where I might start?

Side Note: it seems strange to me that we don’t have a Geometry Nodes subforum yet(?), with how much attention it’s getting from developers I would think it would behoove us to have a dedicated place to discuss it.

1 Like

Haven’t tried it but I think that for each vertex you would get the point on the curve that is perpendicular and closest to this vertex.
Then use this point as the center of rotation and its tangent to determin how many degrees you have to rotate.

Since you can not set an initial bind pose this will probabyl lead to errors if the curve overlaps with itself or if it is deformed in a way that a second point is suddently closer than it was before. This could happen for example if your cable is coiled up or if a street serpentines up a hill. Not sure if this is avoidable with geo nodes.

oof… i did not know that was not possible. thanks for the info!

I can’t think of a way at the moment. Perhaps there is some trickery that allows it.
Perhaps by transfering an attribute at a specific frame. Might be possible albiet a bit hacky.
Or you somehow supply the intial “weights” with a vertex group but then you don’t have that much of an advantage over a conventional spline IK rig.

Could we use two versions of the curve as inputs to the geometry node setup, one in the initial pose and one in the bent pose, match the indices by distance to the initial curve and deform with the bent curve?

1 Like

Hah, that sounds like it should work. So perhaps duplicate your curve with the duplicate node and then use that as a reference. With the duplicate node you can make certain that your two versions allways stay the same.

I guess that is similar to what an Armature does internally?

Had a go at it, don’t know whether the outcome is as expected.



curve_armature_geonodes_1.blend (117.6 KB)

Edit: setting the twist method of the curves to “z-up” is recommended.

4 Likes

Noice! :+1:

1 Like

How about:

Good luck.

Yeah, but that is just the basic curve deform modifier where your original coordinates are cartesian and mapped onto coordinates given by the curve, what @testure wanted, was to have the original coordinates also defined by a chosen curve.

2 Likes

This is pretty cool! I’ll have to play with this some, but it does look about right to me!