Realtime Waterjet simulation for Unreal Engine 4

Hey there :slight_smile:

Iam still on polish a little student game project. In one scene you have to wash a bloody knife at a sink. At the moment I have solved it with an cylindrical mesh with an animtated Texture on it. On Trigger the cylinder where rendered. Then I made a cinematic in UE and moved the knife through the Water…

Its ok to know, what you do there… but i will make it professional. So my plan is to make a realtime waterjet simulation, where i can move the knife through ( like this: ) and can show the blood in the water at the sink outflow. (like some scenes in movies where someone take a shower and wash blood down)

Maybe someone here can help me a little or knows some good tutorials for this?

I searched through Youtube, but does’nt found something good.


If you want high quality, I would use a Rendertarget for the dirt mask on the knife. Since you have a water stream, you can easily find the hitlocation and size, write on the Rendertarget and remove the dirt. If you want the water to change color, this can be done in your Material with World Position UVs with a height slider in Z. Then you probably just need some little splash meshes and you should get something convincing. I mentioned some buzzwords, but I learned the stuff from different tutorials, so can’t point directly to a good tutorial.

1 Like

Hey Ninjin,
thanks a lot for your reply. At the moment i try to make the realistic water simulation directly un Unreal with Cascade. On my looking for this I stumbled about RenderTargets… but the idea with the dirt as RenderTarget is awesome… i will try it out :wink:

Ok. Here is a little Update. I tried something with Render Target.


Hell yeah. I will be better and better. Here is my next Update.

Now the Knife and the Water are independent from each other. Also the water is a particle effect.
I fixed the PBR problem what I had, cause of the render target texture.

Next Steps:

  • LineTrace Hide → Set the drawDebugType to none
  • Splash on Knife
  • Water should be red in Z-Height
  • implement in Game

Just some input since you didn’t mention how you accomplish your next steps. I know 2 ways how you could go on, maybe you even got a 3rd.

  1. Use GPU particles instead of that cylinder and use particle collision. I’m not 100% sure, but I think you can use an event module if particles collide and turn the particles red.
  2. Mask out the cylinder depending on the knife normal and use small splash meshes (this seems to be your solution)

Either way, looking forward for the next update :slightly_smiling_face:

Hey Ninjin :slight_smile:
I already use the first hint :slight_smile: I changed the cylinder with a GPU particle system and use a cylinder as emitter. Also the particles have a collision, but i have to polish the water a lot. The collision is to soft and (I have to check why) a lot particles don’t collide and it seems the flow through the knife… don’t know why.

The idea with the event module is nice… that was a part where i thought 'bout.

I think about using a vectorfield to become the typical circle/vortex on the drain. But I don’t know if it will work togehter with the collision. I will try it, maybe today :slight_smile:

Thanks for your support :slight_smile: