2D L-System Tree Generator
Procedural Tree Generation Tool
- This project is a lightweight 2D L-system tree generator built in Unity using C#, designed to make procedural generation more accessible through direct interaction.
- Users can control key parameters such as iteration depth, branch angle, and step length to shape the overall structure of the tree. Real-time adjustments allow for quick experimentation, making the underlying logic of L-systems easier to understand.
- Additional foliage elements are introduced to enhance visual richness, bridging the gap between abstract rules and natural-looking forms.
- Rather than focusing on complexity, the tool emphasizes clarity and usability—serving as both a practical generator and an exploratory interface for learning procedural systems.
Features
L-System-Based
Procedural Generation
Parameter Control
Interactive Interface
Made With
Unity
C#
MY Role
Team
Solo Developer
Project Overview
Features
UI Interaction and Custom Parameter Adjustment
Config Presets
In addition to custom adjustments, I implemented Config Presets, allowing users to directly load predefined parameter sets through a Unity Dropdown menu. Users can easily add new presets by defining additional fields in the Unity Inspector panel.
Foliage Visualization
To enhance the visual output of the tree, foliage can be displayed on the L-system model. Users can enable or disable foliage by toggling the Foliage toggle. In the future, the diversity of foliage can be increased by replacing the LeafPrefab, allowing for different colors and types of leaves.
Result
(1) Rotation Angle
Adjusting the rotation angle produces distinct branching spreads: smaller values lead to narrow, compact forms, while larger angles create open canopy-like structures.
(2) Step Length
Step length controls forward movement and indirectly affects perceived branch density (with camera auto-fit). Shorter steps generate compact shapes; longer steps produce taller, sparser trees.
(3) Foliage Toggle
Foliage can be added to terminal segments. When enabled, leaf prefabs are placed and oriented automatically, enhancing visual richness without altering the underlying structure.
Discussion
- Through the implementation, I developed a clearer understanding of how symbolic rewriting translates into geometric structures.
- Several limitations remain. Attempts to extend the system into true 3D space were not fully successful due to challenges in debugging orientation logic. The current system also does not support stochastic or context-sensitive rules, and visual customization options are limited, resulting in more geometric than natural-looking outputs.
- Despite these constraints, the project provides a solid foundation for further exploration, with clear directions for future development in 3D generation, rule complexity, and visual fidelity.