GeoTree: Procedural Trees in Geometry Nodes

Hi Renzatic, I have been following your progress and I must say that this last node group is impressive It works like a dream. I will have a close look into the nodes when I have time.
Your leafy trees look great, well done :smiley: :clap: :clap:

1 Like

Everyone else that’s contributed to this thread deserves props as well. Everything I’ve done here are just bits and pieces I’ve culled from them, with a bit of reverse engineering of Maxime’s leaf node setup thrown in for good measure.

The best thing about it is how incredibly simple it is. It’s just generating lumps on the branches, distributing the leaves across those lumps, then orienting them to follow the camera. No more than 16 nodes, and it can generate some nice stylized tree leaves nearly automagically.

…now, if I can just find a way to make them look good in Cycles.

2 Likes

Yes 3 cheers for all involved!!

2 Likes

Quick question. Now that I’m no longer using billboards for the leaves, I figured I could maybe possibly get them working in Cycles, which they almost do, except…

It’s picking up the lighting and shading, but it also looks like the blob the leaves are distributed from is somehow being rendered alongside everything else, absorbing the light. I have no idea why it would be doing this, but there it is, causing problems despite the fact it shouldn’t even be in the scene.

Any idea what could be causing this? Here’s the appropriate part of the node tree, which isn’t vastly different than what I’ve posted above.

…going by my past track record, I’m guessing there’s something very simple I’m missing here.

Edit: Well, I kinda figured it out. Cycles doesn’t like the three plane setup I’m using for the leaves, always insisting on self shadowing them. I’ll probably have to mess with some shader settings to fix it.

Edit 2: Okay, I figured it out. Changed the objects to simple planes, and adjusted the voxel size on the tree mesher so they’re not bunched so tightly together. They’re pretty sparse looking at the moment, but I’ll experiment further.

1 Like

image
You probably need to turn up the transparency bounces in the light bounces section.
It controls how many layers of transparency that a ray will pass through, so if it’s too low, the ray will just stop when it meets the last transparent geometry, shading it black.

1 Like

I knew it. :stuck_out_tongue:

It was almost like magic. I increased my transparency bounces up to 40, and suddenly, I had nice looking trees.

2 Likes

Nice, glad it worked! Just watch out that you don’t put the bounces up too high, because it can really slow down rendering if there’s a lot.

Given the nature of the beast I’m dealing with here, it might be a sacrifice I have to make.

The results are worth it though. They’re not as painterly as they are in Eevee, but they’re still solid.

6 Likes

Thanks to @Renzatic for pointing me to this thread. Here’s the latest incarnation of my attempts at a stylised low poly tree generator. The basic theory works on shaping parts of the tree using RGB Curves; where the x axis is distance along the branch, and y is resulting radius/scale/placement etc.

I’m using metaballs for leaves - by placing faces were I want them and using the “instances on faces [scaled]” trick. It’s not perfect but getting close to what I was aiming for.

Is there a way to convert a curve/mesh into an instance? At the moment each child branch identical (aside from scaling/rotation). If I can figure out how to make a curve appear as an instance (into “instances on points”), I should be able to make each one unique; then drive the “Branch Form”'s seed from the index of the parent’s points


gtree2.blend (2.5 MB)

Officially, there is no geometry to instance node, but you can work around this by instancing your curve on a single point.

Such a point can be obtained by setting the count to 1 on a mesh line node.

Figured out the problem with my instance randomisation; I wasn’t realising the instances early enough; which now gives much nicer trees. Tweaked my tree shape a bit and still need to add some actual randomisation to the leaf sizes, but it’s looking better

3 Likes

Actually, it is there in 3.1.

1 Like

After spending a bit of time tweaking parameters and looking at actual redwood trees; I’ve got this. Unfortunately the blend file’s now 6.3MB for some reason - so here’s a could of screen shots of how I’m doing it.

Left is tree structure, middle has scaled randomly placed “leaf” planes, right is the result of metaball instancing on those “leaf” planes - made real, converted to mesh and decimated to about 0.2. I’m officially quite pleased with the results now (though I need to do something to stop the tips of the branches sticking through)



4 Likes

That’s so very very beautiful! :heart_eyes:

You need chonkier leaves maybe?

1 Like

That was done way back when. I’ve long since chonked up my leaves. :stuck_out_tongue:

2 Likes

Quick question: is there any way you can tell a surface to ignore contact shadows cast from a light source?

@Renzatic Playing around with your procedualleaves fil and it’s brilliant. Learning lots! There is one thing that’s got me stumped. When I try to apply this to another tree (or any other mesh) it’s like the Radius node is not doing anything and the leaves are placed all over the mesh. Is there something that you’ve done with the tree meshes that you’re using so that you can use the radius to limit where leaves are placed? Sorry if it’s a dumb question. :smiley:

Were your trees made with curves and that’s where it’s getting the radius from somehow? I’m just flailing around blindly here mind you. :smiley:

It should be distributing points on the outermost faces of your mesh, working its way inward as you adjust the To Min value on the Map Range node. If you want to get a good idea of what it’s doing, just plug the Points To Volume node into a Join Geometry node to get a nice visual representation of it working.

It should work on anything that has faces to distribute points on. Like here it is on a cube.

If you still can’t get it to work, post some screenshots of your problem, and I’ll see if I can help you out.

Oh, and I made my trees with Modular Trees 4.0

2 Likes

When I apply it to any mesh it distributes it evenly over the mesh rather than starting with the outwards faces. Here it is applied to one of the botaniq trees and with your tree next to it. Same geometry nodes on both.