3
$\begingroup$

I need to be able to feed each curve instance into the custom group node. Is it possible to do a for each loop in geometry nodes for each curve instance? Each curve instance represents one branch of my tree. I need to individually feed each branch into the group node through a loop. Is that possible?

enter image description here

Actually the leaves do position somewhat properly on the branches with just a small anomaly so i thought the loop didn't work. But it seems that the "looping" does work somehow with my setup. This anomaly is probably caused by so many splines for just 1 instance when i tested resampling the curve for only 1 instance. Any idea how 1 instance can have so many splines while the wireframe seems not to show this as a possibility?

enter image description here

$\endgroup$
4
  • $\begingroup$ oh it already works, you can increase the resample curve count from 3 to something like 10 to see more branches. the only problem i have is that there are too many splines 528 for some reason per branch. that is problem 1 im trying to resolve, then problem 2 is minor is that some leaves are pointing inwards instead of outwards. but leaves point properly outwards if they are the instance on the main stem instead of the branch. duno why that is XD $\endgroup$
    – Harry McKenzie
    Commented Apr 5, 2022 at 14:21
  • 2
    $\begingroup$ The problem is I think that all edges create a spline with 2 control points. Try adding a merge by distance node $\endgroup$
    – Gorgious
    Commented Apr 5, 2022 at 15:49
  • 1
    $\begingroup$ @HarryMcKenzie It would be great of you to write a short answer to this and mark it as "Accepted Answer" so that this question shows up as solved. Thank you! $\endgroup$
    – quellenform
    Commented Sep 15, 2022 at 15:19
  • $\begingroup$ @quellenform I'm sorry I forgot to answer this. Unfortunately I don't remember how I solved it, but it was not related to the title. I think there is a loop now for version 4.0? Maybe you can add an answer to the title instead of the actual problem I had so at least the community has an answer to the actual title. hehe $\endgroup$
    – Harry McKenzie
    Commented Sep 9, 2023 at 16:02

1 Answer 1

3
$\begingroup$

I used this setup to iterate through pieces I created earlier with Instance on Points, and do a Convex Hull operation on each piece separately - this is essentially the For each setup you wanted:

enter image description here

And here's how I got the index and count:

enter image description here

$\endgroup$
0

You must log in to answer this question.

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