This project explores the implementation of a Lindenmayer System (L-system) engine within Unity using C#, with the goal of generating visually coherent, plant-like structures through formal grammar rewriting. L-systems provide a compact rule-based framework capable of producing complex forms from simple symbolic expressions, making them well-suited for procedural modelling. The engine developed for this project expands user-defined axioms and production rules into increasingly detailed strings, which are then interpreted in real time to construct structures from line-rendered segments and instanced prefabs. A stack-based approach is employed to manage branching behaviour, allowing the system to create intricate multi-level forms that resemble biological growth patterns.  

The system was tested on a range of grammars, from simple fractals to more elaborate botanical models, and consistently produced stable and coherent structures. Performance remained strong at moderate iteration depths, with predictable declines as the exponential nature of L-systems increased object counts. The resulting models are fully interactive Unity objects capable of participating in lighting, physics, and environmental effects, demonstrating the engine’s value for real-time applications. Through this implementation, the work highlights the effectiveness of L-systems as a tool for procedural content generation and showcases the visualization of formal grammars in an interactive environment.

Published 12 days ago
StatusReleased
PlatformsHTML5
AuthorHenryAlbert
Made withUnity

Leave a comment

Log in with itch.io to leave a comment.