GeoTree: Procedural Trees in Geometry Nodes

I’d chip in, but I’m trying to slog through the tedious stuff right now.

Just spitballing here as I try to avoid doing boring stuff…

Why don’t we treat the forks as another stage of the tree? That way, you could use tradius to control the maximum size relative to the trunk? In practice, it’d just be just a small handful of very large extra branches that are spawned at a couple of specific locations.

I could also set it up so that it can use custom made splines, though the problem with that is that the trees would have to be two separate parts on the outliner.

2 Likes

I like both ideas, I am fond of the control you get editing the curve especially for bending the trunk/s, but on the other hand a more procedural way is also good.
I will try both.

2 Likes

I made a few thumbnails for the asset browser. They’re not the prettiest icons ever made in the history of graphic design, but I think they’ll do the job temporarily at least.

And they don’t look that bad in the asset browser:

What do you think? I’ll have to come up with something for the trunk and the billboard leaves, as well as a uv unwrapper and whatever other nodes you add, but I wanted to have a starting point.

Geotree_Thumbnails.zip (212.8 KB)

4 Likes

Okay, that’s pretty damn rad.

Also, out of curiosity, does anyone have a good tutorial on how to use math nodes to emulate a float curve? I’m trying to use raw numbers for the taper on the trunk, though I’m not exactly sure how to translate from one to the other.

1 Like

The float curve is, more or less, bezier curves, which you can find the equations for online:

Scroll down to General Definition. I’m not sure it’s worth the effort, though, that is some nasty math…

Alternatively, I think you could use a color ramp with shades of grayscale to emulate a float curve node, but again, I’m not sure it’s worth it

1 Like

…yeah, I changed my mind.

1 Like

My initial idea was to have, say, 3 entries where you could control the taper on the tree. Like, you could set it to 0.4, and inflate it while influencing 0.2 to 0.6 with a nice smooth falloff.

But after seeing that article you linked to, I’m thinking, yeah, I’m just gonna stick to using the float curves.

Edit; That’s weird. I thought I was editing my previous post.

1 Like

You can use exponents to get a similar falloff effect without the super complex math that it’d take to create an entire bezier spline system.

Experiment with a combination of exponents, powers, logarithms, and simple operations until you get the desired result.

Some examples:


2 Likes

That’s my favorite way to work with math nodes- throw crap together until I get what I want :sweat_smile:

3 Likes

That’s pretty much what I do. I’d say a good 75% of my time with math nodes is random guessing.

…actually, that’s a lie. It’s more like 90%.

2 Likes

Well in principle you just need to invert your input factor and the power function for the whole thing. If your input range is from 0…1 this is fine. For an exponent of 1 the taper is linear. Always keep the exponent >0 . Below 1 the tapering is bulgy and above 1 the opposite

Try this as a replacement for your trunks float curve. The exponent is the taper the last multiply the thickness.

2 Likes

That provides a nice taper, but it still lacks the control I was wanting.

Really, I think sticking to the float curve is the way to go. The downside of it introducing an extra node into the mix and ruining my nice nodal flow is offset by it being fairly intuitive for a relative newbie to grasp.

2 Likes

Ok, May I ask you a dumb question. I havent had time to check for geometry nodes updates for quite a while. And what is this named attribute banner on top of the node groups?

It’s telling you whether a particular node is either using or storing a named attribute. In my case, I have tradius, bradius, and the as of yet unused treeuv in play across my nodes.

1 Like

What its added automatically if a named attribute is inside the group?

Yeah, that tag will pop up automatically when you store or call for a custom named attribute.

1 Like

Here’s an idea:

Leave an open input for the taper, along with some values that control the exponent math:

When something is plugged into the Taper socket (e.g. when the sum of all values is greater than 0), override the value with it, ignoring the additional settings:


It’s the best of both worlds! New users can get something that looks nice right off the bat, and advanced users can get powerful control.

3 Likes

It’s an overlay in the node editor:
image

1 Like

Thats quite nice. Thanks.

@Renzatic : One more question. I just looked a bit through this thread. And quite like your leaf clusters.
Did you create the custom normals in geometry nodes? And is this just a big bunch crossfaces or is there more hidden in there?

2 Likes