Sea shore material

Hello people. I’ve been trying to get a shore/foam kind of effect where the ocean plane meets the terrain.
I have used the VaOcean plugin from here: https://forums.unrealengine/showthread.php?4181-Plugin-Ocean-surface-simulation-plugin-(VaOcean)
Its amazing but the only problem is that it doesn’t react when it makes contact with other objects.
So I’ve been looking at how it can be done in UDK here: ://www.polycount/forum/showthread.php?t=90797
I have been trying to recreate this method from UDK but I don’t seem to be able to find the ‘constant clamp’ in the UE4 material editor, though there is a ‘clamp’ node but when I connect it up and try and save the material I receive an error stating that the current material has compilation errors, so it will not render correctly in feature level SM5.

Anyone think they could give me a hand or point me in the right direction?

Thanks!

Just use a depth fade node + lerp:


(but it will just work when you set the blend mode to transculent)

Ahh that’s what I was missing, the translucentness. thanks a bunch man!

There is a problem with this method though.
As you can see the water looks kind of nice when its set to opaque but I can’t use the depth fade with that.


This is the ocean with the foam kind of effect. It’s set to white at the moment until I get it figured out.

When its set to translucent a lot of detail is lost. :confused:

Is there any other method I could use to get this looking right?

cheeers

You could create water like in this tutorial: but the reflection wont be flipped https://answers.unrealengine/questions/64876/the-refraction-of-a-watermaterial-isnt-z-flipped.html