GeoTree: Procedural Trees in Geometry Nodes

Welcome to my world!

Yup, and the fun is just beginning. For every change you make, you have to account for and tweak at least 10 other peripheral things that are effected by this change.

Like right now, my trees are based entirely around spawning limbs off a single trunk. When you add more trunks in, what’s that gonna look like? Are you gonna have a big bushy bunch of conflicting geometry? Will you need to set limb growth perimeters for each fork? Will each fork need custom limb rotation? How do these trees grow in real life?

The nice thing is that forking trees is like the final frontier of good trees, and once it’s in, we can say that Geotrees is that much closer to being a true, complete tree generator.

…but man, it’s scary.

2 Likes

Okay, you got me thinking. If spline points can store radius size as a kind of metadata, then maybe it can also store the angle, so that it not only tells the ensuing instances their starting size and position, but also the direction they’re oriented in. Rather than using the branch nodes to control rotation, you could use the trunks.

The reason I’m thinking about this is because I think setting it up so that each fork has more control of the growth coming off of it would help keep the tree nodes confined to a linear progression, a’la trunk-fork-fork-fork-fork-branch-branch-branch-leaves, rather than each fork having it’s own set of branch nodes.

And don’t worry, I’m not trying to unload a ton of extra work on you here. Just get the basic forking done, and we’ll all go on from there. :stuck_out_tongue:

2 Likes

Ha ha, no this is good thinking. Points do have a radius value built/coded in. But not a direction vector. It is like a vertex in that does not have a normal.

Bezier curves do have handles with location, radius and direction (handles) so if it is a bezier curve you have an idea.

We do have the Blender dev syndrome, where a new idea breaks or changes the entire workflow!

A: Hey I have a great idea.

B: Yea but is that compatible with what we already have?

A: Well no but you could change the code base.

B: Reject.

A: Ok I will try and make it compatible.

… Years later :rofl:

PS don’t worry I will concentrate on splits.

PPS In the splitting node there is a way to control the split rotation so that the splits can come of just a portion of the full circle (like a pie chart).
This could be done with branches as well so that certain angles of branch growth are no go. If you follow what I mean.

2 Likes

I’m over in the Blender discord asking dumb questions that usually get ignored again. It’s great! :smiley:

I’m thinking of grabbing something more akin to the direction of velocity for a spline point, but obviously without any movement. Whatever direction the vertex is pointing, the instance will spawn along.

Basically, I’m trying to do what the rotate instances node already does, but using some theoretical predefined imaginary setting in place of the rotate instances node. This MIGHT be me overthinking a solution to a problem that probably doesn’t even exist.

1 Like

You can get a direction vector between the position of a bezier point and the position of one of its handles.

3 Likes

Coming soon: Leaf Generator!

9 Likes

Are you completely forked off with trees?

3 Likes

It feels like my life’s been filled with nothing but these forking trees, more of these forking trees, and even more forking trees than that these last few.

5 Likes

Speaking of forking…

I know you are anxious.

So here is the pre alpha version so you can get an idea.
The example does not look much but it is the concept that counts.

When you open the file be sure to play animation before looking at anything else!

TrunkSplitting_1.0_Pre_Alpha.blend (197.3 KB)

I have loads of ideas for this method and will extend it a lot.

I have not set the presets yet and need to do the UV’s, add custom taper etc

I will steal ………… Ummmmm STUDY your methods :blush:

For this version I used your trunk node to make sure it was compatible but I took the liberty of changing one thing.

Instead of the lean and bend inputs I gave your trunk a similar shaping method to my split node, it allows you to shape the trunk with 3 points. So the trunk can change direction in a certain point.

The basic concept is that I create sort of “hero branches”.

The splits use 3 points in space (well 4 if you count the “0” point).

The offset vectors control these points in local space, so X goes away form the origin Y twists and Z goes up and down.

The inputs (that are not self explanatory):

“Where to split” lets you chose an index of the trunk (if you go over the last index the splits will fly away.

The “From trunk/ From stub” checkbox changes how the initial angles are distributed.

From Stub will evenly distribute the splits in a circle.

“From Trunk” leaves out one angle for the original trunk to fit in, if you keep the original trunk you have to adjust the general “split” rotation to leave it in the missing angle.

After the noise inputs there are some offset inputs. I will change this method in the future to make it more effective.

They change the rotation and scale of individual “Split instances”, as I say they are a bit fiddly at the moment I have ideas to get them better. At the moment they work in order of the instances I have an idea to reorder them, it is on the to do list when I get round to changing the method.

I hope you like it and are not disappointed, I have many ideas to improve it and it will develop it into a new branch system as well.

I have been studying the trees around me (I am surrounded by the bloody things) and have come to the conclusion that in the end I will be able to make them all procedurally.

I will play around and post some examples of what can be done. Yes old wiggly Oak trees!

On the to do list:

I will turn the frames into node groups that can be turned off for performance vrs control ( I wish there were parameter drop down menus!)

Stubs, I really want to have stubs and cap them trees get dismembered all the time.

There is a large etc but I have to organize my ideas.

I also have a problem, I am addicted to this!

3 Likes

Cool, or should I say forking great,
nice wind sway and root wiggle!

3 Likes

Man, that is awesome. What you’ve done is provide an elegant, simple, and perfect. No matter how much I play with the shape of the trunk, it still outputs a clean fork.

I can’t wait until I can hook it up to the branch nodes to see how it all comes together. :smiley:

…wish I had more time to goof around with it, see what all I can do.

2 Likes

Yeah, thats really good fun to play with and just the right balance of controls.

One thing that drove me crazy was the capture attribute node. When I said that you can extract the radius from the points I was doing it with that stupid node. :hot_face:

The problem is that it only works in a linear fashion along the same geometry, it took me ages to find out about the sample index node,
edit: (that captures an attribute and sets it free instead of putting it in prison!).

Another one is that instances do not have attributes until you realize them (luckily they get them back!). So you could also use the top part of the main trunk for the instances instead of creating a new curve, once realized they get the radius back.

1 Like

Once you have perfect trees how are you guys going to cope with nothing to do :smiley:
Whats the next obsession going to be, whatever it is im looking forward to it haha

2 Likes

We will find something!
There is still a long way to go with trees though. :slightly_smiling_face:
(anything to avoid going back to my smoke sim)

2 Likes

You know, I’ve always wanted one of those hats with the flaps over the ears. I might knit me one of those when I’m done with this.

4 Likes

I found the first bug. Recursive splitting broke (one split node after the other only instances on one split)

I Know why, it is because I changed the point selection method.
I have a solution in mind but will take a while to work out properly.

The good part is that it will allow me to select a range of split points (not just one)

Hopefully wont take long!

2 Likes

One day, I will live this dream…

trapperhat

1 Like

Well, once we have Trees, one then needs Rocks, a Fence, got to have Flowers (guess that could be a Leaves extension).

It’s almost like we need a voting list… haha

Nah, go big or go home…

2 Likes