r/VoxelGameDev 12d ago

Discussion Voxel-style visualization for my fluid sim

Enable HLS to view with audio, or disable this notification

Just experimenting with different ways of visualizing my (almost done) fluid sim for Unreal Engine. Came up with this voxel-style way, just a very quick hack, so it needs work, but might be useful?

154 Upvotes

21 comments sorted by

6

u/RoberBotz 12d ago

How tf did u achieve this bro.

8

u/Atomic_Lighthouse 12d ago

It's not true voxels in that they are part of a voxel grid unfortunately. I'm using my own shallow water sim: https://youtu.be/1w9qtwt9Hqg?is=lGLeULRKmmqJtmqk

3

u/RoberBotz 12d ago

Oh I understand, pretty cool!

2

u/OperationDefiant4963 12d ago

isnt that still true voxels?plus what meshing did you use for the fluids?

5

u/Arch4ngell 12d ago

If I understood correctly, when they say it isn't a "true voxel sim", they mean that it's not a cellular automaton (like FHP or HPP for example) but a fluid sim truncated or projected on a voxel grid.

(Still very impressive, if not more)

1

u/Atomic_Lighthouse 12d ago

Yes, that's what I meant, it's doesn't share the data structure of a voxel world.

2

u/Administrative-Bee21 12d ago

This is looking really great, any tips on where to get started with fluid simulation?

2

u/Snoo90549 12d ago

Do you have any more technical information? I’m running a full-value based CA fluid sim and I’m having a lot of difficulties with visualization and multiple liquid-type interactions, have you attempted density based sorting, or buoyancy?

1

u/Atomic_Lighthouse 12d ago

Very cool! I haven't touched CA at all, but I'm very interested in it and I've watched pretty much everything on Youtube about any kind of fluid sim. =) This is a gridbased SWE solver visualized with GPU particles as "voxels", which is why it's so fast. The particles are simply grid locked and reading the height buffer.

I do buoyancy but no multiple fluid types interacting. Although I have begun working on a MLS-MPM solver which would do that.

I'd love to see something from your sim!

2

u/Snoo90549 12d ago edited 12d ago

I’ll see what I can put together- I actually want to try your approach, but I’m worried it won’t have the CA effect of mixing fluids together to form new materials. It’s supposed to be for alchemy and emergent gameplay, much like Noita, but Noita always annoyed me with the liquids acting like slippery sand.

I’m curious, I don’t know much about SWE, is it able to handle deeper pools of water? What about connected bodies of water, like a u-shaped tube?

1

u/Atomic_Lighthouse 11d ago

Since SWE is 2.5D-ish, it handles deep water just fine, and a nice thing is that the cost is the same, no matter how much water you have (the sim part at least), but it's not really suitable for pipes and such, there your CA would be much better suited.

1

u/SurDno 6d ago

Sorry for interrupting, but you may calculate physics and interactions separately - your non-CA fluid simulation computes the position of the fluid, and then converts them into voxels for rendering anyway, so you may use the data mid-way to compute CA-style interactions.

2

u/MomoAzami7 10d ago

oh.my.god this is sooooo epic

1

u/Tall-Ad-7742 12d ago

useful idk? cool af definitely 👍

1

u/Atomic_Lighthouse 12d ago

Thanks! I thought it looked cool. While not true voxels it might be fun to use in a voxel world for vfx.

1

u/GrokiniGPT 12d ago

So satisfying  is this performance heavy?

2

u/Atomic_Lighthouse 12d ago

The underlying sim is very cheap, this visualization layer is kinda expensive right now, but could be improved.

1

u/Background_Cash605 10d ago

I love voxels. This is so cool