How do I soften single-layer water shoreline?


How can I soften the transition (shoreline) with single-layer water in UE5.5.4 ?

1 Like

Hi @motorsep,

With specifically the Single Layer Water material type, you’ll have to achieve this with a Distance To Nearest Surface.

At the most basic level, this is what that looks like.

If you plug it into the Alpha of a lerp for your opacity, this will have the effect of creating a natural, smooth fade in around any meshes that are near to the water’s surface.

Another way to achieve this is actually through the Absorption Coefficient. If you’re interested in that method, this tutorial breaks it down really well:

Best of luck! Let me know if you have any other questions.

1 Like

Thanks, I’ll give it a try!

Sadly, it doesn’t seem to work:

If I swap opacity values, I get this:

P.S. I don’t know if it makes any difference, but I am in forward DX12 in 5.5.4

Distance To Nearest Surface node still needs input. Can you try this?

Just opacity variation is a bit of a simple solution though. If we’re talking about something realistic with waves and foam that’s a whole different story depending on how far you want to go with that.

1 Like

Best thing to do would be to just map a tiling texture across the shore and therefore use a specific mesh thats’s meant just for the shoreline.

Its more complicated, but you can easily tile the shore in with an HISM and call it a day…

Ok folks, sorry, it’s the volumetric fog (or exponential fog).
No fog (opacity 0, no fancy material network):

Fog:

Ugh, it’s a pickle. Is there a fix/workaround for this ?

Yes, remove the fog from under the water.
That’s the core issue.

1+1 = 2 on the transparency.

That’s not quite possible - if I do that, then areas on the terrain below water level that don’t have water, will have no fog :frowning:

I guess to compromise I can increase start distance, so that at least in the close proximity water appears to have soft edge.

Maybe define the water area with a volume and prevent said volume from getting fog?

Not sure how to do this, but I tried it in VR as-is and … single-layer water doesn’t even render correctly in stereo (not to mention massive performance hit it incurs). Went through all these troubles for nothing :confused:

I guess I am going to have to try non-transparent old school water.

I have the same question as you, hope there will be more methods in the future so I can apply.

I found an old asset I had for mobile water. Seems to be a good compromise:

Sadly, refraction adds several ms to overhead on my hardware, so I had to disable it. Probably would be fine on 4070+, but not on 4060 and below.