Take out water from inside of the boat with Custom Stencil - logic puzzle

Also tried out so so much… the stencils were a no go for me either… then I also tried the DistanceToNearestSurface method OP described, and oh boy! It worked!

Just plug this into the water material of your ocean or water.

Then make a low poly shape of your boat in 3D, slightly bigger then the hull, import that mesh into the same BP/group as your boat mesh (named DistanceField in the example image), enable Generate Distance Fields on the low poly SM, but change the resolution to like 0.1 instead of 1 (tweak where needed). Then on the low poly mesh disable everything visual related and shadow related, like render in main pass and use as occluder.

A BP would look like this:
image

And then you should be done… just leaving this here for future generations :D…

PS: Make sure your project has Distance Fields enabled in the Project Settings, otherwise it isnt working at all.

1 Like