1
$\begingroup$

I'm animating a curve trim loop. I have splines generated along a main spline that serves as a guide. The generated splines need to be trimmed with an offset based on their indexes. The animation should loop once it reaches the end of the main spline. The problem is that when the Modulo node is added to the setup, the produced loop becomes shorter and faster with every loop.

Essentially I'm trying to loop this:

enter image description here enter image description here

When i add the Modulo, it loops like this: enter image description here

enter image description here

And this is my node setup: enter image description here

enter image description here

Any solutions are appreciated. I'm also open to completely different approaches. The important thing is that the loop is independent of the spline length it is generated on, so I can make the spline any length without affecting the speed or offset.

$\endgroup$
6
  • $\begingroup$ It's not completely clear what you mean by 'animating a curve trim loop'. Could you come up with some sketch of that.. the desired final effect? $\endgroup$
    – Robin Betts
    Dec 16, 2022 at 11:40
  • $\begingroup$ @RobinBetts I added some GIFs, I hope that makes it somewhat clearer. $\endgroup$
    – eyecee
    Dec 16, 2022 at 11:58
  • $\begingroup$ eyecee Thank you ! $\endgroup$
    – Robin Betts
    Dec 16, 2022 at 12:02
  • $\begingroup$ Hello and welcome! Please be so kind and share your blend file with us: blend-exchange.com ...Without knowing the rest of your node tree (The part that generates the curves), it's hard to give a clear answer here. Thank you! $\endgroup$
    – quellenform
    Dec 20, 2022 at 13:03
  • $\begingroup$ @quellenform I'm not sure how to add the blend file, so I've added a screenshot of the rest of the node tree. $\endgroup$
    – eyecee
    Dec 20, 2022 at 14:33

1 Answer 1

1
$\begingroup$

The issue is that the index is being used for the modulo. This means each line is being modulated by a different number, resulting in different looping speeds. Change the divisor to a constant (or at least a value that is the same for all lines), and the lines will loop in sync. Example change:

change

$\endgroup$
1
  • $\begingroup$ Thanks, this helped a lot. I had to add a Capture Attribute node based on the spline length between the Resample Curve and Curve to Points nodes, multiply it by 20 and feed it into the Add node to get the desired effect. $\endgroup$
    – eyecee
    Dec 21, 2022 at 8:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .