Detecting if a material enters in collision with another


The title isn’t very clear, but here’s what I want to do.
I added the VaOcean plugin to my game, and I have a landscape.
I want to create a nice fade between the water and the landscape.

As you can see here: the rough borders aren’t very nice.
So I thought I should fade the water, so the material is completely opaque far from the landscape, and unvisible near it.
I think my idea might be pretty hard to achieve…

Anyone knows how I could do that?


As for water/ocean, there’s a depth effect that has to be added to the material so that it is more transparent as it gets more shallow, you might check out some of the ocean material stuff people have created for UDK, some things should be able to be replicated in UE4.

Exactly what I needed!

Actually I have a problem with that.
To do it with a translucent material, I’d pin my DepthFade node to the opacity, and it would work. But I want my material to be opaque because lighting is better with.
Do you have any idea how I could use opacity on an opaque material?