Spring will be back again
written by danieljulia.tez
First sketches
After my previous project, the swedish forest, which was really demanding, I wanted to relax a bit and so I began to play with other kind of drawings.
project name project name project name
When I say the swedish forest was very demanding I mean that, not only technically, the requirement I self-imposed of reproducing the plants and the ecosystem of the forest as faithful as possible, although it may not seem like that first glance, required a lot of work. The plant forms and distributions, etc, needed a lot of testing.
So I thought I wanted to free myself from this demand and create something wild, related to nature, but totally made up.
I was first seduced by the watercolor techniques and made some tests, and I felt the oriental aesthetic was the way.
So I began to trying to paint some flowers
And then also bamboo plants which are also a Japanese tradition
In order to paint the previous sketches I came with the idea of creating an extrusion algorithm to draw the forms (canes, leaves, etc). I'll explain a bit later on this.
And in a certain moment I tried to draw something similar to the traditional japanese cherry blossom illustrations, finally deciding to go in this way.
What does it has in common with the Swedish forest project?
Actually I haven't reused almost anything of my previous project. The reason is that technically is very different. In the forest I was first drawing in svg, then transforming to bitmaps on several canvas. In this project I draw directly on the canvas. So the code base is 90% new, and also very handmade, not using any pre-made images, or data. Is all coded from scratch.
I also didn’t want to restrict the creation to something that would look as drawn by hand, but to play as well with gradients and textures, thing that I voluntarily wanted not to do in the swedish forest.
It has in common that I'm drawing the nature, but here is a totally made up version of nature. It's based on the blossom painting traditions but I have made up totally the forms in the flowers, the leaves, and the trees itself. The trees and flowers are are absolutely made up. So it's different. I didn't want to copy or create a "sakura blossoming painting generator". I wanted every token to be unique and special.
References
As you know the blooming tree illustrations are well known to everybody and not only in some asian countries. In Japan is an old tradition to paint cherry blossoms (Sakura) and other blossoming trees. There have been a lot of artists through the history who have painted this motif, among others Katsushika Hokusai, the also author of the famous "The Great Wave off Kanagawa", also Hiroshi Yoshida and many very well known japanese artists.
And the western artists at the same way have been influenced by Japanese art and culture, and incorporated cherry blossom into their own works like Vincent Van Gogh, and many others.
The working process
Similar to my previous project I've been working on this one for a quite long time. Investing time everyday to improve details. Thinking and implementing my ideas on a recursive way. Unwittingly following the also japanese Kaizen 改善 methodology. A continuous improvement every day. And creating thousands of iterations, capturing thousands of snapshots. And asking everyday what could be better in the next iteration. Sometimes feeling I was going backwards, sometimes just staring at the beauty that emerged and refreshing the screen forever.
Until I found most of the outputs looked really good, for me.
Animation and evolving, infinite variations in the same token
An important issue that I wanted to take into account is that I wanted to make visible the animation, the growing of the tree and the flowers themselves. In my previous project, I couldn't do that for technical reasons, but here I found this was a key aspect.
And something cool happened that was not predicted. When I was trying to create the animation I tested it with javascript promises in order to create an artificial delay that would make visible the evolution, promises are a form to deal with asynchronous operations. To my surprise I realized that using promises combined with the fxhash function and the recursive functions to draw the trees, alltogheter, ended with different variations on the same token with the same hash!!. This is because a timeout in a computer is not deterministic, sometimes a branch would draw before another and so the next random numbers will be different, thus creating different versions of the tree with the same hash.
So what appeared for me at the beginning as a bug became an essential value of this project.
Each token keeps of course all the features each time is run, but the form is always changing. The leaves will look always the same, as do the flowers, and all the rest of the multiple features, but the tree and the branches form is always different, and the number of flowers that bloom each time.
Layout
The token layout (the final drawing aspect ratio) could have been a feature, but following the previous idea of variability inside the same token is changeable as a keyboard command.
It is by default horizontal (landscape) on desktop, and vertical (portrait) in mobile devices. It may also change some details in the trees and the blooming itself. It can be fixed as a parameter as well.
Extrusion
In order to draw the leaves, the trunks in the tree, the petals in the flowers and most of the things I ended using a technique called extrusion. That means that, for instance, to draw a leaf first I draw a line and then I combine it with a “profile”, a function which gives the width in each point of this line to extrude it and having at the end an area, a polygon that can be drawn normally.
Then I can do a lot of variations in the profiles to create different forms in an easy way.
The extrusion technique i used to generate the flowers and leaves.
This a thing that makes each token different, as the profile to do the extrusion is randomized with the fxhash.
Features
In this project I've created a lot (24) of features so they can provide a lot of variations.
The features are the following
Colorpolarity: Whether the lightest or darkest color has been chosen for the background.
Palette. +100 different color palettes. The main colors related to the background, the trunks and the flowers.
Color Mode: Normal, PseudoMonochrome, Monochrome. The PseudoMonochrome draw almost everything in the same color except some parts of the flowers.
Sun Mode: Full, Stroke. The full mode sun is painted always in the same position unlike the stroked version.
HasLeaves: If the trees have leaves or not
LeaveMode: The form of the leaf
FlowerMode: There are 8 flower modes, and for each one the characteristics may also change
FlowerSize: Big, Normal, Small
TreeBent: Twist amount in the trunk
Trunk: Smooth or rough
TrunkWidth: The initial width in the trunk
TrunkNumber: The number of initial trunks
TrunkType: Refering to the fill. Smooth, Crust or striped.
Trunkslimming: The amount of slimming in the trunks and branches as they grow
TrunkStopping: The chance that the trunk may be abruptaly ended or cut
Dir1Polarity: The branches tend to go to a certain direction parallel to the canvas
Dir2Polarity: The branches tend to go to a certain direction orthogonal to the canvas
FlowerProb: Probability of flowering
SubTrunkProb: Probability of trunk division
BranchProb: Probability of branch creation
BranchCurling: Curling in the final branches
SpikeProb: Probability of having spikes on the branches
StrokeImperfection: Stroke imperfection in the drawing into the leaves
LeafProb: Probability of having leaves on the branches
There are also a lot of "internal" features, so two tokens with the exact same features are never going to be the same, mostly given the leaves and flowers variations which are coded inside.
Conclusions
I have enjoyed a lot working in this project. And I'm very happy it has arrived to an end which I am proud of. This thing that started just tweaking with some drawing experiments in oriental style ended after a lot of iterations in something beautiful I could stare forever in all its variations.
From this point of view this project could be seen as a hanami experience (the tradition of viewing the cherry blossoms). Just looking at the beauty of the flowers that blossom, and the different forms that the trees and branches play to accommodate in the canvas space.
Surely spring will come again, at least in your screen for a time.