
L-System is one of the most important python scripts of blender and this thanks to Armagan Yavuz the creator of the script. What L-System script can do? It can do trees, anyway from script creator site: 'This is not a vanilla lsystem parser/processor but rather a GUI fitted in top of a simple lsystem engine. It is a lot easier to use than the vanilla thing while is still quite powerful'.
L-System come from Lindenmayer Aristid system a biologist who introduced it in 1968 as a mathematical theory on plant development. Basic is a description, using a set of rules, of a 3d form as a initial part and rewrite it using another set of rules.
Understanding the basic patterns
In this part we explain the basics of the script and later we do a steep by steep into a making a tree.
Alt+Pkey [or RMB>Execute Script] in text window will give you the GUI . You can deselect Add Leaves button to understand first the branches setting and later you can add the leaves back.
Lsystem use a basic 3d form or pattern which is repeated all over again. From script creator site 'There are two types of patterns available: "split N" and "arm N" types. The difference is that, in "split N" type the main branch forks to N sub-branches and effectively disappears, whereas in "arm N" type the main branch continues to grow along with the sub-branches.'
The tree branches are controlled by Branches and Stem buttons. By default Stem rulset is None and in this case entire tree is controlled by the Branches buttons. If the Stem rulset is anything else that none Stem buttons control the main branch and the subbranches are controlled by the Branches buttons. Stem buttons function the same way as Branches buttons.
How rewriting initial pattern works? First notice this two settings repeat:1 and iteratns:2. You have Arm2 2D as rulset for branches and this is the initial form, changing repeat you still have a 3d form as a basic pattern but kind of Arm4 2D for repeat 2, Arm6 2D for repeat 3 and so on.
To understand how iteration work set repeat:1 and change iteratns to 1 and press Generate. Notice that is nothing to look like Arm2 2D, is just a stick, the very basic segment of the tree. Change iteratns to 2 and press Generate. You will see that your first stick is growing in a Arm2 2d shape. Changing repeat to 3 and generate it. Now you notice that your basic pattern start growing as a tree.
First little tree
Ok. Let's try to make something who look like a real tree. Not too complicate but simple and fast to generate. Start with Arm3 pattern for branches and iteration: 2. Steam ruleset will be None, so entire tree will be controlled by the branches ruleset Arm3.
Make the tree look young changing the Scale and Radius.
You can change also resU to 14 and LOD to 1. ResU is the number of vertexes of a row that a segment is made from and 14 is ok for a small tree. LOD stand from level of detail. This is the reduction of the vertexes of a row from one iteration to another. The first iteration will have always the resU number of vertexes, the next iteration will have a 50% reduction for LOD: 1.For a lower LOD will be a lower reduction. In your case the second iteration will have 7 vertexes per row and the third one will have only 3. In fact 3 is the lowest number a level can have.
Change resV from 2 to 4. ResV is resolution of one segment of the tree which mean the number of rows a segment have and this parameter affect other parameters like Shorten, ThinDwn, RnTwist and Force [Left is resV:2, right is resV:4].
Since Shorten, ThinDwn and Force remain as default change ThinDwn to 0.15. Note that the branches become more thiner toward the end when resV is increasing [Left is resV:2, right is resV:4].
Changing subSlope to 0.15 and iterarns to 3 and generate. Now you have a tree as below:
Adding leaves
Now is time to add leaves to our tree. Leaves rulset is clear you have a minimum number of leaves in EndPoint and a maximum in 2+2 Perpend. However there is a connection between Leaves ruleset repeat parameter in Leaves section and resV parameter in Branches section. ResV in Branches section divide each segment into a number of rows but this is true when the ruleset for Leaves is EndPoint and ActivePoint. If ruleset for Leaves is anything else, the number of rows for a segment that carry leaves is given by repeat parameter from Leaves section.
To add a little more randomness to the tree change RnScale, RnDir and RnTwist fom 0.1 to 0.15. After generate:
Saving the tree
Press Save button and give a neme to the file with .def extension. Def dose not mean anything is just a convention. The file is a text file with the setting for your tree. It is very useful if you later want to work on that tree.
This is the end of the first part. In the second part we continue to explore the parameters of the script, how you can grow up the first tree, how you can add your own leaves and how can the material of the leaves and trunk can be improved.
LineDstudio.com is a web based studio who provide tools to enhance your interior and architectural design projects.
It's a affordable solution for architectural and interior designers who need the visualization of their projects.