Fluid Particles

This is something I’m sure a lot of people can only dream of doing: full-scale water simulations with live particles, if possible to be simulated by the GPU. These are not just GPU sprites that can bounce off surfaces, but particles that can fill a container with water, dump it out, and interact with environment physics to create interactive water-based gameplay. This requires the particles to actually retain volume and roll down surfaces (or G-buffer normals) instead of just bouncing off.

I remembered UDK had basic implementation of Apex particles for fluids, but that was a very experimental, buggy, extraneous thing that didn’t really work all too well. Some more guts behind the smoke and mirrors would be lovely.

Nvidia is working on their own implementation of Flex: NVIDIA GameWorks Integration - General Discussion - Unreal Engine Forums

Any timeframe on when Flex will be officially integrated? Will it be part of the 4.8 release? It would be nice to have all of GameWorks integrated as that will give us VXGI and fluid particles and a ton of other stuff as well.

I don’t think an official integration from epic will ever be available, give Gameworks is closed source. That would be clashing with unreal licensing.
Epic usually leaves integration to vendors, and as such an unofficial integration from nvidia already exist and it’s working in a separate branch.
I bet that a semi official integration will be available as a plugin when stable, but it’s just my opinion.

This model could pose a serious threat to the future of gameworks though, since Nvidia will need to constantly update their integration each version, and the preview mechanism up this complexity.

Let’s hope it will all be sorted out!

HI mariomguy -

While we may be a ways off from true fluid particle dynamics, but we are working on full scene GPU particle collisions which is a step in the right direction.

Here is the latest tests:

Thank You

Yeah, I tried using GPU particles for water before, and they work great for watery VFX splashes and drops, but the fact that they don’t retain volume makes them much more difficult to use as a convincing water solution overall. If there’s a way for two GPU sprites that are close to each other combine into a larger form the way water does naturally, or for particles to flow down, rather than bounce off of surfaces, taking into consideration the volume of the particle while doing so, then fluid particles would look far more convincing than they do now. At the moment, the only way to get this kind of look in UE4 is manually through hand animated sprites, or by using multiple GPU emitters in a system with different textures, and it’s not a dynamic solution at all. Something like Alice: Madness Returns would be awesome, and it seems NVIDIA’s solution is basically that.

I really hope NVIDIA can integrate Gameworks through a plugin so we can get the benefit of Gameworks with new updates in the engine. We finally have the graphical power for stuff like water and hair, all that’s left is integration :slight_smile:

OK, I tried using GPU sprites and I got some pretty convincing flowing results. It doesn’t retain volume, and like all GPU particles, it will fall right through anything the camera can’t see, and there is some degree of overdraw necessary, but for the most part, it works! You need to use the top settings for proper simulation, and the bottom settings are recommended for visual appearance:

Collision Resilience - 0, or a low value below .05. Water should flow, not bounce
Collision Friction - 0. More friction results in more viscosity, but should be kept low to allow flow.
Collision Response - Bounce
Drag - 0-0.7 works great. More drag results in more viscosity, and a “heavier” appearing liquid. Water is pretty heavy, but it’s not sludge, and has little air resistance.
Const Acceleration - -400 in the Z direction works nicely. A lower value would increase the force of gravity, but then the particles move too quickly.

Screen Alignment - PSA Velocity
Size by Speed, Speed Scale - 0,1
Size by Speed, Max Scale - 0,2