Fluids through Marching Cube

Lots of metaballs can be heavy for a CPU process. I absolutely wanted to implement a compute shader approach of it … to see what are the possibilities in Unity to get a real-time fluid effect.


The result is not bad, still heavy with a high definition lattice but it can be managed in a small area with a good FPS (120-150 here).

Physics is fully processed on GPU with my early build of Katana Particle System.

Isosurface and Marching Cube algorithms are not an easy subject but I found interesting articles and I ported some C++ sources (DirectX10) from Nvidia to Unity (DirectX11). Here are some links:


CPU approach

GPU Gems

QFluids through Marching Cube


Join the conversation
  • Avatar

    Krokozor - December 10, 2014 reply

    Whow it’s a magic

  • Avatar

    Theo Muller - March 17, 2015 reply

    Truly beautiful!

  • Avatar

    admirer - February 29, 2016 reply

    Fantastic! Please consider sharing this, by selling it or putting it on the asset store?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.