The starting point for Dark Forest was a beautiful image I came across on the internet by : Tsuneaki Hiramatsu
The image resonated with me because of its beautiful aesthetic but also because the subject matter of fireflies triggers in me an immediate visualisation of their movement and real-worldiness. This started me thinking about how could I bring this to code.
Picture by Tsuneaki Hiramatsu - Firefly 2014
A few months later, on a trip back to Taiwan, I was lucky enough to see real fireflies and witness for myself their hypnotic flocking and flashing behaviour. In one place along a river bank hundreds and thousands of fireflies were flashing, right in front of me. I was rooted to the ground. Silent. Mesmerised by the sight. The quiet and peaceful feeling this scene created became a very strong and special memory and compelled me to try and bring those feelings to my work.
Back in London, I began doing all kinds of coding tests and researched the flashing behaviour of fireflies as much as I could. I settled on the idea of building a flocking system in a forest, then adding the flashing behaviour of the fireflies.
While researching, I came across information on the synchronised flashing behaviour of fireflies known as Entrainment. I fell in love with entrainment right away and started to experiment with spontaneous group flashing behaviour in code.
How things innature tend to sync up
I tried various types of different synchronisation models and decided on one in which each firefly has its own flashing cycle and keeps checking the flashing state of its immediate neighbours. If it senses the flash cycle of its neighbor is ahead, then it will speed up trying to synchronise flashes. On the other hand if the neighbour's cycle is behind, it will slow down to synchronise. I added these two rules to the existing three rules of the flocking system (alignment, orientation and separation) and it generated a very interesting result.
I liked this approach very much. Firstly the flashing synchronises gradually - it doesn't jump into a complete synchrony and observing the cycle of an individual particle speeding up or slowing down is not obvious. After just few seconds the synchronised flashing behaviour starts to appear.
Secondly, when flashing and flocking behaviours are combined, the particles start to drift away and the flashing behaviour starts to spread. This is very similar to real firefly synchrony and something I wasn't expecting to see.
What I love about this approach is that the simple rules of just catching up or slowing down mean that each firefly doesn't need to be aware of the entire group, just its neighbours, and this generates an amazing synchrony and visualisation.
For the next step I started to build a firefly forest environment. I began by creating the terrain and experimenting with different lighting conditions, textures and colour palettes.
And here I got into a conflict with reality. During that night in Taiwan, the whole environment was dark which was perfect for observing the fireflies as their flashing was actually very faint.
In code however, muted flashing looked much less interesting and I struggled between truthfully replicating what I saw that night and keeping the visuals stimulating. After a long consideration, I chose to enhance the visuals as I felt I could more successfully engender the quiet and peaceful feeling in viewers.
Combining desert, forest and a starry sky helps with this as well. It might not reflect reality to have these components as the environment for fireflies but for me they all help to create a quiet and contemplative feeling.
Here is the final render of the project. The whole thing is build in Cinder which I screen captured. The flocking behaviour and flashing synchronisation is done with Framebuffer and shaders, which is the only way I could put enough particles in the system.
While I was building the forest, I was also thinking about different ways to present it and for people to experience it and started a series of projection experiments in my backyard. I wanted to massively increase the scale so that people experienced it as if they were in the forest with the fireflies.
Also I wanted to project on different environments. I've always enjoyed different textures and was curious about how projections on these surfaces would feel. Would it add another layer to the visual or would it just feel like two completely different layers ?
Eventually I tested the projection on the wall, the grass and the leaves, and I love the projection on the grass and leaves. There’s something beauty in it, combining the digital renders with the physical world. And these texture add another different level of randomness in the result.
The projection on the grass leads to another side project. During the experiment I got an idea to build an interactive version for my kids. The idea is simple : the fireflies will gather around your feet. I connect my codes with kinect, using OpenCV with the depth texture to detect the position of where my kid stands. Then calibrate the project and make the fireflies gathering to the point.
The last experiment I made was to project Dark Forest on my chalkboard wall. This was an idea from the start of the project when I was using simple geometric placeholders, cylinders and dots. I was thinking about how to bring some texture to the project and was curious about how it would look if I drew textured trees first and then projected the fireflies onto the trees. The result was interesting - the trees benefitted from an increased feeling of texture because of the chalk and adding fireflies on top did create a whole different feeling.
Dark Forest is a simple idea but I had a great time building and playing the interactive version, especially when I saw my daughter interacting with it. No instructions were given to her other than asking her to step into the projection. She then noticed that fireflies were gathering around her feet. She became very excited about that and spontaneously started to dance with them. This is without question one of the best nights in my life and one of the proudest moments for me as a father.
For me the biggest interest about this project is the combination of digital world and the physical world. I enjoy graphic coding very much, however there's something in the real world just impossible for me to recreate in code. I want to share my feelings with the audiences, I want them to be able to feel what I feel at that night watching fireflies. To make the project bigger by building an installation is the way that I could share that feeling with my audiences. Plus the projection on the physical environment could help building this atmosphere.If I can make the audiences pause a moment in their busy life, just stop and enjoy the quiet and peaceful feeling from this project, then I achieve the goal of this project.