Snowflow is An interactive ART piece that simulates snow falling made with p5. I made this particular project during Christmas season so I wanted to make something in relation to Christmas and winter. I knew I wanted to implement snow into my project as the main piece but I had to figure out in what ways I wanted the user to interact with it. Since I was driven by the Christmas theme, I decided to make the interaction based on a snow globe. I decided to make it so when the user moves the mouse, this movement pushes the snowflakes on the screen. I really wanted the player to be mesmerized by the movement of the snow falling as well as to interact with each snowflake in a way that feels magical. I made sure to adjust the movement of the snowflakes to move in a way that makes the user feel calm and the music adds to the enchanting atmosphere. Lastly, each time the user moves a snowflake, it triggers a sound effect to aid in the user feedback.
I made various versions of this project because even though I was starting to become more comfortable with p5, I still had to learn about many features in order to achieve the movement and interaction I envisioned
In this version of the code, I was experimenting with the snow fall movement and I was very satisfied with this movement so I moved to the next version of the code to create the snowglobe shaking effect
To create the snow fall effect I used arrays to store the data of variables I would need to refer to later such as the number of snowflakes (which are the circles) and the objects I would call to in the setup function. I used Perlin noise to give the snowflakes an organic movement when falling and I also used nested for loops to create a grid of snowflakes falling so the circles could be spaced out in a random way.
Next, I experimented with the user interaction in this version of the code. I made it so when the player holds the left mouse button, the snowflakes change color (Christmas inspired colors) and stay suspended in the air while still moving horizontally. I loved the effect of the snowflakes being suspended in the air because it gave a feeling of time stopping. Although I was satisfied with this, I wasn't able to move the snowflakes the way I wanted-the whole snowflake object would move when the mouse was moved. So my next goal was to make the each individual snowflake move based on which one was closest to the mouse.
Finally came the final version of my project. It was very challenging to achieve the push effect that users create when moving the mouse around the snowflakes but the end result was very worth it. I also added a filter to the background music using logic and made it so when the left mouse button was held down, the music would go from a normal sound to a filtered sound which created a dreamy effect.
I was very proud of what I was able to achieve using snowflakes and the winter as the driving theme for my project. I was also very glad i was able to execute my ideas in a way that even went beyond my expectations especially since I was a beginner coding with p5. With the combination of the visuals, sound and music, I was able to create the calming yet enchanting atmosphere of the concept I had in mind. Here is the link to the p5 project: https://editor.p5js.org/Lunafina/sketches/jqqTXB-Tn
Image used from Adobe Stock and sounds from freesound.org