Рет қаралды 104,909
Follow me on Twitter for more updates: / programmerlin
It took a bit longer than expected, but the fluid simulation design from a few months ago has been implemented in our voxel project. It uses the same cell/particle hybrid method and is therefore fully volumetric with no height range limit beyond the 0-4095 y world boundary! It will flow through buildings, fall down into caves, flow over and under cliffs, fill up containers and lakebeds, and navigate through tunnels. The design has been adapted to run sparsely and inline with the world generation. The entire pipeline has also had its design improved to be 99% multithreaded, with a 1% critical section that has the smallest execution time. In this video, 4 CPU threads were used and the simulation time never exceeded 8ms.
Saving to/loading from disk, generating it naturally, spawning and controlling it, and not pouring into unloaded areas are implemented. Currently it only interacts with terrain and buildings as seen in the video, but player and object interactions will come soon. Some improvements to be made include the sound calculations, rendering and supplemental particles.
The video used faucets for the waterfalls that will run indefinitely (and eventually fill up the whole world), because there's no evaporative water cycle. With water being finite, waterfalls spawning from a body of water will eventually run out. I still don't have a good idea to solve this, but I'm definitely open to any ideas.
As always, thanks for all your support and patience! ☀️❤️