Compute shader explorations

What you will see here on this page is the result of the magical endeavor that I took! All of the visuals on this particular page were created using compute shaders & Unity, based on the compute workshop that I enrolled which was hosted by @arsiliath. Out of respect for the workshop creator and the rules that signed, I won't be able to give in-depth information about it but rather just a process overview and my experiences.

Going forward, I just wanted to share that before this workshop I was extremely terrified of programming, even though I learned to code at university and I can read it, the idea of just writing and I mean writing compute shaders (not C# or C++) just terrified me and excited me at the same time. I doubted myself when I signed up for the workshop, wanted to back out and get a refund before it even started. At the end of it, I can say that I am proud of myself that I conquered my unreasonable doubts and showed myself that I can achieve far more than fear allows me to. Did I complete every assignment? Nope. I did the best I could? Yes. That is all that matters. The other assignments can wait to be conquered!

In the first week of the workshop I learned about cyclic cellular automata (CCA) and as Wikipedia states: 

 

A cyclic cellular automaton is a kind of cellular automaton rule developed by David Griffeath and studied by several other cellular automaton researchers. In this system, each cell remains unchanged until some neighboring cell has a modular value exactly one unit larger than that of the cell itself, at which point it copies its neighbor's value. One-dimensional cyclic cellular automata can be interpreted as systems of interacting particles, while cyclic cellular automata in higher dimensions exhibit complex spiraling behavior.

My explorations of CCA can be found in the above video. Later I added noise textures to the CCA and started to grow CCA patterns in the textures themselves, which gave extraordinary results that you can view below.

The next topic that I explored was moving agents, which is based on Jeff Jones's paper 'Characteristics of Pattern Formation and Evolution in Approximations of Physarum Transport Networks' and Sage Jenson's work. I manipulated the agents with the algorithm which is set to emulate how Physarum polycephalum, a slime mold, would grow. This creates amazing patterns that look like alive sentient beings. If you are interested in learning more about Physarum polycephalum, I do recommend checking out this TedTalk by Heather Barnnet, which honestly blew my mind away! As I've said before in my social media posts, there is something special about learning biological lifeforms and simulating them through code. This particular assignment has inspired be to create interesting noise textures that can be used in other projects, I've put them under CC0 license and you can download them here.

The last assignment that I did was to instance 3D meshes according to CCA patterns (I also added noise textures to the mix). You can see the results below. I think this was the most fun exploration, I took a while to play with different textures, meshes too! You can choose any mesh that you would like to be instantiated, change the width, spacing, play with colors, play with textures... So many options and so many variations. I had to stop myself to actually edit the video as I could play around with it for ages.

Here are also a couple of gifs that I created that did not make it to the final videos. Unfortunately, sometimes when you are exploring and do not take note of the values and what you do, these particular visuals get lost and it can be quite hard to recreate them as so much randomness is involved. Some of them were also out of place and could be their own projects and tell their own story. I am particularly fond of the last two visuals, which were created based on the baltic patterns.

gif1.gif
gif4.gif
gif2.gif
gif5.gif
gif3.gif
gif6.gif

All in all, I am so happy to be a part of this experience and learn about compute shaders. I've learned a lot and took a glimpse into the biological wonders of the world. I showed myself once again that I can accomplish more than I imagine and also got another strong reminder to keep my fears and doubts quiet. 

All of the videos feature music created by my beloved Denis Grigonis (you can check out one of his projects here).

 

Most of the credit goes to Fisch, Gravner, Griffeath '91, Jeff Jones, Sage Jenson for their research and hard work in the field.

If you would also like to learn how to create similar visuals with compute shaders I recommend checking out Arsiliath's workshop.​