Fluid Simulation (Demo) 2025

I wanted to see what happens when a fluid simulation collides with real objects. To test this idea I created this demo.

To capture the shapes of objects, I mounted a webcam above the screen. A polarization filter blocks the image displayed on the screen, preventing a feedback loop, while still allowing the camera to see anything placed in front of it. The video feed is then aligned with the computer-generated simulation, so the fluid can react to those cutout objects.

Interestingly, because of this setup, hands are also recognized as obstacles. At first, I considered this a side effect of the technique, but in practice it doesn't bother and is actually kind of fun.

The simulation itself is based on a wind-tunnel style fluid model. There are many approaches to this type of algorithm, but I found the explanations and demos by Tidepodious especially helpful.