Modular Tree

Thanks, this will be fixed in the next commit, but I wouldn’t recommend testing the wind yet, there are no safeguards!

I’ve managed to make the wind simulation run in real time.

Cool. That could be turned into an influence map for using with a game engine or external renderer…

Hey Maxime,

Can you turn the height and radius settings into dimension setting? Right now, I have to create a cube the size I want and then keep scaling the tree til it matches.

You mean a scale setting, to adjust the scale of the tree after its generation ?

i guess that’s what I’m talking about. I will make some pics later today to show what I’m talking about.

I have understand nothing:i generate the tree but when i make twig and i select twig in the advanced settings i update the tree but appear only little planes on the branches.
Great add on the trees generated looks very good like GROW FX, 'd like to merge my scanned trunk on agis with the tree generated.

I made an account for blenderartists literally just to tell you how amazing and easy this is. Thank you so much for creating this and sharing it for free!

Quick update:

I have implemented the resolution idea that pushed me to rewrite the addon: The tree is now subdivided according to the branches radius. That means the trunk has a lot of details and the smallest branches have a rectangular base.
Here is an example:




This tree only has 140 000 verts !
I have also added the particle system generation and a trunk node.

The next release is near !

1 Like

Now this is cool. Is this something you can turn on and off?

@AFWS You can choose the max number of subdivisions, so at 0 it’s turned off.

I have updated the roadmap here, so you guys can track my progress.

Very cool. Very excited to use the new node workflow with this functionality.

Oh hell yes.

This is an idea for (possibly a later iteration of) the node tree workflow.
Could the ‘voxel AO’ style trimming algorithm be given anisotropy, and/or a conversion to a cone tracing algorithm (using the same voxels)?
The conversion could do a few things:

  1. Yield more flexible and realistic results (control over number of samples, vertical anisotropy of said sample placements)
  2. Allow the output of the trimming node to be useful in determining optimal twig placement.
    Just look at some really dense trees/hedges, and you’ll find there are almost no leaves on the inside. This could in turn save a little memory and a LOT of rendering time, while only adding to the overall realism of the tree!

By the way, I love the realtime wind effect, but it should affect the small branches a lot more and the trunk a lot less. Would it be possible to make this edit without overhauling your entire algorithm?

@lolwel21
Thanks for your input, those are good ideas but I replaced the previous data structure I used for pruning by a simple dictionary, which is faster, but won’t allow what you are proposing.

I have just added an operator to add procedural details at the base of the trees:


Using a dictionary for the pruning? Now I’m kind of curious as to how that’s implemented. What do you mean by that? Based on your other recent posts, I got the impression that you were using a voxel array or octree.

I was using a tree, but it was a bit overkill. Now I simply round the branches coordinates to a certain resolution, and add the radius to the previous density value in a dictionary, using the rounded coordinates as keys. When two branches are close they will share the key, and the branching is determined according to the density and pruning strength.
To simulate anisotropy, I can simply make the pruning strength vary with the branch direction, I don’t need to change the density values.

In the future I may be checking adjacent cells to do kind of a voxel antialiasing to prevent the lack of pruning when two branches are close, but in different cells.

I have also thought computing the density gradient at the branch position to orientate it toward the most available region, and even use this to fill a user defined volume, but my main concern is speed, as I want the user to be able to tweak the tree in real time.

In time, I will write the tree functions in cython, or directly in c++ to allow myself to add more computation heavy features.

I am working on a procedural bark material, here is the current result:


2 Likes

Great result, congrats on the way the script is evolving :wink: