Fluid Simulation & Music Visualization

Trinity Chung, Anna Dymchenko, Oliver Ni, Tiffany Sun

https://cal-cs184-student.github.io/hw-webpages-sp24-oliver-ni/proj/

Problem Description

In this project, we attempt to implement a fluid simulation that can be used as a music visualizer, where attributes such as the viscosity and flow speed of the fluid are controlled by the amplitude and frequency of the music.

Goals and Deliverables

Our primary goal is to be able to create a fluid simulation program that is capable of modeling a range of fluids based on different properties. In order to demonstrate the features of our fluid simulator, we decided that we could incorporate the simulator to create a music visualizer, where we vary properties of the fluid based on the music. This varying music would enable us to showcase how the simulation behaves under a broad set of situations.

Fluid wire grid example from Experiments with Google

In addition to music visualization, we could also showcase the simulator in other ways, such as creating a variant of the classic game Pong where the movement of the ball is subject to fluids around it, rather than traveling in a straight line, similar to the following implementation:

Plasma Pong

Based on our preliminary research, we believe our goals are attainable within the timespan of the project. Additionally, the behavior of fluids and cloth have many common characteristics, so we can potentially base our project based on our prior work on cloth simulation in Homework 4. Our target metric for this stage would be smooth (e.g. 60 fps+), natural-seeming simulation locally.

Ultimately, our ideal goal would be to create a website where users can interact with the fluid simulator as it is being rendered live, either/both by uploading an audio file and simulating the fluid reacting on beat with the music, or by playing Pong. Our target metric for this stage of the project would be to be able to render this live in-browser and have the simulation run smoothly enough for a fun user experience (e.g. 30 fps+).

Schedule

Week 1 (4/2 ~ 4/7)

Study available methods of fluid simulation and find a suitable language and platform for implementation.

Week 2 (4/8 ~ 4/15)

Implement basic fluid simulation, e.g. be able to have reasonably smooth looking fluid motion from a number of different starting particle positions.

Milestone Due (4/16)

Week 3 (4/17 ~ 4/22)

Implement shaders and start working on interactability, e.g. parsing amplitude, frequency, and other interesting attributes from the audio file and controlling aspects of the simulation based on them.

Week 4 (4/23 ~ 4/29)

Finish integrating fluid simulation into a final demo, ideally an interactive website.

Final Deliverable Due (4/30)

Final Presentation (5/2 ~ 5/3)

Resources

Visually, we take inspiration from Experiments with Google’s fluid simulations, as well as existing ferrofluid speakers (and attempts to simulate ferrofluid.) To implement fluid simulations, we plan to reference the SIGGRAPH 2007 fluid simulation course notes, building upon the general framework of Homework 4 to use as our particle system.