r/VoxelGameDev • u/bonzajplc • 10h ago
Media New water system for our voxel sandbox game
Correct me if I'm wrong since I'm getting a bit rusty, but I think I got quite a novel technique for rendering a lot of flowing 3D water. I'm raymarching precomputed SDFs of marching cubes for water cells that have 2 bit states. The total size of the SDFCubes is 16kb so they fit extremely well in local gpu cache.
Now for the features!
The water flows linearily - it is not physical, it's a cellular automata approach. Rigid bodies get buoyancy from it.
It can freeze under low temperature, but only in open spaces. In caves it remains fluid. You can melt it with explosions but also the ice melts with rain.
Most importantly, you can have see of that water with boats and underwater gameplay for a fraction of cost of physical fluid solver.