About the project
Hello! When I was early in my career I dreamt of being a game developer. It was not my thing. I'm much better at developing useful software and, for example, the tooling around video games. So here we are.
I've always admired procedural generation in games. I find it beautiful. And I've had many ideas for different tools that utilize procedural generation (terrain generation, level generation, music, etc.). But one thing that I found especially interesting was plant generation.
Back in university I did my Bachelor's thesis on procedural generation in games (including plants) and later I did a deeper dive into plant generation on a university course. I studied Lindenmayer systems and found them fascinating.
A Lindenmayer system, or L-system, is a type of formal grammar that consists of some axiom string, like F, and some rewrite rules for different characters like F -> F[+F]F[-F]F. The string is then iterated such that with each iteration a character is replaced with a new string, based on the rewrite rules. The end result is a string that grows in size and usually has repeating structures, like branches on a tree.
If we take a string and assign drawing rules for it, we can use L-systems to draw images, like below:
axiom F rule F -> F[+F]F[-F]F angle 25° n = 0 F n = 1 F[+F]F[-F]F n = 2 F[+F]F[-F]F[+F[+F]F[-F]F]F[+F]F[-F]F[-F[+F]F[-F]F]F[+F]F[-F]F drawing rules F draw a line forward + turn clockwise by the angle - turn counter-clockwise by the angle [ remember the position and heading ] return to them
We can then go on and extend this system to three dimensions and add randomness to it to generate countless different variants of the same "species" using seeds. And voilà, we have a procedural plant generator.
axiom F
rules p = 0.02 F -> F[+F]F[-F]F
p = 0.03 F -> F[+F]F
p = 0.08 F -> FF[-F]F
p = 0.31 F -> F[-F]F[+F]F
p = 0.25 F -> F[+F]F[+F]F
p = 0.31 F -> F[-F]F[-F]F
F, each picked by its probability: three plants at n = 4, from my course paper.I thought it was incredible how such a simple concept can be used to generate shapes that actually resemble plants. They can be used to create photorealistic ones as well, but for now I'll stick with the low-poly style that I think looks very pretty.
My university project turned out fine. It was what you'd expect from a young coder with a limited amount of time. But I knew I could do better.
Then, a lot of time went on. I kept thinking about it but I had work and other projects. And I knew that if I ever wanted to polish it or even publish something, it would require a lot of work.
Fast forward to today: I had free time and energy. And I thought maybe it's time to give this a new shot. Floralin expands on what I experimented with earlier in my thesis and course project, but it's polished and much more versatile. Shapes are drawn more reliably, colours can be utilized better and the end results are professional-looking. It's a fast and versatile system that can create good enough assets for real games. They're low-poly, truly low-poly, with very few vertices per model and extremely simple looks, but I think the end results are very nice.
A small surprise
If you've read this far, then I have a small surprise for you. Here are some freebies for you: free to use, however you like, yours forever. They don't have the live generation runtime but they should give you an idea what these packs can do.