Stylised shoreline effect

If your scene is small enough just make one texture for whole level. If you just need that texture for shore effect you can preprocess it to have simple alpha mask where water should have shore effect. You can start by making simple lerp by height and sealevel. This will make water have shore if there is less than x amount of water. Then you can blur this a bit. Then add some time based noise offset animation and it should look good.

Any update on this? (:

You can use distance fields to mask out shores for spawning foam. However I’m still not sure how to get this uneven shape that follows the contour of the shoreline while fading out on one side as shown in post #1.

Aside from manually placing them with splines or something, ofcourse. But I’m more interested to find out if it is possible to get it dynamically?

Here’s a pic explaining what I mean:

Pic 2 is roughly what I’d like to know how to do (similar to 1), while 3 is whats easily possible with Distance fields (even having the further side fade out gradually). I just can’t figure out how to get a “break-up” pattern to only show up on the edge on the further side like in 1 and 2.

What you want is called blend modulation. The basic idea is to break up a low frequency gradient with a high frequency one. The material function Height Lerp provides an easy way to do it but there are lots of different ways to try it out.

https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/Functions/Reference/Texturing/#heightlerp

@, thank you once again. That seems to be it, almost.

I’m currently using a panner to move the break up texture (currently a checker pattern), however it creates this issue since it always moves into the same direction, no matter where it is.

Is it possible to get it to move more in the directions of the yellow arrows in the below picture?

EDIT: Posted a possible solution at the bottom after some testing.

Would dynamic distance field flow maps work? I don’t really care about stretching or, some clipping where directions change or minor things like that.

Heres my material if anyone likes to give it a try. I put the gradient from the distance fields in the transitional phase input (the wire that goes off-screen).

EDIT: Dynamic flow maps based of the distance fields seem to be in the right direction. Here’s a very rough, 5 minute test. Now I’ll just have to combine them with the blend modulation. The flickering and weirdness is easily fixed by smoothing the distance field gradient.

This may give some hints:

He uses a sobel filter to get the vectors from the distance map.

Greetings, someone was asking me how to achieve the shoreline effect I created and pointed me to this thread. I posted a thread a couple weeks ago on a problem I was trying to solve which is exactly what Gmi is trying to resolve right now. But before I ask anything, I thought I’d share a bit more in depth on how to achieve this effect for those who are new or not as knowledgeable on the unreal engine.

To start off, here is what I created. I’ve worked on it since, so its changed a bit. I’m also trying to achieve a style similar to Rime and The Witness. To achieve this look, I used something called Distance Fields which has been mentioned already multiple times but there is very little info on how to use it and how to activate it and what to watch out for. First off, you need to turn on Generate Mesh Distance Fields.

As seen in the red boxes of the picture, you go to Edit - Project Settings - Rendering - and Check Generate Mesh Distance Fields. With that turned on, we can now use nodes that use Distance Fields such as the Distance Field Gradient which is what is used to create flow maps but the node I used is called distancetonearestsurface. Here is a simple material I created to help demonstrate its usage.

The node in the red box is the important one and while I’m not all that familiar with materials, from what I understand, overuse of this node can get expensive but using it a few times doesn’t hurt too much. I use it only once and split off after to achieve a variety of effects using the same information. The nodes below are Scalar Parameters for those unfamiliar and I use an instanced material so I can decide on how much foam I want and how sharp/smooth it is. The parameters FoamSpread, controls the smooth spread of the shoreline while Add adds more to the sharp amount of shoreline. For example, you can have some foam that’s sharp and then let it smooth out. Mask Power is an addition just to sharpen the smooth. Its not necessary but it gives a little more control sometimes. Here are the numbers I use for the parameters to start off.

And here is the result of this Material. The red boxes are to show another option to control distance fields which affects rendering distance and also sometimes affects the weird jagged edges you might see on your shoreline.

Hopefully this helps for those who are new or those struggling with finding a solution to shorelines. There are some issues you might run into. If you dont see the shoreline and the whole sea is covered in your foam color, it may be an issue with shadows. You can check by checking and unchecking the shadows checkbox for your water plane as shown in this image.

There we go, I hope that helped those who weren’t able to follow or couldn’t find the solutions to the hints people mention. If I missed anything, go ahead and ask any questions. I’ll try to answer them but I’m no guru when it comes to the complicated stuff so I might not be able to answer.

Now onto my question. Hey Gmi, I’m trying to find a solution to the same problem you are having and it seems you managed to figure something out? I tried following your picture example but I’m not getting anything close. How do you get it to flow away in ALL directions from your land. I got a lot of weird results with some parts flowing the right way but the rest not flowing correctly. Do you use the flowmap node? Do you normalize or manipulate the distancefieldgradient or are you using some different math?

Heres a link to my thread (not much to see).

https://forums.unrealengine.com/showthread.php?122557-Creating-a-Stylized-Water-Shader-Need-some-help

Below is the code to copy and paste to create the example I showed.


Begin Object Class=MaterialGraphNode_Comment Name="MaterialGraphNode_Comment_10"
   Begin Object Class=MaterialExpressionComment Name="MaterialExpressionComment_24"
   End Object
   Begin Object Name="MaterialExpressionComment_24"
      SizeX=668
      SizeY=249
      Text="Mask Power"
      MaterialExpressionEditorX=-960
      MaterialExpressionEditorY=144
      MaterialExpressionGuid=B6A229FA4285D74FECE9948186C2570E
      Material=PreviewMaterial'/Engine/Transient.ExampleDistanceField'
   End Object
   MaterialExpressionComment=MaterialExpressionComment'MaterialExpressionComment_24'
   NodePosX=-960
   NodePosY=144
   NodeWidth=668
   NodeHeight=249
   NodeComment="Mask Power"
   NodeGuid=50A432754F873D86B1ED08B2D3B2225F
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_161"
   Begin Object Class=EdGraphPin Name="EdGraphPin_4127"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_4126"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_4125"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_4124"
   End Object
   Begin Object Class=MaterialExpressionClamp Name="MaterialExpressionClamp_24"
   End Object
   Begin Object Name="EdGraphPin_4127"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_163.EdGraphPin_4170'
   End Object
   Begin Object Name="EdGraphPin_4126"
      PinName="Max"
      PinType=(PinCategory="optional")
   End Object
   Begin Object Name="EdGraphPin_4125"
      PinName="Min"
      PinType=(PinCategory="optional")
   End Object
   Begin Object Name="EdGraphPin_4124"
      PinName="Input"
      PinFriendlyName=" "
      PinType=(PinCategory="required")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_160.EdGraphPin_4134'
   End Object
   Begin Object Name="MaterialExpressionClamp_24"
      Input=(Expression=MaterialExpressionPower'MaterialGraphNode_160.MaterialExpressionPower_12')
      MaterialExpressionEditorX=-544
      MaterialExpressionEditorY=192
      MaterialExpressionGuid=9C269BDA45B50BF555C58E82B89C8566
      Material=PreviewMaterial'/Engine/Transient.ExampleDistanceField'
   End Object
   MaterialExpression=MaterialExpressionClamp'MaterialExpressionClamp_24'
   Pins(0)=EdGraphPin'EdGraphPin_4124'
   Pins(1)=EdGraphPin'EdGraphPin_4125'
   Pins(2)=EdGraphPin'EdGraphPin_4126'
   Pins(3)=EdGraphPin'EdGraphPin_4127'
   NodePosX=-544
   NodePosY=192
   NodeGuid=BB31757E48DDD1F89564C2BD8CFCFE7F
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_160"
   Begin Object Class=EdGraphPin Name="EdGraphPin_4134"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_4133"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_4132"
   End Object
   Begin Object Class=MaterialExpressionPower Name="MaterialExpressionPower_12"
   End Object
   Begin Object Name="EdGraphPin_4134"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_161.EdGraphPin_4124'
   End Object
   Begin Object Name="EdGraphPin_4133"
      PinName="Exp"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_159.EdGraphPin_4138'
   End Object
   Begin Object Name="EdGraphPin_4132"
      PinName="Base"
      PinType=(PinCategory="required")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_157.EdGraphPin_4149'
   End Object
   Begin Object Name="MaterialExpressionPower_12"
      Base=(Expression=MaterialExpressionClamp'MaterialGraphNode_157.MaterialExpressionClamp_25')
      Exponent=(Expression=MaterialExpressionScalarParameter'MaterialGraphNode_159.MaterialExpressionScalarParameter_41')
      MaterialExpressionEditorX=-720
      MaterialExpressionEditorY=192
      MaterialExpressionGuid=942421744F00FAD35FEACC89E152564F
      Material=PreviewMaterial'/Engine/Transient.ExampleDistanceField'
   End Object
   MaterialExpression=MaterialExpressionPower'MaterialExpressionPower_12'
   Pins(0)=EdGraphPin'EdGraphPin_4132'
   Pins(1)=EdGraphPin'EdGraphPin_4133'
   Pins(2)=EdGraphPin'EdGraphPin_4134'
   NodePosX=-720
   NodePosY=192
   NodeGuid=CFDBDFA242F4BFF13ADC9EB12748DE2C
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_159"
   Begin Object Class=EdGraphPin Name="EdGraphPin_4138"
   End Object
   Begin Object Class=MaterialExpressionScalarParameter Name="MaterialExpressionScalarParameter_41"
   End Object
   Begin Object Name="EdGraphPin_4138"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_160.EdGraphPin_4133'
   End Object
   Begin Object Name="MaterialExpressionScalarParameter_41"
      DefaultValue=3.000000
      ParameterName="Mask Strength"
      ExpressionGUID=D6E4571447B1C226568C9BAD68A6DB2D
      Group="Other"
      MaterialExpressionEditorX=-912
      MaterialExpressionEditorY=272
      MaterialExpressionGuid=48DA061F41ED610957E9D1852379DC90
      Material=PreviewMaterial'/Engine/Transient.ExampleDistanceField'
   End Object
   MaterialExpression=MaterialExpressionScalarParameter'MaterialExpressionScalarParameter_41'
   Pins(0)=EdGraphPin'EdGraphPin_4138'
   NodePosX=-912
   NodePosY=272
   bCanRenameNode=True
   NodeGuid=FA00923F440158C07E33C49CB0322F3C
End Object
Begin Object Class=MaterialGraphNode_Comment Name="MaterialGraphNode_Comment_9"
   Begin Object Class=MaterialExpressionComment Name="MaterialExpressionComment_25"
   End Object
   Begin Object Name="MaterialExpressionComment_25"
      SizeX=864
      SizeY=320
      Text="Edge Foam Mask"
      MaterialExpressionEditorX=-1952
      MaterialExpressionEditorY=80
      MaterialExpressionGuid=5744FDC0412795F81338E0BA21EB9F37
      Material=PreviewMaterial'/Engine/Transient.ExampleDistanceField'
   End Object
   MaterialExpressionComment=MaterialExpressionComment'MaterialExpressionComment_25'
   NodePosX=-1952
   NodePosY=80
   NodeWidth=864
   NodeHeight=320
   NodeComment="Edge Foam Mask"
   NodeGuid=B468A6654F7D87FB70FF4E8342D281A5
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_158"
   Begin Object Class=EdGraphPin Name="EdGraphPin_4142"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_4141"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_4140"
   End Object
   Begin Object Class=MaterialExpressionSubtract Name="MaterialExpressionSubtract_12"
   End Object
   Begin Object Name="EdGraphPin_4142"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_157.EdGraphPin_4146'
   End Object
   Begin Object Name="EdGraphPin_4141"
      PinName="B"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_155.EdGraphPin_4160'
   End Object
   Begin Object Name="EdGraphPin_4140"
      PinName="A"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_156.EdGraphPin_4156'
   End Object
   Begin Object Name="MaterialExpressionSubtract_12"
      A=(Expression=MaterialExpressionDivide'MaterialGraphNode_156.MaterialExpressionDivide_14')
      B=(Expression=MaterialExpressionScalarParameter'MaterialGraphNode_155.MaterialExpressionScalarParameter_42')
      MaterialExpressionEditorX=-1504
      MaterialExpressionEditorY=176
      MaterialExpressionGuid=5AD0901D46C9A99DF718EFB51E10BBBB
      Material=PreviewMaterial'/Engine/Transient.ExampleDistanceField'
   End Object
   MaterialExpression=MaterialExpressionSubtract'MaterialExpressionSubtract_12'
   Pins(0)=EdGraphPin'EdGraphPin_4140'
   Pins(1)=EdGraphPin'EdGraphPin_4141'
   Pins(2)=EdGraphPin'EdGraphPin_4142'
   NodePosX=-1504
   NodePosY=176
   NodeGuid=EF914F434275F32318C0F19EEAD60BB8
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_157"
   Begin Object Class=EdGraphPin Name="EdGraphPin_4149"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_4148"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_4147"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_4146"
   End Object
   Begin Object Class=MaterialExpressionClamp Name="MaterialExpressionClamp_25"
   End Object
   Begin Object Name="EdGraphPin_4149"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_160.EdGraphPin_4132'
   End Object
   Begin Object Name="EdGraphPin_4148"
      PinName="Max"
      PinType=(PinCategory="optional")
   End Object
   Begin Object Name="EdGraphPin_4147"
      PinName="Min"
      PinType=(PinCategory="optional")
   End Object
   Begin Object Name="EdGraphPin_4146"
      PinName="Input"
      PinFriendlyName=" "
      PinType=(PinCategory="required")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_158.EdGraphPin_4142'
   End Object
   Begin Object Name="MaterialExpressionClamp_25"
      Input=(Expression=MaterialExpressionSubtract'MaterialGraphNode_158.MaterialExpressionSubtract_12')
      MaterialExpressionEditorX=-1328
      MaterialExpressionEditorY=176
      MaterialExpressionGuid=680C4A114C3DE5E12D4E05919299CE36
      Material=PreviewMaterial'/Engine/Transient.ExampleDistanceField'
   End Object
   MaterialExpression=MaterialExpressionClamp'MaterialExpressionClamp_25'
   Pins(0)=EdGraphPin'EdGraphPin_4146'
   Pins(1)=EdGraphPin'EdGraphPin_4147'
   Pins(2)=EdGraphPin'EdGraphPin_4148'
   Pins(3)=EdGraphPin'EdGraphPin_4149'
   NodePosX=-1328
   NodePosY=176
   NodeGuid=E86D60E148C6D7F4F5C58685B6EB3DBB
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_156"
   Begin Object Class=EdGraphPin Name="EdGraphPin_4156"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_4155"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_4154"
   End Object
   Begin Object Class=MaterialExpressionDivide Name="MaterialExpressionDivide_14"
   End Object
   Begin Object Name="EdGraphPin_4156"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_158.EdGraphPin_4140'
   End Object
   Begin Object Name="EdGraphPin_4155"
      PinName="B"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_154.EdGraphPin_4162'
   End Object
   Begin Object Name="EdGraphPin_4154"
      PinName="A"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_153.EdGraphPin_4165'
   End Object
   Begin Object Name="MaterialExpressionDivide_14"
      A=(Expression=MaterialExpressionDistanceToNearestSurface'MaterialGraphNode_153.MaterialExpressionDistanceToNearestSurface_12')
      B=(Expression=MaterialExpressionScalarParameter'MaterialGraphNode_154.MaterialExpressionScalarParameter_43')
      MaterialExpressionEditorX=-1632
      MaterialExpressionEditorY=176
      MaterialExpressionGuid=6BC66DA6499A42ED617D14B589BE6676
      Material=PreviewMaterial'/Engine/Transient.ExampleDistanceField'
   End Object
   MaterialExpression=MaterialExpressionDivide'MaterialExpressionDivide_14'
   Pins(0)=EdGraphPin'EdGraphPin_4154'
   Pins(1)=EdGraphPin'EdGraphPin_4155'
   Pins(2)=EdGraphPin'EdGraphPin_4156'
   NodePosX=-1632
   NodePosY=176
   NodeGuid=EEC5C516472EE4C6DA9D63B7863591AD
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_155"
   Begin Object Class=EdGraphPin Name="EdGraphPin_4160"
   End Object
   Begin Object Class=MaterialExpressionScalarParameter Name="MaterialExpressionScalarParameter_42"
   End Object
   Begin Object Name="EdGraphPin_4160"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_158.EdGraphPin_4141'
   End Object
   Begin Object Name="MaterialExpressionScalarParameter_42"
      DefaultValue=2.000000
      ParameterName="Add"
      ExpressionGUID=FD95DC1247FAAC79F339598322A9A67C
      Group="Foam"
      MaterialExpressionEditorX=-1648
      MaterialExpressionEditorY=288
      MaterialExpressionGuid=C3BC24954CFB83B860B9B5BBA7E5EDB6
      Material=PreviewMaterial'/Engine/Transient.ExampleDistanceField'
   End Object
   MaterialExpression=MaterialExpressionScalarParameter'MaterialExpressionScalarParameter_42'
   Pins(0)=EdGraphPin'EdGraphPin_4160'
   NodePosX=-1648
   NodePosY=288
   bCanRenameNode=True
   NodeGuid=4C9712FD4763B8ECECD6009E09078602
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_154"
   Begin Object Class=EdGraphPin Name="EdGraphPin_4162"
   End Object
   Begin Object Class=MaterialExpressionScalarParameter Name="MaterialExpressionScalarParameter_43"
   End Object
   Begin Object Name="EdGraphPin_4162"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_156.EdGraphPin_4155'
   End Object
   Begin Object Name="MaterialExpressionScalarParameter_43"
      DefaultValue=7.000000
      ParameterName="FoamSpread"
      ExpressionGUID=AA7A8DE741BFED457728E789DCB9617D
      Group="Foam"
      MaterialExpressionEditorX=-1840
      MaterialExpressionEditorY=272
      MaterialExpressionGuid=278F71B54EB10D43181F1391FA5FD946
      Material=PreviewMaterial'/Engine/Transient.ExampleDistanceField'
   End Object
   MaterialExpression=MaterialExpressionScalarParameter'MaterialExpressionScalarParameter_43'
   Pins(0)=EdGraphPin'EdGraphPin_4162'
   NodePosX=-1840
   NodePosY=272
   bCanRenameNode=True
   NodeGuid=2C15694B4F4E8EDC342712B3D366E8F8
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_153"
   Begin Object Class=EdGraphPin Name="EdGraphPin_4165"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_4164"
   End Object
   Begin Object Class=MaterialExpressionDistanceToNearestSurface Name="MaterialExpressionDistanceToNearestSurface_12"
   End Object
   Begin Object Name="EdGraphPin_4165"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_156.EdGraphPin_4154'
   End Object
   Begin Object Name="EdGraphPin_4164"
      PinName="Position"
      PinType=(PinCategory="optional")
   End Object
   Begin Object Name="MaterialExpressionDistanceToNearestSurface_12"
      MaterialExpressionEditorX=-1904
      MaterialExpressionEditorY=176
      MaterialExpressionGuid=14F20DD04C0EAC4DA985DF8FAD7782E7
      Material=PreviewMaterial'/Engine/Transient.ExampleDistanceField'
   End Object
   MaterialExpression=MaterialExpressionDistanceToNearestSurface'MaterialExpressionDistanceToNearestSurface_12'
   Pins(0)=EdGraphPin'EdGraphPin_4164'
   Pins(1)=EdGraphPin'EdGraphPin_4165'
   NodePosX=-1904
   NodePosY=176
   NodeGuid=2DEA13C443DFD32632825C8DBE2C7CDE
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_163"
   Begin Object Class=EdGraphPin Name="EdGraphPin_4171"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_4170"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_4169"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_4168"
   End Object
   Begin Object Class=MaterialExpressionLinearInterpolate Name="MaterialExpressionLinearInterpolate_8"
   End Object
   Begin Object Name="EdGraphPin_4171"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_Root_1.EdGraphPin_4098'
   End Object
   Begin Object Name="EdGraphPin_4170"
      PinName="Alpha"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_161.EdGraphPin_4127'
   End Object
   Begin Object Name="EdGraphPin_4169"
      PinName="B"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_165.EdGraphPin_4173'
   End Object
   Begin Object Name="EdGraphPin_4168"
      PinName="A"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_164.EdGraphPin_4172'
   End Object
   Begin Object Name="MaterialExpressionLinearInterpolate_8"
      A=(Expression=MaterialExpressionConstant'MaterialGraphNode_164.MaterialExpressionConstant_8')
      B=(Expression=MaterialExpressionConstant3Vector'MaterialGraphNode_165.MaterialExpressionConstant3Vector_7')
      Alpha=(Expression=MaterialExpressionClamp'MaterialGraphNode_161.MaterialExpressionClamp_24')
      MaterialExpressionEditorX=-256
      MaterialExpressionEditorY=32
      MaterialExpressionGuid=CB01238A490D9151EC603ABA1AD30963
      Material=PreviewMaterial'/Engine/Transient.ExampleDistanceField'
   End Object
   MaterialExpression=MaterialExpressionLinearInterpolate'MaterialExpressionLinearInterpolate_8'
   Pins(0)=EdGraphPin'EdGraphPin_4168'
   Pins(1)=EdGraphPin'EdGraphPin_4169'
   Pins(2)=EdGraphPin'EdGraphPin_4170'
   Pins(3)=EdGraphPin'EdGraphPin_4171'
   NodePosX=-256
   NodePosY=32
   NodeGuid=D68C76904FA78DFE8C7264AE44B61AD9
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_164"
   Begin Object Class=EdGraphPin Name="EdGraphPin_4172"
   End Object
   Begin Object Class=MaterialExpressionConstant Name="MaterialExpressionConstant_8"
   End Object
   Begin Object Name="EdGraphPin_4172"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_163.EdGraphPin_4168'
   End Object
   Begin Object Name="MaterialExpressionConstant_8"
      R=1.000000
      MaterialExpressionEditorX=-528
      MaterialExpressionEditorY=-112
      MaterialExpressionGuid=B9418BEE4BDDDF44DFEF628EC638164E
      Material=PreviewMaterial'/Engine/Transient.ExampleDistanceField'
   End Object
   MaterialExpression=MaterialExpressionConstant'MaterialExpressionConstant_8'
   Pins(0)=EdGraphPin'EdGraphPin_4172'
   NodePosX=-528
   NodePosY=-112
   NodeGuid=34433CA54CD7DC256B3395B2FAD38C59
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_165"
   Begin Object Class=EdGraphPin Name="EdGraphPin_4173"
   End Object
   Begin Object Class=MaterialExpressionConstant3Vector Name="MaterialExpressionConstant3Vector_7"
   End Object
   Begin Object Name="EdGraphPin_4173"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_163.EdGraphPin_4169'
   End Object
   Begin Object Name="MaterialExpressionConstant3Vector_7"
      Constant=(R=0.000000,G=0.000000,B=1.000000,A=0.000000)
      MaterialExpressionEditorX=-624
      MaterialExpressionEditorY=-48
      MaterialExpressionGuid=FC1D53DB4162B54E8B0D66BF3F75F5D6
      Material=PreviewMaterial'/Engine/Transient.ExampleDistanceField'
   End Object
   MaterialExpression=MaterialExpressionConstant3Vector'MaterialExpressionConstant3Vector_7'
   Pins(0)=EdGraphPin'EdGraphPin_4173'
   NodePosX=-624
   NodePosY=-48
   NodeGuid=FF6B7B364DE1AEC94DAC638CCA4DC626
End Object

@Volfox, here’s basically my current material (not finished yet) but it shows how I got it to move evenly in all directions. The three wires coming from the top of the picture is basically same as the one output you use as a alpha in this screenshot I apologize for the messy blueprint and crossing wires etc, hopefully it’s understandable. I created a material instance of this material which I applied to my objects.

Some of those nodes might be outdated and not in use at all and I just haven’t deleted them yet.

here’s how it currently looks for me.

Is there any way to trace the outlines of objects in the water more precisely? I’ve added an example of what I mean: