A new tree add-on

your welcome to add this to contrib

Hello all,

Last couple of weeks I couldn’t do much work because severe back problems (a slipped disk) block me from sitting behind a desk :frowning: (and alas, no Blender on an android tablet yet)
however, as soon as I am recovered (there might be some surgery involved) I will certainly take up the development again and try to address the issues mentioned the past few weeks. For example the issues mentioned by Ace Dragon are perfectly valid and will be addressed. So you all need to have a little patience I am afraid but “I’ll be back” (@220696 imagine a dutch accent here instead of an austrian one :slight_smile:

in the mean time, keep posting your findings/critique and of course any awesome images you create, this thread will function as my backlog.

Sad to hear. Hope you get well soon!

Echoing what he said, I imagine that this type of thing is anything but fun, when you look at the pain involved and the fact that you can’t do much.

Hope you make a quick recovery and can start functioning normally again.

take care.get well soon.

hi Light Bwk,please can you post settings for maple tree(post 44),it looks good.thanks

Hi Varkenvarken.
Hope the back is coming along better. How is it going?

This summer I am traveling to norway for some time and I am going to look greatly into your addon for some aarch scenes I am going to do.

BTW, have you seen the new treesketch app v 3.00 for ipad? It seems to be using some of the same approach as you have :slight_smile:
ANyway hope you back is better. Roger over.

I’m pleased to announce that the spacetree addon is moved to contrib:

https://svn.blender.org/svnroot/bf-extensions/contrib/py/scripts/addons/add_mesh_space_tree/

As my back is (slowly) getting better I will first update the corresponding BlenderWiki page http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Add_Mesh/Add_Space_Tree and then get the script fully up to Blender standards (like making it pep8 compliant etc.).

After that I will start on fixing the bugs/usability issues mentioned in this thread and start thinking about the enhancements/feature requests I received.

For now I will leave the GitGub repository as is, because for many people installing an add-on from a .zip file is a lot easier than downloading a bunch of files from the Blender svn and installing it by hand.

@ejnaren: treesketch is AFAIK even (co)developed by Adam Runions, the guy that devised the space colonization algorithm I use in my add-on :slight_smile: It is so awesome that it is the only reason I would want to have an iPad instead of a Samsung Note 10.1 :slight_smile: Due to inherent limitations in Python it cannot easily use multiple cores on a computer, and that means that I think it is unlikely I could ever make my script perform well enough to offer truly interactive speed like treesketch :frowning:

@everybody: thanks for the moral support, it truly helped to keep the backpain issue bearable!

Welcome back!

Good to hear the back is getting better. Hope for a speedy(er) recovery.

And it sound very nice about your addon!
I agree on why one would want an iPad :smiley: I did not know python had such limitations… Does that affect every python addon/program?

yes it affects every python addon (although the complete answer is more complex, in some situations it might be possible to code around it but in most cases that would imply using C extensions). This doesn’t mean Python is slow but that for some tasks that handle massive amounts of data other solutions are more suitable. It would be possible I think to implement it as a modifier or even an wilder idea would be to integrate it with the particle system but that would take software engineering skills way beyond my capabilities so I think I’ll focus on the current Python implementation :slight_smile:

Hi guys,

I started working on some of the feedback I got in this thread and the first (minor) issues are addressed in this article.
It features a more intuitive uv-map for the leaves and an option to control the offset from the leaf to the twig that it is connected to.

cheers,

– Michel.

hi,
thanks for your continuing work on this.Arbaro produces a bough which travels at an angle(with possible random waviness) and branches occuring at a particular angle to parent,in real trees when a brancing occurs the parent branch is tilted at an opposite angle forming a “Y” junction,this is possible with branch “split” option in arbaro (xfrog has “Deviate” option) any possibility of adding this,this will add to the realism .


So happy your back is starting to feel better, which means this addon will be able to truly blossom into the powerful tool it is capable of becoming.

Hopefully, this also means that this can eventually replace Sapling as well, especially once the native skinning is overhauled to avoid overlaps with proper UVmaps and once it’s able to make Pine trees. (so as to become the only generator you need for any type of woody plant).

@rusted: controlling the branch angle would indeed be valuable for realism. I will certainly have a look at it (the space colonization algorithm simply lets a new shoot take off in the direction of the closest markers. It would be interesting to see if we can weight this against the initial angle for forks, providing some control over how fast the initial angle is ‘forgotten’. Another issue is that in most plants buds that will develop into branches are not randomly distributed but follow a distribution that tends to maximize the amount of light that leaves receive. This might not be all that noticable for branches of mature woody plants, but for the leaves it might add to the realism if the buds follow such pattern.

@Ace Dragon: the skinning part & uv-mapping is at the top of the list (but it is not exactly the easiest part so you’ll probably see some smaller fixes first ;-). BTW, I don’t see this script as a replacement for sapling, although there’s overlap of course. Sapling offers better control over certain aspects of tree shaping which is desirable in some situations. But your hope that it will replace Sapling probably means you see areas in Sapling that could be improved and SpaceTree can get right from the start. Would you like to share those because that could help me make SpaceTree better.

About pine trees: now that is the really interesting part from a botanical point of view and in fact I’ve been thinking a bit about it already. Some trees don’t grow new branches just because there is enough light but have buds that once developing into a new shoot will prevent other buds down the line to develop. This is called apical control and will often result in straighter branches. Another process shaping mature trees is branch shedding. Older branches without much new shoots (for example because of being shadowed by newer branches) tend to be dropped by the tree, resulting in trunks with bare lower ends. Both issues are important in pine trees and probably not that hard to implement, so I will certainly have a go at it.

thanks for looking at the suggestion.this will be useful for curvy(arty!) trees like Higan cherry,japanese maple.a problem with arbaro ,ngplant is trees look a bit generic,capturing the overall form of the trees but not very natural.

Hi,
Am loving this add on. I was wondering if there was a way to add a new mesh for the leaves? I want to replace the squares leaves to something else like a flower. Excuse the newb question but I have no idea how to do it and cannot seem to find an answer for this on Google. If you could add a tutorial on your page walking a newb through from start to finish of a tree or link to to someone who has done it that would be awesome.

@KateDeAragon: under ‘add objects’ you can select an object to add besides the leaves.

Can’t do a step by step tutorial right now, sorry :frowning:

I must have been blind drunk and stoned when I sent you that message. I have found it and have got it working wonderfully. I love this add on. Thank you so much for making it. It is a pleasure to use and the results are amazing.

While reacquainting myself with the code of this addon I rewrote the core implementation of the algorithm that calculates the branch structure. This adds no new functionality but I thought a 100x speedup for a typical tree was worth an interim update.

Read all about in in this article. Please note that this version is not yet commited to Blenders addon-contrib repository (I want feedback first) so read the installation instructions carefully, especially if you’re using a daily build.

The current version on GitHub is now 0.2.0 . It features a much simpler native skinning method (besides the option to add Blenders own skin modifier). This native skinning method is rather crude but extremely fast, so ideal for getting a quick impression of what the final tree will look like. I still have to tweak the code a bit because the scale option should give you approximately the same thickness of the branches for both this method and the skin modifier and currently is does not: the skin modifier will look much thicker.

Anyway, most of the tree generation process is now so fast that instead of using the update button I could make it interative again but I will have to think how to switch this off automatically when using native skinning or very large values in a way that is clear to the end user.

C&C as always very welcome.

cheers,

– Michel.