Skip to content
blendshelf
Geometry Nodes
L-Systems - Trees, Plants and Fractals generation v2 (Blender Geometry-Nodes)
Geometry Nodes

L-Systems - Trees, Plants and Fractals generation v2 (Blender Geometry-Nodes)

by Alex Martinelli

Geometry Nodes setup for Blender 5.2 by Alex Martinelli.

5.0· 23 Gumroad ratings

Free / pay what you want

Get it on Gumroad

Sold by Alex Martinelli. Check current pricing, license and Blender compatibility on Gumroad before purchasing.

Type
Geometry Nodes setup
Blender version
5.2
Last checked
14 Nov 2026

From the creator’s description

A Blender file with Geometry-Nodes (GN) modifiers to generate and experiment with L-systems. Requires Blender >=5.2. Have questions or want to share your results? Reach out on Twitter/X or Threads. L-systems allow generation of complex shapes via iterations over a user-provided grammar. Results have often fractal like composition, and can resemble trees, snowflakes or other organic branching structures. Check the wiki page for an introduction to L-systems, or the Houdini entry. Summary of the setup In the Blender file you can find a lsystem object with three modifiers slots: LSystem for the base algorithm and structure generation, Hair/Cloth Sim for extra simulations like wind and Render for rendering the results. You can start playing with these and get results right away! Notice that some of the functionalities here described are available in the premium version only, as highlighted in the dedicated section below. LSystem Main is the node-tree that exposes all controls for the L-System generation. It provides different groups with presets and the main parameters that drive the final structure (returned as an edge-only mesh). These presets are examples of popular rules which you can play around without any prior knowledge, just edit the modifier parameters to adjust results as you find fit. In the "Group Type" you can then also find the "Custom" entry, which allows to write your own custom rules. Just provide the axiom and the rules, for example "X=F++//F". For rules, the system supports a single character input, followed by the equal sign and then an arbitrary number of characters (aka the replacement string). Valid letters for rules are ABFGXY. Any other letter will be ignored. "Iterations" defines how many times to apply the grammar rules and the "Max Str Length" specifies the maximum length of the resulting string that will be drawn. Be careful with these values, as a string can get quite long depending on the grammar, resulting in Blender slowing down or even fully crash. Test with small values first and increase gradually. The "lystem_renderer" is what takes care of transforming the generated string to a mesh. It follows the "turtle" graphics routine. The following is the set of operations allowed in this setup, with the corresponding "turtle" effect. F: move forward (drawing a line) + or -: turn right or left by angle[1] (where angle is the "Angle Add" vector input for the modifier) & or ^: pitch down or up by angle[0] \ or /: roll clockwise or counterclockwise by angle[2] ~: turn/pitch/roll by a random amount " or _: multiply or divide current length by "Step Size Scale" [ or ]: start or end a branch Extra content for Premium version The basic version provides only the LSystem Main to generate the initial edge-only mesh. The premium version then includes an extensive preset of L-System rules, a wind simulation node-tree, a "Mesh To Tree" modifier with multiple sample materials plus the experimental "Forest" setup. Premium preset include 6 2D plants, 6 3D plants, 12 fractals and some additional stochastic presets. Hair/Cloth Sim The premium version includes an extra modifier to apply a hair-like simulation. In particular the Wind Sim node-tree simulates wind forces affecting the previously generated mesh, using multiple attributes to mimic the behavior of a tree or plant. User can control wind strength and scale as well as "pinning" aspects, meaning which points are affected by the wind and in what measure. As the animation triggers the L-System logic at every frame, it is advised to bake the output of the first modifier when satisfied with the initial structure, and only then run and experiment with the wind sim. Render The Mesh To Tree node-tree takes the results from the main modifier and transform it into a tree-like object, with profiled trunk and branches. It also allows to add leaves and flowers based on parameters of the initial system. It gives full control to the user and allows customization of different parameters like branch radius, leaves and flowers distribution. It also includes multiple sample materials for leaves, flowers and bark. Forest This is an experimental extra object present in the scene with a LSystem Distribute node-tree that allows to distribute different variations of a L-System tree on a plane. The idea is to first generate a set of unique "trees" (controlled via "Num Unique Tree" param) and then randomly instance them. The higher the number of unique trees, the more variation, but also the longer it will take to run the first generation. Randomization is handled inside the node, covering different parameters both for basic generation and rendering, while leveraging the stochastic L-Systems rules. Technical Considerations Rewriting Operation The rewriting operation parallelly applies the L-System grammar rules starting from the given axiom, for the given number of iterations. In geometry-nodes, single rule systems can be implemented via the "Replace String" node, but for more complex systems, using the replace will return incorrect results, as we don't have a way to apply all rules simultaneously. Instead, we slice the string and iterate on each character, applying the corresponding rule when appropriate. Branching We handle branching (i.e. "[" and "]") by simulating a LIFO stack where we keep track of all the points that needs to be processed. For example we use this stack to decide which point needs to be extruded if the current symbol is "F", and we pop it, for then pushing the new point on the stack. Similarly, when "[" is encountered, we append again the current point such that it can be processed later on when the current branch i closed ("]").  We currently implemented this by working directly on geometry (points), separating and joining as needed. Maybe it could be implemented in a more performant way via lists. Changelog v2 multiple performance improvements. Using lists for rewrite run for 6x speed up. use of bundles for rules. Easy to setup and versatile, for example creating one for custom rules too. use nested menus to have single modifier (i.e. first select group type, then preset). replace custom nodes via new official ones (e.g. "Curve to Tube"). add option of limit length during rule rewrite too. cleaner stack update by re-using same nodes, also use single separate geometry in "Pop Point". better stochastic setup, with more experiments on generating rules and also distribution of plants on areas with randomness. add dedicated wind modifier using "Cloth Dynamics".

More geometry nodes