Realtime fluid simulation for embedded microcontrollers driving LEDs.
Running Navier–Stokes on hardware that has absolutely no business doing this.
FastFluid turns LED installations into living dynamic systems instead of playback devices.
Designed for:
- 2D LED matrices
- art installations
- Burning Man projects
- realtime procedural LED visuals
- generative LED animations
- future integration into FastLED
FastFluid is an experimental realtime fluid simulation engine for microcontrollers like the ESP32 and Teensy-class hardware, built specifically for LED rendering.
This is not a pre-rendered animation.
This is not noise pretending to be fluid.
This is not a cellular automaton fake-fire effect.
Every frame is generated from a live evolving velocity-field simulation running in realtime on the microcontroller itself.
The simulation includes:
- advection
- diffusion
- pressure solving
- buoyancy
- vorticity confinement
- obstacle interaction
- realtime force injection
The goal is simple:
Make physically-inspired realtime visuals accessible on hardware that has no business running them.
Modern GPUs normalized realtime procedural graphics.
ShaderToy, Winamp MilkDrop, realtime smoke sims, procedural fire, generative visuals — all of that became standard on desktop hardware.
Microcontrollers never really got that evolution.
Most LED effects are still based on:
- palettes
- noise fields
- cellular automata
- repetitive animations
- fake fire
FastFluid tries to bring actual realtime fluid dynamics into embedded LED art.
Not scientifically accurate CFD.
Not a physics benchmark.
Just enough physics to create visuals that feel deeply alive.
FastFluid is interesting not because it simulates fluids “accurately”.
It is interesting because systems based on differential equations like Navier–Stokes naturally produce emergent behavior.
Tiny local interactions accumulate into larger evolving structures:
- vortices
- turbulence
- flowing motion
- self-organizing patterns
- chaotic but coherent dynamics
The simulation constantly rides the edge between order and chaos.
That is where much of the visual beauty comes from.
You are not animating pixels directly.
You are shaping a dynamic system and watching complex motion emerge from simple mathematical rules in realtime.
That is the real magic behind FastFluid.
Fluid simulation is computationally expensive.
Microcontrollers have:
- tiny caches
- limited RAM
- low memory bandwidth
- no desktop-class GPU
- tight realtime timing constraints for LED output
FastFluid exists because the simulation model is aggressively simplified, optimized, and artistically tuned specifically for embedded hardware.
The challenge is not scientific accuracy.
The challenge is achieving visually convincing emergent motion within extremely constrained hardware budgets.
- ESP32-S3
- ESP32-P4
- Teensy 4.x
Rendering through:
- FastLED
- WS2812 / NeoPixel
- APA102
- LED matrices
- HUB75 panels
- LED strips
- basically anything FastLED can drive
Current performance:
- ~30 FPS @ 64×48 = 3072 WS2812 LEDs on an ESP32-P4
Optimization work is ongoing:
- SIMD
- cache-aware layouts
- reduced memory bandwidth
- optional fixed-point paths for slower MCUs
- Realtime Navier–Stokes-inspired simulation
- Smoke simulation
- Stylized fluid rendering
- Generic velocity fields
- Interactive force injection
- Artistic rather than scientific tuning
- Designed for low-memory embedded systems
- Portable architecture
- Future FastLED integration planned
FastFluid is not trying to compete with desktop CFD solvers.
The target is:
- visually convincing motion
- emergent behavior
- realtime interaction
- low-latency LED rendering
- procedural visuals for physical spaces
This project lives somewhere between:
- decorative LED effects
- demo-scene coding
- generative art
- realtime simulation
- LED installation culture
FastFluid can currently run on two different ESP32 platforms from a single shared codebase:
| Target | Board | LED Driver | BLE | Build |
|---|---|---|---|---|
| ESP32-S3 | Seeed XIAO ESP32S3 | RMT | On-chip | VSCode PlatformIO |
| ESP32-P4 | ESP32-P4-WIFI6 (Waveshare) | PARLIO | ESP32-C6 via ESP-Hosted VHCI over SDIO | CLI |
#if __has_include("hosted_ble_bridge.h")→ ESP-Hosted BLE init (P4 only)#if defined(CONFIG_IDF_TARGET_ESP32S3)→ S3-specific serial configsrc/board_config.h→ pin assignments, matrix dimensions, LED driver selection
| File | Purpose |
|---|---|
platformio.ini | ESP32-S3 configuration |
platformio_p4.ini | ESP32-P4 configuration |
sdkconfig.defaults | ESP-IDF settings |
src/boardConfig.h | Hardware abstraction layer |
src/bleControl.h | NimBLE transport and callbacks |
src/hosted_ble_bridge.cpp/.h | P4-specific BLE initialization |
Use the standard PlatformIO build/upload buttons inside VSCode.
$env:PLATFORMIO_PROJECT_CONF="platformio_p4.ini" C:/Users/Jeff/.platformio/penv/Scripts/pio.exe run -c platformio_p4.ini -t upload
FastFluid is a collaboration between:
- model design
- artistic direction
- Python prototyping
- distilling fluid simulation models down to the absolute minimum needed for convincing realtime visuals on embedded hardware
- C++ implementation
- optimization
- embedded architecture
- making the whole thing actually run on microcontrollers
Our numeric solver model is heavily inspired by Jos Stam’s paper:
The simulation model is typically explored and tuned first in Python, then ported and heavily optimized for realtime embedded execution.
(put GIF/video here)
(put GIF/video here)
(put GIF/video here)