0
$\begingroup$

I generated a tree using sapling tree gen

i would like to use geometry nodes to select endpoints of each branches to scatter a flower animation growth there.

when i plug the endpoint selection node to "selection" of the instance on points node, it doesnt work. What am i missing here ? enter image description here

here a blend file

Thank you

$\endgroup$

1 Answer 1

2
$\begingroup$

I disabled the Geometry Nodes modifier to show you something, this is the tree model - in the Curve Properties under Bevel > Round it has a Depth value of 1 m, to make the trunk and branches visible:

tree mesh

The problem with this is, it is basically the same as if you had a curve in Geometry Nodes and would plug it into a Curve to Mesh node, to convert it with some profile into a mesh. The Bevel > Round does this under the hood with a circle profile.

And the important word here is "mesh": the curve is no longer treated as a curve object, but a mesh object - and as such the Geometry Nodes setup cannot select any curve endpoints, because it is not a curve anymore.

But if you set the Depth to 0, so that the tree is just a curve object without any mesh geometry anymore like this

curve without bevel depth

then you can enable the Geometry Nodes modifier again and plug the Endpoint Selection into the Instance on Points node. Here I joined the instances with the curves so that both are visible:

endpoint selection working

So what I would do instead is leaving the tree be a curve and just use a Curve to Mesh modifier in Geometry Nodes to get the tree trunk and branches. Since the original setting was a Depth of 1 m, you can use this as Radius for the profile's Curve Circle as well. The thickness of the branches is given by the control point radii of the original curve, which are taken into account by Geometry Nodes too:

curve to mesh

$\endgroup$
9
  • $\begingroup$ Thank you very much for the explanation ! $\endgroup$
    – ant0
    Commented May 30 at 23:19
  • $\begingroup$ Only problem i have now is that the shader doesnt appear anymore $\endgroup$
    – ant0
    Commented May 31 at 0:14
  • $\begingroup$ I'mFacing 2 issues, now , first is that the shader do not show up anymore, i have tried to add some nodes like set material but did not work. Second issue is about the endpoint selection, when setting up start size at 0 and end size 1 there is still multiples instances of the cube appearing when i would only want one at the end of each branch $\endgroup$
    – ant0
    Commented May 31 at 1:04
  • $\begingroup$ @ant0 Actually there are not multiple instances of the cube. I've scaled it extra small to have no cubes overlapping each other - and there is only one cube at each endpoint of a curve. I guess your problem here is how the Sapling Tree addon creates the branches. If I remember correctly, you can add levels and sublevels of branches. Now there is always an endpoint where one level ends, which means a thicker branch at level 1 might split up in two thinner branches of level 2 - but where it splits, there is an endpoint because the level 1 ends there which then instance cubes inbetween. $\endgroup$ Commented May 31 at 9:38
  • $\begingroup$ @ant0 So maybe you have to ask a new question on how to separate between the different levels of branches...? But what if you only instance on for example level 2 endpoints, but a branch ends at level 1 with no sublevels? Not an easy task and the tree addon is probably not designed for that. With the shader, the first thing that it does not show up is because you need a Set Material node to give it to the tree. But the other problem is, that the tree has no longer the UV coordinates from the original curve. So easiest would be you duplicate the tree - one for the shader, one for the leaves. $\endgroup$ Commented May 31 at 9:46

You must log in to answer this question.

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