The goal of this project is to have a tool to parse and interprete L-System grammar that is easy to use and combine for any usage.
- ✔️ Simple grammar
- ✔️ Stochastic grammar (probability)
- ✔️ Parametrical grammar
- ✔️ Defines variables
- ✖️ Context sensitive grammar
The only system actually available with this L-System tool can generate vegetation following the guidelines written in the paper The Algorithmic Beauty of Plants written by P. Prusinkiewicz, A. Lindenmayer.
The script allows to easily change rules and parameters. You can load or save preset using scriptables objects and save an object generated as a prefab in one click.
- ➕ Include shapes
- ➕ Textures
| Simple bush and flower made with simple grammar | Trees made with parametrical grammar | Growing plant |
|---|---|---|
![]() |
![]() |
plan_grow.mp4 |
From the vegetation generation a data-tree will be made to represent the data. Each node represent a cylinder and hold triangles and vertex informations. It allows to easily find the node of a specific triangle when we hit the vegetation with a raycast. It doesn't "cut" the vegetation but will break at the closest previous intersection in the vegetation. It offers fast and simple way to break vegetation into pieces.
| Before destruction | After destruction | Video of the process |
|---|---|---|
![]() |
![]() |
destruction.mp4 |
public int nbIteration;
public string axiom;
[SerializeField] public Rule[] rules;
public Define[] defines;
public string GenerateSomething()
{
string sentenceGenerated = GrammarInterpretation.ApplyGrammar(rules, defines, axiom, nbIteration);
// ... Do your stuff with the sentence generated
}


