Procedural Water System (technically droplets)

I recently came with a way to “simulate” droplets of water and their interactions on surfaces or with one another. Which makes for some very convincing water!

Each droplet is physically simulated and runs in real time!

These droplets can slide off surfaces as well as pool together.

They have been heavily optimized (although I may not be the best!) so they will automatically run less precise calculations when not being viewed, or stop rendering things like puddles entirely when blocked. Each droplet is split onto several threads and even caches the droplets if you want to use larger amounts.

With this optimization system also comes the sound system! Each sound is created by individual droplet interactions, usually just drips or splashes, and even becomes occluded by walls or surfaces shown here.

Each droplet can be colored or changed materials as well, for use in things such as paints, more realistic blood, etc. The sounds for specific interactions are also changeable, but I’m just using about 30~ or so free Roblox sounds for drips, drops and splashes.

If you have any feedback feel free to let me know! I may open source this in the future if people want to use it on their projects.

54 Likes

this is awsome, but two things. firstly, i dont think the water puddles should go under walls/ stationary objects, and secondly, idk why but the wall sliding just seems unrealistic to me. don’t get me wrong though, this is amazing! i’m not trying to say it’s bad or anything, cuz it’s really good.

4 Likes

I had no prior awareness that I exist in a reality where such a phenomenon is achievable, (I’m amazed, shocked, and even dead at the same time)

5 Likes

Its still very new! The speed of them sliding on objects is just slow because it was the default setting for when I was testing it. They can be sped up and edited as well yesyes

Also puddles can probably be modified pretty easily to not spread past walls, currently they’re just checking that they don’t spread over an empty area, like puddles landing on a thin beam for example.

Thanks for the feedback!

2 Likes

Did some more adjustments and got the puddles to be more performant, as well as speeding up some of the sliding water so it looks nicer.
(There’s a few bumps in the microprofiler but thats just me tabbing out of Studio)

The cache system is also more efficient now and re-uses deleted parts.

9 Likes

Wow, this should definitely be open sourced! Awesome work!

4 Likes

I would love to use this on my project if possible

3 Likes

Fantastic work!

I would however you suggest not to go too crazy with utilizing too many virtual threads, things can get unstable fast!

Best of luck!

1 Like

On a scale from 0 to 10, how difficult was it to implement this mechanic? Great work btw

2 Likes

Could you elaborate just so I don’t break something in the future? The amount of threads/actors is completely customizable in the module already, but the documentation said you do want quite a few to utilize more powerful computers.

1 Like

I’ve been messing with concepts for stuff like this in the past so it wasn’t too horribly difficult, it was mainly just the optimization that took forever, which even now still isn’t perfect. I’d say about like, a 6? Maybeeee a 7 because of having to wonder why running ~300 tweens at the same time wasn’t a such a great idea.

(Side note, while this system uses a lot of tweens, the laggiest part was actually the puddles expanding somehow. I guess running a lot of tween’s on specifically their size make you lose frames? Anyways the simple solution was to genuinly shorten the tween so theres less running at once, and kinda fake them expanding with other means.)

2 Likes

That’s A W E S O M E.
This water looks like real one, and I have no words now.
But, will this work only on basic parts, or it will work on meshes too? What will occur if you make water drip on cylinder with ball which inside of it by 1/2 ontop (Intersecting collisions in short)?

1 Like

hey, this is actually hecka awesome, i was wondering if you could open source this, and also, i was wondering if your interested in making WORKING WATER, like imagine a river how it flows, imagine a bunch of balls with bones in them, connecting to eachother to make a body of water, when something seperates them they unconnect.
not connected:
image

connected:
image

green is the collision for the droplet, blue is the bones for the droplet, light blue is the physical mesh of the droplet.

anyways if you dont wanna do that, can you open source this please, i really want to use this for my game, or in physics testing (rain system, etc.)

1 Like

are u really saying the sussy way?

1 Like

I’ll probably open source this at some point in the future, but I like your concept! However a skinned mesh for each part might cause lag, and having a lot of unanchored spheres would also cause lag, so the physics would probably have to be made with code with anchored parts.

I think a better implementation might be only to apply skinned meshes to larger groups of orbs or something similar using custom physics.

My droplet simulation has something similar to represent larger groups. If there’s too many droplets near each other, they purposefully expand themselves over time to make it look like they cover more area. This means it looks like a lot more water, without expending a ton of processing power on covering all the area they would normally take up if each droplet was simulated standalone.

tl;dr everything lags so you gotta fake it with smoke and mirrors usually

2 Likes

hey, did you implement a way to find the surface normals of an object, so that the water realistic run’s off of it. I couldn’t tell in the examples shown, it seemed like it went the same speed even if the water was sprayed on a flat surface compared to being sprayed on a 90 degree angle? Edit, it seems like you did make it stop for a flat surface, but still seems like the water runs off at the same speed no matter how steep the nagle is?

1 Like

is there anyway you sell/open source this, i really need this and you made a very great job its very high quality

Hi. Is this. Opensource able. I am A D1 Begger.

Great work! Genuinely impressive stuff you got here, never seen a water effect system quite like this. I do definitely support the chance of you making this open source, as I would love to mess around with it.