Flux is a particle simulation playground that I made to learn about compute shaders within DirectX 12.

It provides a small editor for each simulation, allowing you to switch between simulations and interact with each one of them.

Flux currently provides three different particle simulations:

  • N-Body
  • Physarum Polycephalum
  • Particle Life

The entire project is open-source and available on GitHub. It can be found right here: https://github.com/stefanpgd/Flux

The project duration was two weeks and I started April 2024.


N-Body

One of the more traditional particle simulations. Flux presents the simulation running between 50 thousands to 4 million particles running Newton’s Gravitational Equation.

It uses procedural color palettes to give emphasis on particle density.

I also provide a similar, more interactable version where the only point of attraction is the mouse.


Physarum Polycephalum

Based on a paper by Jeff Jones, I recreated a digital version of the real life slime mold called Physarum Polycephalum. Here the simulations runs with over two million agents.

The agents lay down a path that dissolves and diffuses over time. This path gets used by other agents to identity optimal pathing. Creating lifelike organic patterns.

Like the other simulations, settings are available that involve Agent speeds, visibility, turn speed etc.