Modular Tree

add-ons

(Bernardo) #241

I was looking at some speed tree video. As I mentioned earlier I know this might probably be a bit hard to implement (otherwise they wouldn’t be an industry standard for making trees :smiley: ) but I guess in this video there’s a lot of nice stuff shown.

I think that the procedurality should kick in a bit later in the process, so that the user can be able to give the base shape of the tree the look he’s really looking for.

I don’t know for example we could use curves in blender as the main features of the tree (trunk and bigger branches) and then use the procedural part to go into the finer details.


(Maxime) #242

That’s quite inspirational indeed.

I think I can do a blender equivalent of what is shown in this video with the grease pencil.
Draw trunk and branches with the grease pencil, visualizing the result with curves, and then generating the tree with modules and iterating for procedural branches :).


(GrayTrace) #243

Hi Maxime,
many thanks for bringing this up again! It’s such a great toy … and giving it more interactive flexibility by using grease pencil would be perfect!
Another inspiring example is the free TreeSketch app for the iPad, which I never tried (due to the lack of an iPad) … but it anyway vanished from the iTunes store and can only be used on old OS versions I heared.
Here’s the link:
http://www.algorithmicbotany.org/TreeSketch/


(Hammers) #244

Yes, I was just thinking of TreeSketch! I managed to find a download for it once, but would need to buy an old iPad with the right iOS on it already to make it work. Such a shame that project faded, and would love to see some of that functionality in a tree addon like this one day!


(Remade) #245

hi Maxime, please make branches with single poly(1-2 tris) for leaves.thanks.


(Maxime) #246

I took inspiration from the speed tree workflow, and I’ve made some progress. I’m pretty satisfied with the results.

The tree is created with the node editor.

The grease pencil input node, for drawing the trunk and the main branches.
The split node, to add splits to selected branches
The grow node, to grow procedural branches at the selected extremities.


The Split and Grow nodes can be staked any number of time to have specific control over layers of branches.
here is an example of a last layer of branches with a lot of gravity:



(Walli) #247

this looks like you give a lot more control to the artist, compared to before - impressive!
Is this on Github already?


(Maxime) #248

It is on my github under the branch “rewrite_all”, but a lot of features are missing, like leaves or uvs.


(Mandalorian) #249

Very cool update. This addon was already awesome, but I’m really excited to be able to use the nodes in the future. Opens up a lot of possibilities.


(Jaydead) #250

Really excited to try it out once it’s ready! Looks wonderful!


(kabu) #251

Hello, is there a way to avoid this uv artifact?


Thank you


(germesoleg) #252

Hello Maxime , can you tell me please ,where i can change code for 4 poligones model. thanks


(AFWS) #253

Is it possible to make a tree with six sides? I played with all the settings ,but it stays at like eight.


(melvi) #254

This is a great addon.


(Maxime) #255

I just found the time to implement uvs, fix bugs and add an option to visualize with curves.

Without the visualization, the algorithm is 5 to 10 times faster than the previous version, and with the visualisation enabled, it’s 50 to 100 times faster.

On my computer, the tree below was generated in a 1.05 second.



(OLST) #256

OMG It looks amazing!! Great job!!


(kabu) #257

Looking forward to try it!
Would it be possible to have some more tree examples?
Thank you


(Maxime) #258





(Klutz) #259

There’s an error in the file prep_manager.py that stops the add-on from working in Linux (and probably Apple’s OS). The offending line contains a hard-coded “Windows” backslash in a file name in line 63. The original line

bpy.ops.wm.save_as_mainfile(filepath=bpy.context.user_preferences.filepaths.temporary_directory + ‘\modular_tree’, copy=True)

needs to be replaced by

bpy.ops.wm.save_as_mainfile(filepath=os.path.join(bpy.context.user_preferences.filepaths.temporary_directory,‘modular_tree’), copy=True)

(Keep the indentation) Please note that this board seems to add an erraneous space in the word temporary_directory above. Just remove it if it’s present.

Also, the initial line

import bpy

needs to be

import bpy, os

That way the file will work on all operatings systems.


(Maxime) #260

Thank’s a lot !
That’s fixed now :slight_smile: