GeoTree: Procedural Trees in Geometry Nodes

No worries, man.

Appreciate everything you are doing. More power to you :+1:

1 Like

Just letting you all know I’m still banging away at this. I’ve done quite a bit of work on the limb/branch/stick/twig randomization so that they’re no longer one instance repeated across the scene. I’ve also added in more control to the general gnarling, shape, and direction of the limbs.

There’s still a ways to go, but it’s slowly coming back together.

13 Likes

Yep, I think I finally found the issue. The addon uses a 3 parenting hierarchy system only: Trunk–Branch–Leaves.

If you use an additional branch level between the leaves and the branch that is parented to the trunk. It won’t work with the Pivot Painter addon for Blender. For example, if you use Trunk—Main Branch—Sub Branch—Twig----Leaves parenting hierarchy. It won’t work.

1 Like

I plan on picking it up again any day now, but with all the holiday preparations going on here recently, I haven’t had much time to do it.

Rest assured though, I haven’t abandoned it.

4 Likes

Thanks man. Btw Happy holidays :slightly_smiling_face::+1:

1 Like

Happy holidays! I’m gonna drink so much egg nog this year…

2 Likes

Now, this looks interesting…

11 Likes

Anyone know how autor add editable many branches?
https://twitter.com/80Level/status/1503287314780499968?s=20&t=tf7a81PqvaJm3pXFWZnSrA

3 Likes

It looks like the trunk and main limbs are just manually placed splines, with the branches procedurally generated off of the limbs.

I don’t think it’s vastly different from what I do with my trees. The biggest difference is that his process starts one level deeper.

2 Likes

Yes I assume they’re manually placed. For customizability I made a canopy system for the branches to raycast against, so I can sculpt the canopy mesh and the tree responds to it. This is not so different but then again it depends on the kind of tree you want to generate. This works well for dense foliage, less so for sparse foliage.

2 Likes

@Renzatic

Hi there was just messing around with you latest GN Tree, bit laggy when changing values but the trees it makes are awesome. I had some questions, im looking to do more stylized trees anime/ghibli style
Most of this style is to do with the shader and not how the tree actually looks, in this style sometimes the trees are drawn is more simple fluff balls but sometimes there drawn to look like proper shaped trees. I have some elements thats part of the style that would involve changing the way the leaves are generated. This is the part that id like your advice with, as im atleast for now using your latest tree gen as my base.

Here is a Stylesheet i am using, the part to look at is the highlights both on the light side and dark side.

Im planning to use this LeaveAtlas and have them all as different leafcards, i then want to generate the different cards so they appear on the tree according to different rules. Atm you just have the one leafcard used allover

If you look at the leaf atlas in rows the top row of cards would spawn in the center of the tree/leaf clamps per branch, there meant for an inner filler. Larger more simplified and less alpha cutout
Next row down spawn over the first and again for the next row. the last row is the most outer layer and these would be used for both highlights on the light and dark side. All the leaf cards would use the same material but the ones for highlights would use a tweaked duplicate. In the shader there would be a colorramp set for the yellow to green to blue hues. I would just change this colorramp on a duplicate material and use it for the highlight cards and make so there more lighter then the base material.

Here this guy has done a similar feature with GN, its quite a simple setup but he generates the highlight cards and different cards in the center ect. Iv tried to lead up both GN and merge them but i just dont know what im doing so i thought i would ask. Regardless of it being for stylization im sure it could be a useful feature to be able to distribute variety of leafcards just in a general sense

The last part is i want to make all leafcards face a cameral on there own pivot, so each leaf is its own billboard. We can view through a camera then enable the ‘camera to view’ option so i can work wile staying in the camera. I can see you do some rotation calculations to i guess this would be a togglable option that switches to billboard mode

Let me know what you think, if you have a good idea to implement easily, the shader stuff im already working on thats more my area of expertise. Im trying to learn GN but its going to be quite some time before i can say i know what im doing lol

An extra edit, the example from twitter in his material he has an edge fade effect where a leaf card viewed at certain angles go transparent, its to help hide us seeing leaf cards on there sides as its looks bad. Id recommend this part for your leaf shader
Heres the effect done in unreal its the same in blender, it shows before and after. It really helps stylized trees as side view cards are much more noticeable but i think it would still help none stylized trees

3 Likes

I should be able to build that fairly easily. I was going to bang out a quick proof of concept for you, but then I saw that the person you linked to handily provided the .blend file for the tree in their example gif just a few posts below. It has the geo nodes and the leaf material conveniently provided for your perusal.

It should be easy as pie to use it with the geo trees, since the leaf generator is entirely separate from the rest of the tree. The guy in your link started off by subdividing a cube into a sphere, shaping it slightly, then spawning squished spheres along the surface of the base sphere. Beyond that, they do get a little fancy, but at it’s most basic, it is just distributing various leaf cards along the surfaces of the squished spheres. It’s not vastly different than some of my earlier attempts at making trees, though the end results are a bit nicer.

I’ve done that before, and really, I’d recommend against it, especially since you have access to that fresnel leaf fade (which is straight up awesome by the way, and I definitely intend to use it). Unlike in UE, Unity, et al., where the billboard effect is a simple vertex shader trick, billboarding in Blender has to calculate the position of all the individual faces relative to the object they’re pivoting towards, and recalculate any normal transferring you might have going on between your billboards and the underlying surface you’re capturing information from per frame. The end result is a chunkty framerate whenever you move your focus object, with results that, in my opinion, don’t justify the performance hit.

Hopefully, this’ll be something Eevee Next will address, since it’ll have support for manipulating vertex positions at the shader level in realtime. But until it arrives, I’d use the tried and true distribution method in lieu of.

1 Like

@Renzatic
Yer that angle fade trick is something i looed for how to do for a long wile, there was a game called the whiteness and it was properly the first time this tricked was ever used. Then i asked one of my UE coder friends to do it in unreal(which is the video i showed) then i noticed that the Stylized GN tree from twitter had it for blender. Its a subtle trick but really helps remove all those little eye sores of the thin lines of card edges :smiley:

I intend to use these trees in unreal using either the altermesh plugin or converting the GN tree to a mesh then importing as a regular mesh. I wanted to do the billboard thing in blender as im doing this in Unreal atm so i wanted it just to have a close matchup to how it will work in Unreal

Here and here are some examples of my trees in unreal and was put together manually in engine. And they dont use the leaf atlas, my hope is to have a GN generator that makes these trees automated. Where ideally i can import it into unreal using altermesh and go from there, my trees in unreal are missing the highlight leaves as iv tried a few things to do this unreal procedurally but this is whats lead me to go the GN route.

I would also like a mode switch for ‘natural mode’ and ‘simple mode’, natural mode is what your trees are like now more realistic in leaf placement where as simple mode are leaves placed in balls like mine in unreal or that guys blender example. In anime both types of trees are used depending on how detailed the background art is in its artstyle variation, some anime are simple and some are alot more detailed so both are relevant to me. Dont know if you have a good idea for this sort of thing, its less important to me then the other things though its just thing of convenience. Im guessing i can do this by just adjusting the settings enough, i wish Gn had Instances like in unreal where you have the main note tree then an instance thats just a list of the exposed settings. You edit the main node tree and it updates to all instances and there exposed settings avalable, maybe one day they will add this.

What also would be cool even just for your generator is ‘bush mode’ have a toggle switch that makes the trunk and branches generate in a bush size and shape. Would be nice as a quick switch, i guess we can do this now by changing all the settings but be slower to setup. Just an idea anyway.

So interms of getting your leaves to place different cards, how would you suggest doing this in your GN. I have spend several days trying to do this but i just dont understand enough, like in my mind im just connecting boxes but i dont have a true understanding of what they do properly. I need to dedicate more time to learning the basics of GN nodes. And going of what i know with shader nodes which is partly comparable but not quite. Im happy to experiment by my self but im stuck so i thought id ask for help, any idea to move forward would be great.

And btw your tree generator is really amazing iv looked at a few but yours is the best iv seen, iv not bought any gumroad ones though but still, i just wanted to show my appreciation for sharing this!!

1 Like

I’ll answer more, but I’m a bit pressed for time tonight. You’ll have to wait til tomorrow for the rest. :stuck_out_tongue:

Off the top of my head, you could probably do that with some combination of a boolean switch attached between a more realistic leaf generator setup, and a more anime style one, a proximity node, and an info node leading to your camera. Thing is, it’d be overly complicated to set up. Unless you’re intending on doing an animation, it’d be better just to generate separate trees meant for either task.

The biggest problem is that it’d only work in Blender. For Unreal, you could set up a few LODs to get that effect.

Not sure what you mean here, do you mean for the billboard effect?

And yer no rush, it was just an open question for all the features im talking about
Iv been trying for several days by my self so i thought id ask and just open dialogue about it

No, I’m talking about your transition from more realistic trees up close, to stylized in the distance.

Billboarding leaves is actually rather simple. @skuax, I believe, came up with a particularly elegant solution awhile back that I liked. It’s basically just this…

1 Like

Ah theres the confusion, what i was saying was about having trees generate leaves realistically(not in ball shapes) or stylized(the ball shapes) nothing to do with being close or not just two different overall style chooses

And the billboard effect i would just have on or off

Nothing to do with closeness just on or off and i guess the realistic vs stylized would be like presets for the generator. The billboard effect you showed i know but when i tried to hook this to your leaves ‘instance on pointes’ node it wasnt really working, you have alot of other rotation stuff going on so i guess thats got to be ‘disabled’ in billboard mode.

Well if anything i can skip the billboarding as i can do this in unreal, what do you recon with the layering effect. Interms of upgrading your tree generator with that feature?


I managed to setup a billboard mode by putting two switches and linking them so true removed your rotate instances after the instances on points

Problem iv noticed is with billboard mode i pretty much cant move the camera as it freezes, but i could turn off billboard move then turn it back on. But the problem is with the billboard off so the false vector for rotation is all 0 it still freezes viewed through the camera, i have no idea why.

Even if you have nothing plugged into either false or true in the switch just simply having anything plugged into the rotation of the instances on points makes it freeze through a camera.


I thought this might be a solution having two instances on points, one with nothing in its rotation and one with the camera but even at this point in the image before i connected the second switch up it freezes. Its not even hooked up yet but it causes a freeze, so im guessing theres just some sort of bug going on here and just move on from it lol
Im only on 3.4 so i may try newer build see if theres a difference

Id like to focus on the layering effect of different leaf cards, this is the more important aspect of the style im looking for

I had the same problem, and my only answer as to why is that it’s dumb. Even after removing all the appropriate nodes, it’d still chug along whenever I’d try to move the camera. The only solution was to reload the file.

That’s just the nature of the beast when it comes to billboarding in Blender. When you’re in geonodes, you’re working with procedural coordinates, positioning, all that good stuff. It’s having to recalcuate through the entire graph from the top down every time you move the camera, and the results are, well, you’ve seen it.

Though if you still want to use them in Blender, the best way I found to do it would be to tab into the big Geo Tree node, find the Leaf Axis, tab into it, then restructure it’s innards as such…

Now, if you want good, performant billboarding for Unreal, I’d recommend following this tutorial.

Yeah, it’s written for Unity, but he does provide a handy material guide for UE here:

Imgur

As for the rest, I am interesting in seeing how that guy put his leaf generator together, but I haven’t really scoped out exactly how and what he’s doing in geo nodes to achieve that look. From what I’ve seen though, I shouldn’t have any problem adding it onto my trees. I’ll just have to wait until I have some time to really commit to it.

1 Like

Im familiar with that quad to billboard trick, in the unreal version atleast its dosnt quite do billboards properly and had issues with the cards offsetting weird as you move the camera around. So iv deemed it not useable without more tweaks to the code, but yer billboards for now isnt a worry

As for the rest yer im interested to see what you make of it, regardless of my look and needs i think it would be nice to have with your trees just in general so. So atleast its not a limited use case sort of thing, should help add more leaf variety in your trees. Until you have time iv got some over projects to work on, looking forward to see what you come up with :smiley:

1 Like