Geometry Nodes - Move points along curve splines (looping and speed problems)

Hi,

I’m trying to move/animate the resampled points of a curve along its own splines and I encounter some problems:

  1. When I put cube instances on the points, since the points are looping, the end instance gets in the exact position as the first.
    Is was thinking of a trick to “offset” the end instance by something like by 0.0001 so it gives the illusion it is at the end of the spline, where it belongs. But don’t know how to retrieve the last instance position to offset it.
    Or maybe there is a better alternative?

  2. The animation speed is not equally the same for every spline because their lengths are different.
    How can I match the speed regardless of the splines’ lengths?

  3. When aligning the instances to the curve tangent, the first instance in the beginning doesn’t align properly. Why?

In the .gif below, you can see all the problems.
Problem


Move points along curve.blend (1.2 MB)

Not sure wrap is the right node to use :man_shrugging:

This setup works for me and gives predictable results (constant speed across curves and works for cyclic curves also):

…for more curve-follow you can add this:
image

Good luck.

4 Likes

This solves the speed problem, thanks.

But with your configuration, I still have the end instance in the same place as the first.
Do you mind trying that with the basic curve from the Add > Curve > Bezier menu (without modifying it), and see if you get that too?

Add this to your instance selection:

Good luck.

3 Likes

That does the trick!
And one last thing, why is the tangent or normal align not working in the beginning of the curve?

You can improve the fidelity of the sampled curve by sampling the “raw” curve and not the resampled one:


…bypassing the resampled curve.

Should give tangents closer to the original curve:

I tried it but it wasn’t that. It’s just that I didn’t connect the Tangent slot from the Sample Curve, but just an average Tangent node.
Now everything works perfectly. Thanks for answering my questions!