Skip to content

rossborchers/ProceduralTrees

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Procedural Trees

LSystem demonstration for Unity. Based on the book The Algorithmic Beauty of Plants

Looping L-system

The above example has a fully deterministic "random" loop.

Reproducing results in the book

Accurately reproduces patterns shown in the book.

Seed

A naive implementation using text. Quite slow but easy to understand. It allows you to map characters to arbitrary behavior by extending LSystem.Module It's pretty extensible but has some performance issues.

Seed

There is also a procedural growing leaf script that generates a mesh on the fly and connects to the LSystem.

Notes

  • This was a demonstration made for a job interview, It can be slow. Depending on your use case I would be wary to use this in production without some optimization There are some tricks already being used to improve performance such as pre-baking but unfortunately, it's still not necessarily realtime depending on your computer.
  • The parameters have been modified a bit since these gifs were taken but the underlying algorithm works the same.

Releases

No releases published

Packages

No packages published

Languages