Geometry nodes: How to space objects along curve and deform at the same time?

I want to create cylinders to deform along a curve and at the same time have some spacing between them. How is this done?
There are so many array tutorials, but I am unable to find one that does both deform and relative offset.

I think my issue is best explained side by side with a curve modifier where I am able to get desired results. With GN I am able to get some spacing (copying from tutorials without knowing really what I am doing) but it of course does not deform since I instance on points. Here I need some additional magic to also deform the geometry in the cylinder instances.
TEST GeoNodeArray.blend (739.3 KB)

One way you can use curve to mesh like this to get cylinders on your curve…

Hope that helps

5 Likes

Thank you! I tried your method with the “delete geometry” node, but it turned out too difficult to control the distances between the objects. Very good info in any case, since I had no idea that node existed.

In the end I found this post by looking explicitly for GN replacement for the curve modifier. With some tweaking I found a setup that works for me, and that can easily be animated.


For anyone interested in the setup: File here (1.0 MB) and node setup below.

  • Setup allows to set negative curve length as total offset to “empty” the curve. Any positive offset will keep feeding the array indefinitely.
  • I added invisible geometry outside of the array to avoid looping it (modulo operator) too often, which gives weird motion blur effects in animation on overflow. Edit: Value ‘Animation buffer factor’ could probably be calculated automatically (based on max offset value), but since it increases geometry with every step I wanted manual control here.
  • I did not find a way to loop cut (i.e. subdivide along single axis) so in the end the setup requires a separate object to deform along the curve.
  • I did not find a “switch direction” node so strictly speaking the animation is moving backwards as seen from curve direction.
1 Like