0
$\begingroup$

here's my question: I'm trying to align some branches on a curve converted to mesh with GN, currently the instances are aligned to the faces normal with the node Align Euler to Vector but some instances are aligned to the negative value of the face.

It looks like some branches are aligned inward looks like some branches are aligned inward

This is how the main curve is generated This is how the main curve is generated

And here is how the branches are spawned, aligned and stylized And here is how the branches are spawned, aligned and stylized

How can I align them always to the positive direction of the Z-axis?

Thanks to all who might help!

$\endgroup$

1 Answer 1

0
$\begingroup$

They're aligned to the normal. The problem is, some of them have a negative scale, which means that they're moving backwards through the trees:

enter image description here

The input to the selected math/subtract node is always greater than zero. But it's not always greater than 0.2, meaning that sometimes, you're generating a random vector with a negative Z. When you scale the branch by a positive number, it will go out of the tree; when you scale it by a negative number, it will go into the tree.

One solution here is to clamp the scale to something postive (and, probably, non-zero!):

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you! I didn't imagine it was a scale problem. $\endgroup$
    – Etheon
    Commented Sep 21, 2023 at 8:06

You must log in to answer this question.

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