Grid-based Fluid Simulation & Rendering

I was digging through some of my playgrounds when I found this one, and thought I should share it.

It’s a grid based fluid simulation, rendered using some ray casting.

Rendering is done using third order texture filtering on a 40^3 cell levelset, and the simulation is done on the GPU by using custom double-buffers to store each cell’s data and using shaders in place of GPGPU kernels.

Basically just implements Stam’s Stable Fluids paper, but without the diffusion term, with gravity, and with a volume preserving levelset.

Mesh boundaries are actually voxelized on the fly using an orthographic camera, so with a bit of tinkering it would probably work on animated meshes too. The low voxel resolution does produce visual artifacts, but oh well…

Screenshots:


10 Likes

This is AWESOME! cc @PirateJC

That’s super cool!!! well done @Eron_Ristich

It’s so cool and fantastic