Procedural Orange Tree

This is a procedural orange tree generator based on L-systems. I experimented with a variety of different grammar rules to give variety and to mimic the organic shape of orange trees. Users can manipulate the age of the tree, number of iterations, and the number of oranges. The age slider simulates the transition between pink leaves to green leaves with oranges, as seen in nature.

Role
Responsible for all code and .obj files.
Tools
WebGL, Typescript, L-Systems, Autodesk Maya

Demo

Feel free to try out the project here.

GUI and Features

  • Utilised a custom L System Axiom to generate the main trunk, smaller branches, leaves. The axiom also includes rotation of the leaves.
  • Edit the number of iterations of the grammar from a range of 1 to 12. The user can see the tree grow from a little sapling to a full tree.
  • The colour of the tree (from more spring time to a Wisteria colour palette). For both the branch and leaf meshes, I lerped betwen two colour palettes.
  • The maximum angle at which the branches can rotate.
  • I added an FBM sky in the flat shader, coloured with a mixed colour palette. The 'clouds' move along the x and y axis very gradually.