1
$\begingroup$

I have a Curve object with two Splines and I want to use the Sample Curve node in conjunction with the Set Position Node to move the curve points. But with two splines all points are mapped to the first. Is there a way to get the Curve Index to which the control point belongs to feed that into the Sample Curve node?

Or other how do I find out what Spline the point belongs to / its parent's spline index?

Thanks for helping.

e

enter image description here

$\endgroup$
1
  • $\begingroup$ if you are using always curve index 0 - this is what should happen. Why don't you just enter values in the curve index depending on a condition of your choice? Since your question is very vague - i can only comment vague. Would be great if you could describe precisely what you end goal is. Also providing a blend file so we don't have to rebuild everything on our own would attract more people. Because usually GN is a very popular thing here... $\endgroup$
    – Chris
    Jan 28, 2023 at 9:21

2 Answers 2

4
$\begingroup$

The curve spline index can be accessed using the following nodes, that's what I tried to find. enter image description here

$\endgroup$
0
$\begingroup$

I'm not sure whether you want the instanced points to move or the guide curves themselves. If you want the guides to move, you don't need the curve factor at all. Just feed a Noise Texture into the Position input of the Set Position node and animate its parameters. If, on the other hand, you want the instanced points to slide along the guide curve, you need a somewhat diferent setup. Instance your Ico Spheres on your control points, and connect a Set Position node after the Instancer. Divide the index by the total points count (use the Domain node in Spline mode). Feed the result into the Factor input of the Sample Curve node. Check the All Curves toggle, and connect the Position output into the Position input of the Set Position node. If you want to animate the points along the splines, insert a Math Add node after the division, followed by a Math Fraction node. Animate the other value of value using Time or keyframes. The Fracture node will make sure that the points jump from the end of the each spline back to the beginning of it in a seamless way.

enter image description here

$\endgroup$

You must log in to answer this question.

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