2
$\begingroup$

I'm trying to connect some points to a "target" object.

I managed to create a GN setup to connect a curve between two points, then i've instanciated that setup on points :

enter image description here

But now, I would like to join all the curves on the empty that controls the animation.

I guess I have to compute a target position that would be computed based relatively on each point position.

enter image description here

How can I do that ? Here's my actual blend.

Thanks !

$\endgroup$
1
  • $\begingroup$ If your question was solved, please be so kind and mark the answer that contributed to the solution as "Accepted Answer". This will make it easier for others to see which way leads to the solution, and the question will no longer appear as unsolved. Thank you! Here you can find more information: What should I do when someone answers my question?. If you still didn't get a solution to your question, please be kind enough to address it. $\endgroup$
    – quellenform
    Commented Aug 28, 2022 at 13:02

2 Answers 2

3
$\begingroup$

I'm not answering your exact question here, but your actual problem:

Since all your curves are an instance of a single curve, you can't subsequently change them the way you'd like once they've been instantiated.

That is, you can change the mesh at any time, of course, but you want access here to the individual parameters you have available when you create a curve.

Therefore, to be able to edit the instances afterwards, you would have to use the Realize Instances node.

However, this does not work with your curve of the type Quadratic Bezier. If you use this curve with Realize Instances, you have the single splines, but many points instead of beginning, middle and end.

Therefore, you would have to create a simple curve before instantiating, then instantiate, turn the instances into individual curves using the Realize Instances node, and then start editing the curves there.

Since you have curves with two points (start, end) at the beginning, you can divide them into several parts with the Subdivide node and change the points as you like.

In this example, I set the endpoints all to the same position, and apply an offset to the middle points.

This example translated into Geometry Nodes looks like this:

enter image description here

And here is the blend file:

$\endgroup$
3
  • $\begingroup$ +1 nice one!!!! $\endgroup$
    – Chris
    Commented Apr 6, 2022 at 15:27
  • $\begingroup$ Thanks for this great explanation! So, if I understand correctly, instances will always behave as… instances, even if, in this case, my instance is a node group (which has a « target » param) ? So when I want to customize those instances, I have to Realize them ? $\endgroup$
    – gordie
    Commented Apr 6, 2022 at 18:18
  • 1
    $\begingroup$ Yes, instances are a "copy" of an object as long as you don't separate the copies with "Realize Instances". But in Blender language, it should correctly be called "Linked Duplicate", not "Copy". Although instantiated objects have their own transformation, the object data are identical to each other. $\endgroup$
    – quellenform
    Commented Apr 7, 2022 at 8:49
2
$\begingroup$

if you change your node setup like this:

enter image description here

you get this:

enter image description here

Note: if you ever change the resolution of your curve, you have to adapt the 17 in modulo and the 16 in divide. But i think you know how to do that... ;)

and of course you can then give the curve again some bevel:

enter image description here

then it looks better:

enter image description here

little explanation:

I let the curve be as it was, but i didn't gave a profile circle here:

enter image description here

by that i can access and change your curve with resolution 16.

I move the endpoint of the curve to the emptys location and all other points in between by the mix node with the factor according to their position. So the nearest to the empties point will get 15/16 of his curve position to the empty, the most far away get 0/16 of the mix of curve position to the empty -> that's the curve point itself. It's a cheap trick, it won't make your curve nicer, but maybe you are satisfied with that.

$\endgroup$

You must log in to answer this question.

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