Here is the geo without your geo nodes on it.
I think I know what you’re problem is.
Your trying to use your own leaf material on top of the procedural geometry, right? If so, hop over to the Shader Editor, add an Attribute node pointing towards uv_map, and plug it into the vector inputs on your image nodes.
If you haven’t made any changes to my geo node chain, you should see your leaves pop right in.
To my knowledge I didn’t change the shader.
I did a video capture just now showing what I did. Thanks for your patience and great node setup.
I see what your problem is. I was initially confused, because I read that one post as “here’s the geo with your geo node on it,” which made me think you just had a shader error.
There are two ways to fix that. The more indepth one is to play with all those sliders in the canopy generator, and make sure you finely tweak them by incremental steps. Set the distance min on the Poisson disks by a bit, adjust all the various settings on the Points to Volumes node (specifically the Radius), and make slight adjustments to the To Min range with the shift key held down. You’ll get it eventually, but sometimes you really have to finagle it.
Or you can do it the cheap way, which is to scale your tree up to ridiculously huge sizes, apply the scale, then add the geo nodes to it. This provides you with more play on your various sliders, where a difference of 1 is just a few relative inches on the tree, rather than half a limb. Once you’re done, rescale your tree back to normal size, but don’t reapply the scale.
I get it! Thanks for the help.
What lovely trees, might post a custom non-procedural example
Finally done with a procedural tree, need to squash a few bugs and it could use a bit of rock 'n roll, but I think it is a good basis to work from. What do you think?
Came across this by total happenstance. It’s damn good, and I intend to take apart his geo node setup to see how he managed this.
Hello, my good old friends, it’s been a while!
I’ve been working on an interesting project lately, some stylized trees that are kind of bonsai-esque:
It’s loosely based off that tree tutorial by kammerbild that uses modifiers. Mine is entirely geometry nodes based. As of now, a lot of the parameters are hardcoded into the nodetree, but I plan to clean it up and make it more parametric soon.
Here is a breakdown of how it works:
I start with a line and shape it using a float curve.
I create a radial array with it.
Now I can add some noise and twist:
I can then distribute smaller branches, capturing the direction of the parent spline, and randomizing it.
Finally, I can mesh it using points to volume and volume to mesh, taking the spline factor as the radius.
And that’s pretty much it. In the final version, I clean up the artifacts procedurally as well.
Oh and leaf distribution blobs can be distributed on the upper branches, using volume to mesh once again.
I’ll try to post a file once I refine it a bit more. What do you think so far?
I think it looks pretty good. The only thing I’d recommend is to add more variation in the leaf sizes, and make them smaller overall to give the canopy a bit more depth and fluffiness.
Also, I used that same leaf texture to paint this.
That is looking pretty nice! I would recommend randomising the scale of the lines after the radial array. You can also add some large scale noise after the volume to mesh to add some “wonk”. In general try to randomise as many parameters as possible!
Thanks for the tips, @Xeofrios and @Renzatic. Here is my latest version:
It still has a few issues, and I have to make the parameters and seeds more accessible, but other than that, it’s going quite well.
The leaves/blossoms are looking good so far. I will probably replace them with a painted texture of my own when I get the trunk generator down.
As for the base, I followed @Xeofrios’s principle, and made some of the main limbs shorter randomly. I also distributed some additional knots to break up the shape. As for displacement, the topology makes it difficult to displace without inflating it too much. Maybe I can add some small detail to the shader later on.
Okay, it’s not entirely fleshed out, and a lot of the parameters are not easily accessible, but for now, here’s a file to play with:
gnarlytree.blend (4.0 MB)
Most of these are coloramps or float curves that should really be replaced by map ranges for better control. Other than that, the the group is good enough to create simple bases, and you can get some really cool results with the current parameters. Right now the voxel amount is low for quick previews and seed changing, but it can be increased in the meshing section.
Also, I would like to add control to certain things such as tree height, upper limb spread, etc.
There are two hidden objects: one for generating leaf blobs, and one for creating outlines around the tree.
Have fun, and let me know what you think! And if you get any cool results, make sure to let me know!
I’m working on a version that replaces some of the first float curves with exponents and map ranges. So far it’s gotten a bit complicated, but I like the extra control.
You know, you may have inadvertently created a fairly solid procedural hand generator. Those branches look spookily like grasping arms.
That looks really great! I wonder if there’s a way to swap out the thinner branches/roots for full curves, so that you can retain the amazing detail in the trunk, without having to use insane densities to get the details in the branches?
I think the hardest part of that would be how to merge the two while still looking natural…
Great job, though, it’s surprisingly few nodes for such a nice result!
Thanks, I plan to redo the branches with more control.
The issue with splines in general is that they can’t branch at all—each spline must have exactly one start and end point. This makes branching networks such as trees really difficult to create. Maybe I could find a solution with extruding mesh vertices, subdividing the edges a lot, and than meshing the points? Splines give a very nice curvature though.
The volume meshing technique does have the tradeoff of having to use high resolution to get small details or branches. Possibly, not joining them at all and meshing them separately is the better option, but seamlessly joining them into one continuous mesh might be difficult. Simply using a union boolean will give uneven and messy geometry.
That’d be your best bet. Once you start getting to the tertiary branches, no one will notice that they’re floated on the mesh, rather than being smoothly attached.
I think the best thing to do would be to look at the way Speedtree generates it’s geometry, and try to copy that. It actually floats most of it’s geometry.
Okay, basic explanation of GN trees above, after screwing around with them for a couple of days (and also looking at the Fantasy generator, which is also cool, and I intend to try to ape some stuff from).
To put it simply, it’s just distributing splines upon splines upon splines. The twigs, are a single simple spline with the leaves distributed upon splines, then scattered and rotated slightly to give them that bushy, leafy look. The results from that are then instances onto another spline that serves as a larger branch, and those are instanced to a larger branch, giving you the branch end result.
It’s geo-node 101 stuff, but you can’t deny the quality of the results.
Those branches are then distributed onto another spline which serves as the trunk, and given shape through a scale modifier hooked up to a float curve.
There are two things I’d like to do with my future tree generator. One would be to make it more polygon efficient. The trees this thing produce look nice, but they’re around 2-4 million tris on average. The second would be to get a better variety of branches, since you can tell it’s instancing the same branch over and over again around the tree.
For the latter, I came across this video on Youtube, which made me think I could combine the two together to create more customizable, randomized trees.
I might also try Zorro’s volume remesh to get more gnarly, natural looking trees. I’ll post more later.
Edit:: Well, it isn’t quite as simple as I thought. I’ve got most of it down, and reorganized the GN_Tree’s nodes into something a little more readable (at least for me), but I CANNOT get the secondary branches to pop up with the leaves.
I can have either/or, but not both together. Nothing I’ve tried gets it to work. So I’ve got a solid and textured trunk, some little lines showing where the outgrowing branches should be, and some leaves.
If I can’t figure it out by tomorrow, I’m gonna post it up here, and beg one of you for help.
Edit 2: I keep having to edit this because I can’t post until someone else replies.
This is just a slightly cleaned up, very lightly tweaked up copy of one section of GN_Tree’s nodes with the Fantasy Tree bark texture, and my Musgrave derived leaves applied. You can’t make an entire tree out of it yet, but you can generate a near infinite amount of branches from it.
GeoBranch.blend (1.4 MB)
edit 3:
Okay, I deleted my post above so I could put this here, but it didn’t work, so…
Keep in mind that is very much a work in progress. And please, excuse the janky quality of my video. I’m not exactly a pro at making these things, plus turning OBS on while recording a procedural tree with a lot of moving parts ended up being a heavy load on my poor old computer.
So without further ado: CRAZY TREE!
Edit: More crazy trees. I’m going for the longest post in the board’s history here.