I am currently working on generating trees from a seed.
We have a seed where branches (and leaves) can be generated from. Here is the first draft with some branch size tests:
And after a few values modifications I were able to finally come to a good tree feeling:
Each generated tree is different. In the future I plan to have an evolution system: the idea is to have some new type of plants/trees that grow in totally unplanned ways in different exoplanets.
So to prepare for this future development I started implementing a DNA system. For the moment I only have a script who transpose the tree result to a DNA system where I use characters and letters. For the moment the DNA ressemble something like this : D6/H2/A30/R0.7/T0.8/Y0.7/Z0.3/-L-2L2-23L-4L-5L4-15L-2L3-12L-4L2-10L2-2L-L3-3L2-15L2-2L-27L-6L2-3L2-3L3-2L3-7L-26L4-4L-4L-5L4-3L2-7
I also have a script who can read this DNA sequence and create the exact same tree.
In the future I will need to add a mutation system and also make the tree grow following through this sequence but not totally following it and giving it a score. This score will take into account multiple parameters: its strength, size, sunlight, minerals, defense against predators etc… in order to implement a natural selection system.
Next step I worked on was being able to see the wind through these runtime generated trees. Instead of using rigidbody and the Unity wind system I created a small script which takes winds data into account at the base of the tree. And here is the result:
I will need to create my own wind system at the end so the trees are more syncrhonized and we can have changes in wind values overtime. But for a start it feels pretty good!
I will also need to improve a bit the orientation of the leaves because they currently only face top.