L-sys structure generator:


This is a Maya script that generates visualizations based on user-defined L-system patterns. It was programmed using MEL [Maya Embedded Language].


Download Script Here | Source code



Installation instructions:


1- copy lsysgen.mel to: ...\My Documents\maya\scripts\
2- copy shelf_Lsys.mel to: ...\My Documents\maya\8.5<or any other version>\prefs\shelves
3- copy lsysgen.xpm to: ...\Program files\Alias\Maya\8.5.0\icons\


Usage instructions:


Step 1: L-sys generation:

[note: you can start with step 2 before step 1]

- enter any letter combination as the initial word 
eg. ab

- enter a set of rules. 
eg. a -> aba, b -> ba 
//result a b -> aba ba

- set the depth [how many times the rules will be applied] 
eg. depth = 2 
level0 = ab [the initial word]
level1 = aba ba [after applying the rules once]
level2 = ababaababaaba [after applying the rules once more]

- set the length limit of the final outcome.
keep it relatively low until you are satisfied with the results and want to produce bigger visualizations.


Step 2: Modeling:

- model objects to be used to visualize the Lsys 
- keep in mind that the objects will be rotated around the point (0,0) so if you want to offset the rotation to form a sort of tube, move the objects you model away from the center.
- you can use more than one object as 1 character of the L-sys
- you can use animations which will be instanced properly.


Step 3: defining objects:

- select one or more object.
- enter one character under name.

if more than one character was entered, only the first one will be used and the rest will be ignored
you cant assign the same name more than once.

if you have a node in your scene with the same name that you are trying to assign that was NOT assigned by the script it will be renamed automatically to the same name twice .

eg. if you had an object called "a" before running the script, then after running the script you tried to define another object as "a", it'll rename the old object to "aa" and define your selected object(s) properly


- you don't have to define an object for every character you have in the Lsys, the script will leave a space and skip undefined characters.


Step 4: Visualization:

- set the vertical spacing and rotation angle.
- press visualize to see how it looks.
- change the visualization settings and press visualize to update.







Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player