Tips, Tricks, Discoveries


Thanks to NaN (Blender authors) For this wonderful freeware.

Lsystem is a script that has been developed by Armagan Yavuz : www.geocitie.com/blenderdungeon

Back to the first page of the site
A FEW DOWNLOADABLE EXAMPLES
Index of Tips and Tricks "MiniLab"





SECOND PART : Neo-lstseed From JM.SOLER

Neo-lstseed the version of L-System modified by JM Soler
The Graphic User Interface
Vue de L'interface neo-lstseed
As you see, in red in the picture above),
There are 3 new buttons
"frz" and "frz2" are to freeze the shapes and "Seed" represents the number of models stored, you can switch between the different models Seed=0=not frozen (the tree changes at each click on Generate),the value of Seed>0=frozen models (Seed=1=display one type of model,Seed=2 display another one and so on.

Before all, be aware that the parameters of these 3 new buttons are not saved in the ".def " files.
In fact we are going to use only the "frz2" and "Seed" buttons.
REMEMBER, THE AIM OF THIS MODIFIED SCRIPT IS TO KEEP THE SAME TREE SHAPE EACH TIME YOU CLICK ON GENERATE.

LET'S GO
First of all, arrange your Working Area like below (it's easier believe me).
Split the working zone in Three parts :
TOP VIEW WINDOW of the leaves/CAMERA VIEW of the tree /SCRIPT WINDOW with Application.py
Vue de la fenêtre de travail

TO START, LET'S TAKE AN EXAMPLE
"The apple tree"

FIRST PART PREPARING THE WORK

1) Check you have the leaves or objects ready to be used by the script, that is to say :
They have the shape you want (be careful do not add too much vertices because a high number of
vertices can create a big mess).
They are uvmapped with a picture you have choosen and prepared with a transparency background.
If not already done you must do it before anything else.
tga

2) Do the shapes changes and the UVMapping of the objects you want to use as leaves, fruits or
whatever you like or decide.
To do so :
In "edit mode", you can rotate the Leaf/object around it's center and move it (but temperately); in
order that when you create the tree, the leaves are correctly placed with regard to the branches.
Be aware that you will have to do several testing by repeating the process (Changing
location + GENERATE) before you can find the right position.

Look at the Screen shots below
UV leaves

Other screen shots of the leaves changes >> an apple for example. ( in my case the "d" object).
UV leaves UV leaves
UV leaves

THE LEAVES/OBJECTS ARE READY NOW


3) Just launch the script , by doing ALT+P in the script window.

- Change the parameters you want, and to create a tree push the button "GENERATE".
(see First Part:L-System)
- Once you have a model you like, enter a name at the end of the path that appears on the top of
the GUI, (for example : "appletree_leaf.def ") and push the "SAVE" button.
- Good.... you have a model of tree now.

END OF THE FIRST PART
-----------------------------------------------------------------------------------------------------------------


SECOND PART PUT INTO PRACTICE


OK, what we want here, is to keep the same shape of branches in order to add some fruits or flowers etc in addition to the leaves.
For this 2 steps are required :

First STEP Doing the tree with it's leaves :
- Load your model and push 1 time on the "GENERATE" button,
  As long as you do not use the "freeze buttons" you can see that,
  each time you push the "GENERATE" button the arrangement of branches changes
  (even there is not a big difference it is too much different for us)
  because we want the fruits and leaves at the right place on the branches.
- So now, Press the "frz2" button (I used Seed 1 in my example but for the moment you
  don't really need it, we will see later on)
- Push 1 time, then a second time the "GENERATE" button.
  At the first click the branches are still changing,
  but the second time, you will have the same shape and keep it further on.
Click the button "Add Leaves" it will appear embedded, then choose the leaf model to use by typing the name of it in the section "leafobj: * " and click on "GENERATE".
A tree will appear in the CAMERA VIEW Window, that has been built with your "def" model and your own leaves.SCREEN SHOT
Do F2 to save the blend file.
Open another specimen of Blender,
Create a new file that you can call something like "tree.blend"
From within this new file just do "SHIFT+F1" (wich is the key combo to import data from other *.blend files).
Load the "trunc Mesh" and "leaves Mesh" you have just created in the first Blender copy.
  Second STEP Doing the tree with it's fruits :
- Back to the first Blender copy the one with neolstseed loaded in it.
- Do nothing else but this :
  Choose another object amoung the models you have, and use it by typing it's name in the
  " leafobj: * " box, in my example the apple is named "d".

  then push "GENERATE" again.
Screen shot fruits
I put the repeat value at 2, because there was too much apples.

Now you must have the fruits on the same shape branches than preceeding
(Be patient, the script will probably take a longer time to generate the fruits)

apples
do F2

Then just return in the "tree.blend" file still opened and import the "fruits Mesh" or "leaves mesh" or whatever the name you gave maybe .

THAT'S ALL FOLKS
apples+Leaves zoom

OK ! sometimes there are some fruits that are not correctly located on the branches
depending on the Leaves style you chooseleaves choice



(Nothing Is Perfect)

leaf choice 1

But as i have just said, you can adjust them :
Before  pushing "GENERATE " as explained Here
And doing the "Adjust then Generate" process as long as they are not correctly placed.
Or after , see below.
If the fruits are still not perfectly placed you can easily move them in edit mode by pushing the "L" selection key with the mouse pointer on the object you want to move.
neo adjust fruits