2
$\begingroup$

I have a tree (mesh) created from the "Sapling Tree Gen". I am trying to populate hand crafted branches. I've tried Geometry Nodes and a Particle system with different problems. Both systems are using the same Weight map, where I painted the branches using edit mode selection and Assign to avoid putting branches directly on the trunk.

Geometry Nodes - I followed the node setup here:
GNs: Rotate Object Instances to fixed reference point 3.2.2

But as you can see the upper branches circled in red are at the wrong angle, pointing up and back into the tree. The lowest circle branch is the object I am distributing, it has it's origin at world origin and all scale/rotation is applied. How do I distribute nice looking branches on my weight map around the tree all facing down and away from the trunk?

enter image description here

Here is another view of the same:
enter image description here

Particle Systems - I have similar issues but instead of the leaves going up, they seem to go down:

enter image description here

I found this too, but it appears to be for a curve, which I no longer have:
Geometry Nodes: How to correctly rotate collection instances on complex geometry according to normals/tangent?

$\endgroup$
2
  • $\begingroup$ why don't you just use the rotation output and use a rotation Euler to adjust it $\endgroup$
    – shmuel
    Jun 6, 2023 at 4:24
  • $\begingroup$ Because I am still learning how to do this and don't really understand the process. $\endgroup$
    – Jon
    Jun 6, 2023 at 11:53

2 Answers 2

2
$\begingroup$

As you correctly pointed out, it is relatively complicated and error-prone to retroactively create points on an existing mesh, instantiate objects on them, and align them along a specific direction (or in this case along two directions).

Simpler or better would be the following setup:

enter image description here

Here I don't use the mesh created by the "Sapling Tree Gen" addon, but only the curves, and transform them into a mesh using Geometry Nodes.

The result is technically the same, but in this case I can directly process the curves and their parameters in Geometry Nodes.

First of all, if you created the tree with "Sapling Tree Gen", you need to disable the Curve Bevel that is automatically added when creating the tree (The setting for this can be found in the Object Data Properties under Bevel. There you set the value for Depth to $0$). This will give you only the curve by means of which the mesh for the tree is created.

In Geometry Nodes, this solution then essentially looks like this:

enter image description here

To be able to correct the distance to the trunk later, first capture the radius with Capture Attribute.

The index is also important in this case, because I use this spline index to filter out the main trunk (you want to instantiate your leaves only at the branches).

After that I use Curve to Points and get the individual points of the curves, as well as their rotation. You can also use Resample Curve to create multiple points.

The rotation of the points serves me for the alignment of the leaves. In this example, I randomly switch between two rotations so that the leaves appear either on the left or right side of the branches.

After instantiation, I use the previously captured radius as the offset for the instances in local space.


A more detailed example might look like this:

enter image description here

Here I additionally control the rotation and scaling of the leaves depending on their Z-position and their position along the branches. For this purpose, I use the spline parameter Factor captured before.

There are a lot of other possibilities to influence the rotations and to give the tree more life. For example, you could additionally influence the rotations with a random value or something similar.


(Blender 3.4+)

$\endgroup$
0
$\begingroup$

Use 2 Align Euler to vector's

  • one with the normal and set the pivot to auto and axis to which ever direction of your instances should point in the normal direction.
    (in your case it's probably the x, but I'd align the instance object itself to point as as much as it can in the x (or whatever) direction)
  • the second Align Euler to vector's pivot should be set to the axis of the fist one (so x), the axis should be the up direction of your instances (so z)
    Set the rotation (input of AETV) to the output of the first one, and set the vector to up [0,0,1] (or down, depending if your instances are oriented correctly).
    This second Align Euler to vector's output is your iop's rotation.

enter image description here

$\endgroup$
2
  • $\begingroup$ Thx Shmuel, Not quite working, I've plugged the Normal from the Distribute Points on Faces to AETV1's vector, set it to X, Pivot Auto and send the rotation to the rotation of AETV2 where I set x and pivot Z with vector [001]. I've cycled all the options and nothing is quite getting it right. $\endgroup$
    – Jon
    Jun 6, 2023 at 11:52
  • $\begingroup$ "the second Align Euler to vector's pivot should be set to the axis of the fist one (so x)" so the pivot of the second AETV should be x $\endgroup$
    – shmuel
    Jun 7, 2023 at 23:28

You must log in to answer this question.

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