As a proof of concept (and to familiarize myself with Geometry Nodes), I am trying to make a (semi-)procedural date palm tree with Blender 3.3. I use one Bézier Curve with a Geometry Node setup to create the trunk. Within the trunk Geometry Node setup, I add instances of branches (multiple Bézier Curves in a collection) and populate the branches with leaves (multiple Meshes in a collection). Currently, I have troubles to rotate the leaf instances properly.
I found an answer to a similar question here, which does not work for my case due to the facts highlighted in bold in the introduction paragraph above.
Until now, I tried the following two approaches (the results of which are shown below):
- Converting my branch Bézier Curve via the Curve to Mesh geometry node to a Mesh and than create the instance points via Distribute Points on Faces geometry node. This led to a very organic leaf distribution, but the rotation (even using the Normal information) was all over the place and did not behave predictably/controllable.
- Directly instancing the leaves on the curve. This resulted in a more predictable rotation behavior, but looked artificial and the rotation was still not correct.
Issues
The following issues occur:
Issue 1
No matter how I try to rotate the leaves, the end of the branches do not look not correct (red circles in image above). As the rotation/length of leaves of palm trees change of the length of the branch, I would need a way to adjust the rotation/scale of the instances in relation to the relative position on the branch.
Issue 2
The z-direction of the leaves is aligned with the global z-direction in most of the cases (setting it to relative/local did change nothing). I would like to recreate the natural case, where the leaf orientation would follow more the branch orientation.
Questions
- What would be a solution to adjust the rotation/scale of the instances in relation to the relative position on a Bézier Curve?
- Is my approach of creating all the instances within the geometry node setup of the trunk unfavorable? If so, what is a better approach?
Geometry Node Setup
Important: The Geometry Node Setup for Approach 1 (Curve -> Mesh -> Distribute Points on Faces) is described.
Screenshot of the Geometry Nodes Workspace:
All the assets which should be instanced are placed in a dedicated collection (Bézier Curves as well as Meshes). The Geometry Node Setup will be applied on the Bézier Curve PalmTreeGenerator.
For reference, the current PalmTreeGenerator Geometry Node Setup looks like this:
Relevant for the problem are the following Groups: TopBulge (Emitter of Branches), Branches (Instancing of Branches on Emitter) and Leaves (Instancing of Leaves on Branch Instance).
The TopBulge Group loads an Icosphere from a Collection. To adjust its orientation to the trunk, I had to add an extra rotation. However, removing/changing the rotation has no effect on the overall problem; it still occurs.
The Branches Group picks one random instance of the Bézier Curves in the Collection. In order that the branches are not instanced in one spot, I need to use the z-rotation returned by the Distribute Points on Faces Geometry Node. If I would use all rotations, the branches would be skewed. The two Euler Rotate Geometry Nodes are remnants of my experiments to align the rotation to normals. For this post, I reset all the parameters to zero (problem becomes easier to see).
All the Geometry Nodes on the right-hand side are used to convert the Bézier Curve into a mesh. It is done twice to have more control over the mesh (especially starting point of leaves and number of faces) used for the leaf instancing.
The Leaves Group instances the leaves on the branches. It is done twice (left/right side of branch). Here I manually set a rotation that looked best. Trying here to work with Normal information via Align Euler to Vector made the end result worse.
The blend file is available at my OpenGameart page under CC-BY-4.0.