Shore detection for water surfaces

You gotta read GPU Gems :slight_smile:

These are the foam calculations. The top texture is a 4x4 pixel texture which is white in the center and has a 1 pixel black border on the outer edge. This is used as a mask to prevent the inside texture from leaking out into the distance. The texture below it is a special mask along the shoreline that fades from black (all areas without any shoreline foam) to gray (the shoreline) to white (the point where the shore stops crashing). The texture at the bottom is a black and white noise map. I use a material parameter collection to control the ocean across multiple materials (the landscape and the seawater) at the same time. The textures are planar mapped from the top, using a custom world location and set size for alignment. The waves themselves are generated by sine waves.

Aside from using a texture mask, there really is no other option to generating a nice shore wave. So the texture capture and alignment has to be absolutely perfect.


Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_244"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60560"
   End Object
   Begin Object Class=MaterialExpressionCollectionParameter Name="MaterialExpressionCollectionParameter_18"
   End Object
   Begin Object Name="EdGraphPin_60560"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_247.EdGraphPin_60564'
   End Object
   Begin Object Name="MaterialExpressionCollectionParameter_18"
      Collection=MaterialParameterCollection'/Game/Blueprints/DevBP/Ocean_Alignment.Ocean_Alignment'
      ParameterName="Y"
      ParameterId=B87C25624EEBA61AF98B888374E00624
      MaterialExpressionEditorX=-2768
      MaterialExpressionEditorY=608
      MaterialExpressionGuid=8E293B6A440C3BB89E67FEB22E59EB69
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
      bCollapsed=True
   End Object
   MaterialExpression=MaterialExpressionCollectionParameter'MaterialExpressionCollectionParameter_18'
   Pins(0)=EdGraphPin'EdGraphPin_60560'
   NodePosX=-2768
   NodePosY=608
   NodeGuid=94AB52C0483375D8A511F983C05077CA
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_245"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60561"
   End Object
   Begin Object Class=MaterialExpressionCollectionParameter Name="MaterialExpressionCollectionParameter_19"
   End Object
   Begin Object Name="EdGraphPin_60561"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_247.EdGraphPin_60563'
   End Object
   Begin Object Name="MaterialExpressionCollectionParameter_19"
      Collection=MaterialParameterCollection'/Game/Blueprints/DevBP/Ocean_Alignment.Ocean_Alignment'
      ParameterName="X"
      ParameterId=85B61B164F7B512314583E843E600845
      MaterialExpressionEditorX=-2768
      MaterialExpressionEditorY=496
      MaterialExpressionGuid=8E293B6A440C3BB89E67FEB22E59EB69
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
      bCollapsed=True
   End Object
   MaterialExpression=MaterialExpressionCollectionParameter'MaterialExpressionCollectionParameter_19'
   Pins(0)=EdGraphPin'EdGraphPin_60561'
   NodePosX=-2768
   NodePosY=496
   NodeGuid=18BAB56749329D4C74B449AD75DEBABE
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_246"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60562"
   End Object
   Begin Object Class=MaterialExpressionCollectionParameter Name="MaterialExpressionCollectionParameter_20"
   End Object
   Begin Object Name="EdGraphPin_60562"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_250.EdGraphPin_60571'
   End Object
   Begin Object Name="MaterialExpressionCollectionParameter_20"
      Collection=MaterialParameterCollection'/Game/Blueprints/DevBP/Ocean_Alignment.Ocean_Alignment'
      ParameterName="Scale"
      ParameterId=D05433BF40545FEA4CF8EF89846E39B0
      MaterialExpressionEditorX=-2928
      MaterialExpressionEditorY=352
      MaterialExpressionGuid=8E293B6A440C3BB89E67FEB22E59EB69
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
      bCollapsed=True
   End Object
   MaterialExpression=MaterialExpressionCollectionParameter'MaterialExpressionCollectionParameter_20'
   Pins(0)=EdGraphPin'EdGraphPin_60562'
   NodePosX=-2928
   NodePosY=352
   NodeGuid=3DE9C7054FF3000739AA06BF72BCCAB7
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_247"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60565"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60564"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60563"
   End Object
   Begin Object Class=MaterialExpressionAppendVector Name="MaterialExpressionAppendVector_3"
   End Object
   Begin Object Name="EdGraphPin_60565"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_248.EdGraphPin_60567'
      LinkedTo(1)=EdGraphPin'MaterialGraphNode_279.EdGraphPin_60649'
   End Object
   Begin Object Name="EdGraphPin_60564"
      PinName="B"
      PinType=(PinCategory="required")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_244.EdGraphPin_60560'
   End Object
   Begin Object Name="EdGraphPin_60563"
      PinName="A"
      PinType=(PinCategory="required")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_245.EdGraphPin_60561'
   End Object
   Begin Object Name="MaterialExpressionAppendVector_3"
      A=(Expression=MaterialExpressionCollectionParameter'MaterialGraphNode_245.MaterialExpressionCollectionParameter_19')
      B=(Expression=MaterialExpressionCollectionParameter'MaterialGraphNode_244.MaterialExpressionCollectionParameter_18')
      MaterialExpressionEditorX=-2512
      MaterialExpressionEditorY=528
      MaterialExpressionGuid=404FC86841D2347EED7BEA98DCF3E66E
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
   End Object
   MaterialExpression=MaterialExpressionAppendVector'MaterialExpressionAppendVector_3'
   Pins(0)=EdGraphPin'EdGraphPin_60563'
   Pins(1)=EdGraphPin'EdGraphPin_60564'
   Pins(2)=EdGraphPin'EdGraphPin_60565'
   NodePosX=-2512
   NodePosY=528
   NodeGuid=2437E0D4428B8DF23B63D9825C45E38E
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_248"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60568"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60567"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60566"
   End Object
   Begin Object Class=MaterialExpressionAdd Name="MaterialExpressionAdd_9"
   End Object
   Begin Object Name="EdGraphPin_60568"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_261.EdGraphPin_60603'
   End Object
   Begin Object Name="EdGraphPin_60567"
      PinName="B"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_247.EdGraphPin_60565'
   End Object
   Begin Object Name="EdGraphPin_60566"
      PinName="A"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_251.EdGraphPin_60574'
   End Object
   Begin Object Name="MaterialExpressionAdd_9"
      A=(Expression=MaterialExpressionComponentMask'MaterialGraphNode_251.MaterialExpressionComponentMask_2')
      B=(Expression=MaterialExpressionAppendVector'MaterialGraphNode_247.MaterialExpressionAppendVector_3')
      MaterialExpressionEditorX=-2288
      MaterialExpressionEditorY=512
      MaterialExpressionGuid=12B5F3B14C11A5DC70461EA326B0F6F4
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
   End Object
   MaterialExpression=MaterialExpressionAdd'MaterialExpressionAdd_9'
   Pins(0)=EdGraphPin'EdGraphPin_60566'
   Pins(1)=EdGraphPin'EdGraphPin_60567'
   Pins(2)=EdGraphPin'EdGraphPin_60568'
   NodePosX=-2288
   NodePosY=512
   NodeGuid=8C8E97A84F66204CF76832B2899A7504
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_249"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60569"
   End Object
   Begin Object Class=MaterialExpressionWorldPosition Name="MaterialExpressionWorldPosition_2"
   End Object
   Begin Object Name="EdGraphPin_60569"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_250.EdGraphPin_60570'
   End Object
   Begin Object Name="MaterialExpressionWorldPosition_2"
      WorldPositionShaderOffset=WPT_ExcludeAllShaderOffsets
      MaterialExpressionEditorX=-3040
      MaterialExpressionEditorY=256
      MaterialExpressionGuid=959A150A46548F6CF4D37CAA100F5DD7
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
   End Object
   MaterialExpression=MaterialExpressionWorldPosition'MaterialExpressionWorldPosition_2'
   Pins(0)=EdGraphPin'EdGraphPin_60569'
   NodePosX=-3040
   NodePosY=256
   NodeGuid=B54EFCC046262FB84C939794CD7100E1
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_250"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60572"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60571"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60570"
   End Object
   Begin Object Class=MaterialExpressionDivide Name="MaterialExpressionDivide_4"
   End Object
   Begin Object Name="EdGraphPin_60572"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_251.EdGraphPin_60573'
   End Object
   Begin Object Name="EdGraphPin_60571"
      PinName="B"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_246.EdGraphPin_60562'
   End Object
   Begin Object Name="EdGraphPin_60570"
      PinName="A"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_249.EdGraphPin_60569'
   End Object
   Begin Object Name="MaterialExpressionDivide_4"
      A=(Expression=MaterialExpressionWorldPosition'MaterialGraphNode_249.MaterialExpressionWorldPosition_2')
      B=(Expression=MaterialExpressionCollectionParameter'MaterialGraphNode_246.MaterialExpressionCollectionParameter_20')
      MaterialExpressionEditorX=-2672
      MaterialExpressionEditorY=288
      MaterialExpressionGuid=A61B1BF2410BADF69F96D0BFC02C43A2
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
   End Object
   MaterialExpression=MaterialExpressionDivide'MaterialExpressionDivide_4'
   Pins(0)=EdGraphPin'EdGraphPin_60570'
   Pins(1)=EdGraphPin'EdGraphPin_60571'
   Pins(2)=EdGraphPin'EdGraphPin_60572'
   NodePosX=-2672
   NodePosY=288
   NodeGuid=9A5CB7A64A7D8B264C4E7281E66C3927
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_251"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60574"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60573"
   End Object
   Begin Object Class=MaterialExpressionComponentMask Name="MaterialExpressionComponentMask_2"
   End Object
   Begin Object Name="EdGraphPin_60574"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_248.EdGraphPin_60566'
      LinkedTo(1)=EdGraphPin'MaterialGraphNode_262.EdGraphPin_60610'
      LinkedTo(2)=EdGraphPin'MaterialGraphNode_278.EdGraphPin_60645'
   End Object
   Begin Object Name="EdGraphPin_60573"
      PinName="Input"
      PinFriendlyName=" "
      PinType=(PinCategory="required")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_250.EdGraphPin_60572'
   End Object
   Begin Object Name="MaterialExpressionComponentMask_2"
      Input=(Expression=MaterialExpressionDivide'MaterialGraphNode_250.MaterialExpressionDivide_4')
      R=True
      G=True
      MaterialExpressionEditorX=-2576
      MaterialExpressionEditorY=320
      MaterialExpressionGuid=E73C91F344D781EDF6219FAFFFD320A9
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
   End Object
   MaterialExpression=MaterialExpressionComponentMask'MaterialExpressionComponentMask_2'
   Pins(0)=EdGraphPin'EdGraphPin_60573'
   Pins(1)=EdGraphPin'EdGraphPin_60574'
   NodePosX=-2576
   NodePosY=320
   NodeGuid=EDCC193A4F2C7FEE4F8188BD8A452D96
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_252"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60575"
   End Object
   Begin Object Class=MaterialExpressionTime Name="MaterialExpressionTime_6"
   End Object
   Begin Object Name="EdGraphPin_60575"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_256.EdGraphPin_60584'
   End Object
   Begin Object Name="MaterialExpressionTime_6"
      MaterialExpressionEditorX=-1310
      MaterialExpressionEditorY=978
      MaterialExpressionGuid=1CB29A8C426574BE2602CB99824ED06F
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
   End Object
   MaterialExpression=MaterialExpressionTime'MaterialExpressionTime_6'
   Pins(0)=EdGraphPin'EdGraphPin_60575'
   NodePosX=-1310
   NodePosY=978
   NodeGuid=62A05CCC4FCE8D7557DB569716F4A356
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_253"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60578"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60577"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60576"
   End Object
   Begin Object Class=MaterialExpressionAdd Name="MaterialExpressionAdd_10"
   End Object
   Begin Object Name="EdGraphPin_60578"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_274.EdGraphPin_60631'
   End Object
   Begin Object Name="EdGraphPin_60577"
      PinName="B"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_256.EdGraphPin_60586'
   End Object
   Begin Object Name="EdGraphPin_60576"
      PinName="A"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_258.EdGraphPin_60596'
   End Object
   Begin Object Name="MaterialExpressionAdd_10"
      A=(Expression=MaterialExpressionAdd'MaterialGraphNode_258.MaterialExpressionAdd_11')
      B=(Expression=MaterialExpressionMultiply'MaterialGraphNode_256.MaterialExpressionMultiply_31')
      MaterialExpressionEditorX=-1006
      MaterialExpressionEditorY=850
      MaterialExpressionGuid=233E6AB34D691DA693AE8095AF15AABF
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
   End Object
   MaterialExpression=MaterialExpressionAdd'MaterialExpressionAdd_10'
   Pins(0)=EdGraphPin'EdGraphPin_60576'
   Pins(1)=EdGraphPin'EdGraphPin_60577'
   Pins(2)=EdGraphPin'EdGraphPin_60578'
   NodePosX=-1006
   NodePosY=850
   NodeGuid=CBAFCC20483B170D12C30A90DF2B3580
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_254"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60581"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60580"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60579"
   End Object
   Begin Object Class=MaterialExpressionMultiply Name="MaterialExpressionMultiply_30"
   End Object
   Begin Object Name="EdGraphPin_60581"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_223.EdGraphPin_60502'
      LinkedTo(1)=EdGraphPin'MaterialGraphNode_239.EdGraphPin_60550'
      LinkedTo(2)=EdGraphPin'MaterialGraphNode_242.EdGraphPin_60556'
      LinkedTo(3)=EdGraphPin'MaterialGraphNode_285.EdGraphPin_60665'
   End Object
   Begin Object Name="EdGraphPin_60580"
      PinName="B"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_268.EdGraphPin_60624'
   End Object
   Begin Object Name="EdGraphPin_60579"
      PinName="A"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_277.EdGraphPin_60644'
   End Object
   Begin Object Name="MaterialExpressionMultiply_30"
      A=(Expression=MaterialExpressionMultiply'MaterialGraphNode_277.MaterialExpressionMultiply_36')
      B=(Expression=MaterialExpressionSphereMask'MaterialGraphNode_268.MaterialExpressionSphereMask_2')
      MaterialExpressionEditorX=-462
      MaterialExpressionEditorY=722
      MaterialExpressionGuid=66FBADFE41089D7C2C30F2B4654AB9B8
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
      bCollapsed=False
   End Object
   MaterialExpression=MaterialExpressionMultiply'MaterialExpressionMultiply_30'
   Pins(0)=EdGraphPin'EdGraphPin_60579'
   Pins(1)=EdGraphPin'EdGraphPin_60580'
   Pins(2)=EdGraphPin'EdGraphPin_60581'
   NodePosX=-462
   NodePosY=722
   NodeGuid=091FF9844196ACDACC3A739C755DBFBA
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_255"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60583"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60582"
   End Object
   Begin Object Class=MaterialExpressionOneMinus Name="MaterialExpressionOneMinus_6"
   End Object
   Begin Object Name="EdGraphPin_60583"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_258.EdGraphPin_60594'
   End Object
   Begin Object Name="EdGraphPin_60582"
      PinName="Input"
      PinFriendlyName=" "
      PinType=(PinCategory="required")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_277.EdGraphPin_60644'
   End Object
   Begin Object Name="MaterialExpressionOneMinus_6"
      Input=(Expression=MaterialExpressionMultiply'MaterialGraphNode_277.MaterialExpressionMultiply_36')
      MaterialExpressionEditorX=-1486
      MaterialExpressionEditorY=722
      MaterialExpressionGuid=E0ECE3E1413CF0B9A7E0E8B83E62051D
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
   End Object
   MaterialExpression=MaterialExpressionOneMinus'MaterialExpressionOneMinus_6'
   Pins(0)=EdGraphPin'EdGraphPin_60582'
   Pins(1)=EdGraphPin'EdGraphPin_60583'
   NodePosX=-1486
   NodePosY=722
   NodeGuid=B4EC58684A2E4894F636739FDA6EA988
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_256"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60586"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60585"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60584"
   End Object
   Begin Object Class=MaterialExpressionMultiply Name="MaterialExpressionMultiply_31"
   End Object
   Begin Object Name="EdGraphPin_60586"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_253.EdGraphPin_60577'
   End Object
   Begin Object Name="EdGraphPin_60585"
      PinName="B"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_264.EdGraphPin_60614'
   End Object
   Begin Object Name="EdGraphPin_60584"
      PinName="A"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_252.EdGraphPin_60575'
   End Object
   Begin Object Name="MaterialExpressionMultiply_31"
      A=(Expression=MaterialExpressionTime'MaterialGraphNode_252.MaterialExpressionTime_6')
      B=(Expression=MaterialExpressionCollectionParameter'MaterialGraphNode_264.MaterialExpressionCollectionParameter_21')
      ConstB=0.100000
      MaterialExpressionEditorX=-1150
      MaterialExpressionEditorY=1026
      MaterialExpressionGuid=1D14012D4621B82B43438AB742BD50BF
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
   End Object
   MaterialExpression=MaterialExpressionMultiply'MaterialExpressionMultiply_31'
   Pins(0)=EdGraphPin'EdGraphPin_60584'
   Pins(1)=EdGraphPin'EdGraphPin_60585'
   Pins(2)=EdGraphPin'EdGraphPin_60586'
   NodePosX=-1150
   NodePosY=1026
   NodeGuid=10F284E645F9A23AF11D8284957CC136
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_257"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60593"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60592"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60591"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60590"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60589"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60588"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60587"
   End Object
   Begin Object Class=MaterialExpressionTextureSample Name="MaterialExpressionTextureSample_7"
   End Object
   Begin Object Name="EdGraphPin_60593"
      PinName="Output5"
      PinFriendlyName=" "
      Direction=EGPD_Output
      PinType=(PinCategory="mask",PinSubCategory="alpha")
   End Object
   Begin Object Name="EdGraphPin_60592"
      PinName="Output4"
      PinFriendlyName=" "
      Direction=EGPD_Output
      PinType=(PinCategory="mask",PinSubCategory="blue")
   End Object
   Begin Object Name="EdGraphPin_60591"
      PinName="Output3"
      PinFriendlyName=" "
      Direction=EGPD_Output
      PinType=(PinCategory="mask",PinSubCategory="green")
   End Object
   Begin Object Name="EdGraphPin_60590"
      PinName="Output2"
      PinFriendlyName=" "
      Direction=EGPD_Output
      PinType=(PinCategory="mask",PinSubCategory="red")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_260.EdGraphPin_60600'
   End Object
   Begin Object Name="EdGraphPin_60589"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      PinType=(PinCategory="mask")
   End Object
   Begin Object Name="EdGraphPin_60588"
      PinName="Tex"
      PinType=(PinCategory="optional")
   End Object
   Begin Object Name="EdGraphPin_60587"
      PinName="UVs"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_259.EdGraphPin_60599'
   End Object
   Begin Object Name="MaterialExpressionTextureSample_7"
      Coordinates=(Expression=MaterialExpressionPanner'MaterialGraphNode_259.MaterialExpressionPanner_2')
      SamplerSource=SSM_Wrap_WorldGroupSettings
      Texture=Texture2D'/Game/ThirdPersonBP/Meshes/noise_T.noise_T'
      SamplerType=SAMPLERTYPE_LinearGrayscale
      MaterialExpressionEditorX=-1790
      MaterialExpressionEditorY=786
      MaterialExpressionGuid=2B2BE2CE4070CEFD47E499AF01EE1A05
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
      Desc="Noise"
      bCommentBubbleVisible=True
   End Object
   MaterialExpression=MaterialExpressionTextureSample'MaterialExpressionTextureSample_7'
   Pins(0)=EdGraphPin'EdGraphPin_60587'
   Pins(1)=EdGraphPin'EdGraphPin_60588'
   Pins(2)=EdGraphPin'EdGraphPin_60589'
   Pins(3)=EdGraphPin'EdGraphPin_60590'
   Pins(4)=EdGraphPin'EdGraphPin_60591'
   Pins(5)=EdGraphPin'EdGraphPin_60592'
   Pins(6)=EdGraphPin'EdGraphPin_60593'
   NodePosX=-1790
   NodePosY=786
   NodeComment="Noise"
   bCommentBubbleVisible=True
   NodeGuid=159F4D4146507476732572A1FE409C34
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_258"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60596"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60595"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60594"
   End Object
   Begin Object Class=MaterialExpressionAdd Name="MaterialExpressionAdd_11"
   End Object
   Begin Object Name="EdGraphPin_60596"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_253.EdGraphPin_60576'
   End Object
   Begin Object Name="EdGraphPin_60595"
      PinName="B"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_260.EdGraphPin_60602'
   End Object
   Begin Object Name="EdGraphPin_60594"
      PinName="A"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_255.EdGraphPin_60583'
   End Object
   Begin Object Name="MaterialExpressionAdd_11"
      A=(Expression=MaterialExpressionOneMinus'MaterialGraphNode_255.MaterialExpressionOneMinus_6')
      B=(Expression=MaterialExpressionMultiply'MaterialGraphNode_260.MaterialExpressionMultiply_32')
      MaterialExpressionEditorX=-1278
      MaterialExpressionEditorY=818
      MaterialExpressionGuid=4110132D4CFE9DB2FEE747B99B81E1E5
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
   End Object
   MaterialExpression=MaterialExpressionAdd'MaterialExpressionAdd_11'
   Pins(0)=EdGraphPin'EdGraphPin_60594'
   Pins(1)=EdGraphPin'EdGraphPin_60595'
   Pins(2)=EdGraphPin'EdGraphPin_60596'
   NodePosX=-1278
   NodePosY=818
   NodeGuid=A1A7C91A4F9CAAC45EE6AFB932E6573B
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_259"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60599"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60598"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60597"
   End Object
   Begin Object Class=MaterialExpressionPanner Name="MaterialExpressionPanner_2"
   End Object
   Begin Object Name="EdGraphPin_60599"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_257.EdGraphPin_60587'
   End Object
   Begin Object Name="EdGraphPin_60598"
      PinName="Time"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_265.EdGraphPin_60617'
   End Object
   Begin Object Name="EdGraphPin_60597"
      PinName="Coordinate"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_262.EdGraphPin_60612'
   End Object
   Begin Object Name="MaterialExpressionPanner_2"
      Coordinate=(Expression=MaterialExpressionMultiply'MaterialGraphNode_262.MaterialExpressionMultiply_33')
      Time=(Expression=MaterialExpressionMultiply'MaterialGraphNode_265.MaterialExpressionMultiply_34')
      SpeedX=0.001000
      MaterialExpressionEditorX=-2014
      MaterialExpressionEditorY=834
      MaterialExpressionGuid=6848A7384D871BD94DDEF7A49B502CAF
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
   End Object
   MaterialExpression=MaterialExpressionPanner'MaterialExpressionPanner_2'
   Pins(0)=EdGraphPin'EdGraphPin_60597'
   Pins(1)=EdGraphPin'EdGraphPin_60598'
   Pins(2)=EdGraphPin'EdGraphPin_60599'
   NodePosX=-2014
   NodePosY=834
   NodeGuid=8A8C4CB64C9B2F9F711D2EBDBCFF0600
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_260"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60602"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60601"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60600"
   End Object
   Begin Object Class=MaterialExpressionMultiply Name="MaterialExpressionMultiply_32"
   End Object
   Begin Object Name="EdGraphPin_60602"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_258.EdGraphPin_60595'
   End Object
   Begin Object Name="EdGraphPin_60601"
      PinName="B"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_272.EdGraphPin_60628'
   End Object
   Begin Object Name="EdGraphPin_60600"
      PinName="A"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_257.EdGraphPin_60590'
   End Object
   Begin Object Name="MaterialExpressionMultiply_32"
      A=(Expression=MaterialExpressionTextureSample'MaterialGraphNode_257.MaterialExpressionTextureSample_7',OutputIndex=1,Mask=1,MaskR=1)
      B=(Expression=MaterialExpressionCollectionParameter'MaterialGraphNode_272.MaterialExpressionCollectionParameter_25')
      ConstB=0.050000
      MaterialExpressionEditorX=-1470
      MaterialExpressionEditorY=898
      MaterialExpressionGuid=75CE41D5493095166320B29CF20B1887
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
   End Object
   MaterialExpression=MaterialExpressionMultiply'MaterialExpressionMultiply_32'
   Pins(0)=EdGraphPin'EdGraphPin_60600'
   Pins(1)=EdGraphPin'EdGraphPin_60601'
   Pins(2)=EdGraphPin'EdGraphPin_60602'
   NodePosX=-1470
   NodePosY=898
   NodeGuid=8A59FCD943FE6500970D8BB2D657A78B
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_261"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60609"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60608"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60607"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60606"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60605"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60604"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60603"
   End Object
   Begin Object Class=MaterialExpressionTextureSample Name="MaterialExpressionTextureSample_8"
   End Object
   Begin Object Name="EdGraphPin_60609"
      PinName="Output5"
      PinFriendlyName=" "
      Direction=EGPD_Output
      PinType=(PinCategory="mask",PinSubCategory="alpha")
   End Object
   Begin Object Name="EdGraphPin_60608"
      PinName="Output4"
      PinFriendlyName=" "
      Direction=EGPD_Output
      PinType=(PinCategory="mask",PinSubCategory="blue")
   End Object
   Begin Object Name="EdGraphPin_60607"
      PinName="Output3"
      PinFriendlyName=" "
      Direction=EGPD_Output
      PinType=(PinCategory="mask",PinSubCategory="green")
   End Object
   Begin Object Name="EdGraphPin_60606"
      PinName="Output2"
      PinFriendlyName=" "
      Direction=EGPD_Output
      PinType=(PinCategory="mask",PinSubCategory="red")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_277.EdGraphPin_60643'
   End Object
   Begin Object Name="EdGraphPin_60605"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      PinType=(PinCategory="mask")
   End Object
   Begin Object Name="EdGraphPin_60604"
      PinName="Tex"
      PinType=(PinCategory="optional")
   End Object
   Begin Object Name="EdGraphPin_60603"
      PinName="UVs"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_248.EdGraphPin_60568'
   End Object
   Begin Object Name="MaterialExpressionTextureSample_8"
      Coordinates=(Expression=MaterialExpressionAdd'MaterialGraphNode_248.MaterialExpressionAdd_9')
      SamplerSource=SSM_Clamp_WorldGroupSettings
      Texture=Texture2D'/Game/ThirdPersonBP/Meshes/ShorelineMask.ShorelineMask'
      SamplerType=SAMPLERTYPE_LinearGrayscale
      MaterialExpressionEditorX=-2176
      MaterialExpressionEditorY=512
      MaterialExpressionGuid=22742BDF404A0F8C6F7043A7B1FA82B5
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
      Desc="Shoreline Gradient"
      bCommentBubbleVisible=True
   End Object
   MaterialExpression=MaterialExpressionTextureSample'MaterialExpressionTextureSample_8'
   Pins(0)=EdGraphPin'EdGraphPin_60603'
   Pins(1)=EdGraphPin'EdGraphPin_60604'
   Pins(2)=EdGraphPin'EdGraphPin_60605'
   Pins(3)=EdGraphPin'EdGraphPin_60606'
   Pins(4)=EdGraphPin'EdGraphPin_60607'
   Pins(5)=EdGraphPin'EdGraphPin_60608'
   Pins(6)=EdGraphPin'EdGraphPin_60609'
   NodePosX=-2176
   NodePosY=512
   NodeComment="Shoreline Gradient"
   bCommentBubbleVisible=True
   NodeGuid=A4D59F5849D8C9F28E2665A999F7542D
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_262"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60612"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60611"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60610"
   End Object
   Begin Object Class=MaterialExpressionMultiply Name="MaterialExpressionMultiply_33"
   End Object
   Begin Object Name="EdGraphPin_60612"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_259.EdGraphPin_60597'
   End Object
   Begin Object Name="EdGraphPin_60611"
      PinName="B"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_267.EdGraphPin_60619'
   End Object
   Begin Object Name="EdGraphPin_60610"
      PinName="A"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_251.EdGraphPin_60574'
   End Object
   Begin Object Name="MaterialExpressionMultiply_33"
      A=(Expression=MaterialExpressionComponentMask'MaterialGraphNode_251.MaterialExpressionComponentMask_2')
      B=(Expression=MaterialExpressionCollectionParameter'MaterialGraphNode_267.MaterialExpressionCollectionParameter_23')
      ConstB=11.000000
      MaterialExpressionEditorX=-2224
      MaterialExpressionEditorY=752
      MaterialExpressionGuid=2DFF7DBC47262B238D609895115C772C
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
   End Object
   MaterialExpression=MaterialExpressionMultiply'MaterialExpressionMultiply_33'
   Pins(0)=EdGraphPin'EdGraphPin_60610'
   Pins(1)=EdGraphPin'EdGraphPin_60611'
   Pins(2)=EdGraphPin'EdGraphPin_60612'
   NodePosX=-2224
   NodePosY=752
   NodeGuid=3D3AEA4544EE2FAF8D10068DA6704F19
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_263"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60613"
   End Object
   Begin Object Class=MaterialExpressionTime Name="MaterialExpressionTime_7"
   End Object
   Begin Object Name="EdGraphPin_60613"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_265.EdGraphPin_60616'
   End Object
   Begin Object Name="MaterialExpressionTime_7"
      MaterialExpressionEditorX=-2384
      MaterialExpressionEditorY=1056
      MaterialExpressionGuid=0A5DFED642199CAB0581D7B62EA50DBE
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
   End Object
   MaterialExpression=MaterialExpressionTime'MaterialExpressionTime_7'
   Pins(0)=EdGraphPin'EdGraphPin_60613'
   NodePosX=-2384
   NodePosY=1056
   NodeGuid=E098DB8A45FA6C20295D7196B7404B28
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_264"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60614"
   End Object
   Begin Object Class=MaterialExpressionCollectionParameter Name="MaterialExpressionCollectionParameter_21"
   End Object
   Begin Object Name="EdGraphPin_60614"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_256.EdGraphPin_60585'
   End Object
   Begin Object Name="MaterialExpressionCollectionParameter_21"
      Collection=MaterialParameterCollection'/Game/Blueprints/DevBP/Ocean_Alignment.Ocean_Alignment'
      ParameterName="Speed"
      ParameterId=A820261C4C100589A6E5BD831DF0F677
      MaterialExpressionEditorX=-1472
      MaterialExpressionEditorY=1072
      MaterialExpressionGuid=8E293B6A440C3BB89E67FEB22E59EB69
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
      bCollapsed=True
   End Object
   MaterialExpression=MaterialExpressionCollectionParameter'MaterialExpressionCollectionParameter_21'
   Pins(0)=EdGraphPin'EdGraphPin_60614'
   NodePosX=-1472
   NodePosY=1072
   NodeGuid=EAE8CBAF492189841E024FB84DC0505D
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_265"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60617"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60616"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60615"
   End Object
   Begin Object Class=MaterialExpressionMultiply Name="MaterialExpressionMultiply_34"
   End Object
   Begin Object Name="EdGraphPin_60617"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_259.EdGraphPin_60598'
   End Object
   Begin Object Name="EdGraphPin_60616"
      PinName="B"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_263.EdGraphPin_60613'
   End Object
   Begin Object Name="EdGraphPin_60615"
      PinName="A"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_266.EdGraphPin_60618'
   End Object
   Begin Object Name="MaterialExpressionMultiply_34"
      A=(Expression=MaterialExpressionCollectionParameter'MaterialGraphNode_266.MaterialExpressionCollectionParameter_22')
      B=(Expression=MaterialExpressionTime'MaterialGraphNode_263.MaterialExpressionTime_7')
      MaterialExpressionEditorX=-2224
      MaterialExpressionEditorY=960
      MaterialExpressionGuid=4EDF82C44D462F5B0688B8A630D5F19F
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
   End Object
   MaterialExpression=MaterialExpressionMultiply'MaterialExpressionMultiply_34'
   Pins(0)=EdGraphPin'EdGraphPin_60615'
   Pins(1)=EdGraphPin'EdGraphPin_60616'
   Pins(2)=EdGraphPin'EdGraphPin_60617'
   NodePosX=-2224
   NodePosY=960
   NodeGuid=1D96745043DAD545829A2EA0156C2C52
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_266"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60618"
   End Object
   Begin Object Class=MaterialExpressionCollectionParameter Name="MaterialExpressionCollectionParameter_22"
   End Object
   Begin Object Name="EdGraphPin_60618"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_265.EdGraphPin_60615'
   End Object
   Begin Object Name="MaterialExpressionCollectionParameter_22"
      Collection=MaterialParameterCollection'/Game/Blueprints/DevBP/Ocean_Alignment.Ocean_Alignment'
      ParameterName="SpeedDistort"
      ParameterId=B0576B9D468A3DC811D1519D50F665C3
      MaterialExpressionEditorX=-2478
      MaterialExpressionEditorY=930
      MaterialExpressionGuid=8E293B6A440C3BB89E67FEB22E59EB69
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
      bCollapsed=True
   End Object
   MaterialExpression=MaterialExpressionCollectionParameter'MaterialExpressionCollectionParameter_22'
   Pins(0)=EdGraphPin'EdGraphPin_60618'
   NodePosX=-2478
   NodePosY=930
   NodeGuid=3B9D38B04201C13D0E3CA4AA2E0EC9F7
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_267"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60619"
   End Object
   Begin Object Class=MaterialExpressionCollectionParameter Name="MaterialExpressionCollectionParameter_23"
   End Object
   Begin Object Name="EdGraphPin_60619"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_262.EdGraphPin_60611'
   End Object
   Begin Object Name="MaterialExpressionCollectionParameter_23"
      Collection=MaterialParameterCollection'/Game/Blueprints/DevBP/Ocean_Alignment.Ocean_Alignment'
      ParameterName="DistortSize1"
      ParameterId=FEB8B53E425124219066F7A33526D5C2
      MaterialExpressionEditorX=-2558
      MaterialExpressionEditorY=802
      MaterialExpressionGuid=8E293B6A440C3BB89E67FEB22E59EB69
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
      bCollapsed=True
   End Object
   MaterialExpression=MaterialExpressionCollectionParameter'MaterialExpressionCollectionParameter_23'
   Pins(0)=EdGraphPin'EdGraphPin_60619'
   NodePosX=-2558
   NodePosY=802
   NodeGuid=184ED94B4B4E25073EC2F1B7F8C7245E
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_268"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60624"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60623"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60622"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60621"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60620"
   End Object
   Begin Object Class=MaterialExpressionSphereMask Name="MaterialExpressionSphereMask_2"
   End Object
   Begin Object Name="EdGraphPin_60624"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_254.EdGraphPin_60580'
   End Object
   Begin Object Name="EdGraphPin_60623"
      PinName="Hardness"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_270.EdGraphPin_60626'
   End Object
   Begin Object Name="EdGraphPin_60622"
      PinName="Radius"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_271.EdGraphPin_60627'
   End Object
   Begin Object Name="EdGraphPin_60621"
      PinName="B"
      PinType=(PinCategory="required")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_269.EdGraphPin_60625'
   End Object
   Begin Object Name="EdGraphPin_60620"
      PinName="A"
      PinType=(PinCategory="required")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_273.EdGraphPin_60630'
   End Object
   Begin Object Name="MaterialExpressionSphereMask_2"
      A=(Expression=MaterialExpressionSine'MaterialGraphNode_273.MaterialExpressionSine_2')
      B=(Expression=MaterialExpressionConstant'MaterialGraphNode_269.MaterialExpressionConstant_9')
      Radius=(Expression=MaterialExpressionCollectionParameter'MaterialGraphNode_271.MaterialExpressionCollectionParameter_24')
      Hardness=(Expression=MaterialExpressionConstant'MaterialGraphNode_270.MaterialExpressionConstant_10')
      MaterialExpressionEditorX=-590
      MaterialExpressionEditorY=962
      MaterialExpressionGuid=DDF2845F407FFE0F486637909416632D
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
   End Object
   MaterialExpression=MaterialExpressionSphereMask'MaterialExpressionSphereMask_2'
   Pins(0)=EdGraphPin'EdGraphPin_60620'
   Pins(1)=EdGraphPin'EdGraphPin_60621'
   Pins(2)=EdGraphPin'EdGraphPin_60622'
   Pins(3)=EdGraphPin'EdGraphPin_60623'
   Pins(4)=EdGraphPin'EdGraphPin_60624'
   NodePosX=-590
   NodePosY=962
   NodeGuid=E598B6084F033409092E98BE12DC3CF0
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_269"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60625"
   End Object
   Begin Object Class=MaterialExpressionConstant Name="MaterialExpressionConstant_9"
   End Object
   Begin Object Name="EdGraphPin_60625"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_268.EdGraphPin_60621'
   End Object
   Begin Object Name="MaterialExpressionConstant_9"
      MaterialExpressionEditorX=-910
      MaterialExpressionEditorY=1010
      MaterialExpressionGuid=DC150612494480C881823F9D1C9AC114
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
   End Object
   MaterialExpression=MaterialExpressionConstant'MaterialExpressionConstant_9'
   Pins(0)=EdGraphPin'EdGraphPin_60625'
   NodePosX=-910
   NodePosY=1010
   NodeGuid=B746AA3F4C6F1D0E86CDD6996BB6A410
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_270"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60626"
   End Object
   Begin Object Class=MaterialExpressionConstant Name="MaterialExpressionConstant_10"
   End Object
   Begin Object Name="EdGraphPin_60626"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_268.EdGraphPin_60623'
   End Object
   Begin Object Name="MaterialExpressionConstant_10"
      MaterialExpressionEditorX=-798
      MaterialExpressionEditorY=1202
      MaterialExpressionGuid=1CEF7E3B48399ED05202249D426135AC
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
   End Object
   MaterialExpression=MaterialExpressionConstant'MaterialExpressionConstant_10'
   Pins(0)=EdGraphPin'EdGraphPin_60626'
   NodePosX=-798
   NodePosY=1202
   NodeGuid=B718E7B44F42417311354991B0DDB1A9
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_271"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60627"
   End Object
   Begin Object Class=MaterialExpressionCollectionParameter Name="MaterialExpressionCollectionParameter_24"
   End Object
   Begin Object Name="EdGraphPin_60627"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_268.EdGraphPin_60622'
   End Object
   Begin Object Name="MaterialExpressionCollectionParameter_24"
      Collection=MaterialParameterCollection'/Game/Blueprints/DevBP/Ocean_Alignment.Ocean_Alignment'
      ParameterName="Thickness"
      ParameterId=9B9481F643659D239DC9F4893644B73C
      MaterialExpressionEditorX=-894
      MaterialExpressionEditorY=1090
      MaterialExpressionGuid=8E293B6A440C3BB89E67FEB22E59EB69
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
      bCollapsed=True
   End Object
   MaterialExpression=MaterialExpressionCollectionParameter'MaterialExpressionCollectionParameter_24'
   Pins(0)=EdGraphPin'EdGraphPin_60627'
   NodePosX=-894
   NodePosY=1090
   NodeGuid=0AAAEABD4C7001E92905DA8D71E0F558
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_272"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60628"
   End Object
   Begin Object Class=MaterialExpressionCollectionParameter Name="MaterialExpressionCollectionParameter_25"
   End Object
   Begin Object Name="EdGraphPin_60628"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_260.EdGraphPin_60601'
   End Object
   Begin Object Name="MaterialExpressionCollectionParameter_25"
      Collection=MaterialParameterCollection'/Game/Blueprints/DevBP/Ocean_Alignment.Ocean_Alignment'
      ParameterName="DistortionStrength"
      ParameterId=58FA850348216D681D5B0494793A8697
      MaterialExpressionEditorX=-1792
      MaterialExpressionEditorY=1008
      MaterialExpressionGuid=8E293B6A440C3BB89E67FEB22E59EB69
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
      bCollapsed=True
   End Object
   MaterialExpression=MaterialExpressionCollectionParameter'MaterialExpressionCollectionParameter_25'
   Pins(0)=EdGraphPin'EdGraphPin_60628'
   NodePosX=-1792
   NodePosY=1008
   NodeGuid=E8858121477B9DEA170E8A9C3D642DBE
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_273"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60630"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60629"
   End Object
   Begin Object Class=MaterialExpressionSine Name="MaterialExpressionSine_2"
   End Object
   Begin Object Name="EdGraphPin_60630"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_268.EdGraphPin_60620'
   End Object
   Begin Object Name="EdGraphPin_60629"
      PinName="Input"
      PinFriendlyName=" "
      PinType=(PinCategory="required")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_274.EdGraphPin_60633'
   End Object
   Begin Object Name="MaterialExpressionSine_2"
      Input=(Expression=MaterialExpressionMultiply'MaterialGraphNode_274.MaterialExpressionMultiply_35')
      MaterialExpressionEditorX=-782
      MaterialExpressionEditorY=818
      MaterialExpressionGuid=75A665054211B405982268A814EA638B
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
   End Object
   MaterialExpression=MaterialExpressionSine'MaterialExpressionSine_2'
   Pins(0)=EdGraphPin'EdGraphPin_60629'
   Pins(1)=EdGraphPin'EdGraphPin_60630'
   NodePosX=-782
   NodePosY=818
   NodeGuid=7FB3B23C4114F0356F9AC6958533B437
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_274"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60633"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60632"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60631"
   End Object
   Begin Object Class=MaterialExpressionMultiply Name="MaterialExpressionMultiply_35"
   End Object
   Begin Object Name="EdGraphPin_60633"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_273.EdGraphPin_60629'
   End Object
   Begin Object Name="EdGraphPin_60632"
      PinName="B"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_275.EdGraphPin_60634'
   End Object
   Begin Object Name="EdGraphPin_60631"
      PinName="A"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_253.EdGraphPin_60578'
   End Object
   Begin Object Name="MaterialExpressionMultiply_35"
      A=(Expression=MaterialExpressionAdd'MaterialGraphNode_253.MaterialExpressionAdd_10')
      B=(Expression=MaterialExpressionCollectionParameter'MaterialGraphNode_275.MaterialExpressionCollectionParameter_26')
      MaterialExpressionEditorX=-910
      MaterialExpressionEditorY=850
      MaterialExpressionGuid=FB5CFCDF4E9BF614A630AA9845C7B690
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
   End Object
   MaterialExpression=MaterialExpressionMultiply'MaterialExpressionMultiply_35'
   Pins(0)=EdGraphPin'EdGraphPin_60631'
   Pins(1)=EdGraphPin'EdGraphPin_60632'
   Pins(2)=EdGraphPin'EdGraphPin_60633'
   NodePosX=-910
   NodePosY=850
   NodeGuid=1923E8224BC0E72792BF17BCA32BDF3A
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_275"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60634"
   End Object
   Begin Object Class=MaterialExpressionCollectionParameter Name="MaterialExpressionCollectionParameter_26"
   End Object
   Begin Object Name="EdGraphPin_60634"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_274.EdGraphPin_60632'
   End Object
   Begin Object Name="MaterialExpressionCollectionParameter_26"
      Collection=MaterialParameterCollection'/Game/Blueprints/DevBP/Ocean_Alignment.Ocean_Alignment'
      ParameterName="Bands"
      ParameterId=4B51A6D7467E7C20649E429B627AFCDC
      MaterialExpressionEditorX=-1200
      MaterialExpressionEditorY=1152
      MaterialExpressionGuid=8E293B6A440C3BB89E67FEB22E59EB69
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
      bCollapsed=True
   End Object
   MaterialExpression=MaterialExpressionCollectionParameter'MaterialExpressionCollectionParameter_26'
   Pins(0)=EdGraphPin'EdGraphPin_60634'
   NodePosX=-1200
   NodePosY=1152
   NodeGuid=D2AC8BEF4DF2FC042F2D7483762991E5
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_276"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60641"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60640"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60639"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60638"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60637"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60636"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60635"
   End Object
   Begin Object Class=MaterialExpressionTextureSample Name="MaterialExpressionTextureSample_9"
   End Object
   Begin Object Name="EdGraphPin_60641"
      PinName="Output5"
      PinFriendlyName=" "
      Direction=EGPD_Output
      PinType=(PinCategory="mask",PinSubCategory="alpha")
   End Object
   Begin Object Name="EdGraphPin_60640"
      PinName="Output4"
      PinFriendlyName=" "
      Direction=EGPD_Output
      PinType=(PinCategory="mask",PinSubCategory="blue")
   End Object
   Begin Object Name="EdGraphPin_60639"
      PinName="Output3"
      PinFriendlyName=" "
      Direction=EGPD_Output
      PinType=(PinCategory="mask",PinSubCategory="green")
   End Object
   Begin Object Name="EdGraphPin_60638"
      PinName="Output2"
      PinFriendlyName=" "
      Direction=EGPD_Output
      PinType=(PinCategory="mask",PinSubCategory="red")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_277.EdGraphPin_60642'
   End Object
   Begin Object Name="EdGraphPin_60637"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      PinType=(PinCategory="mask")
   End Object
   Begin Object Name="EdGraphPin_60636"
      PinName="Tex"
      PinType=(PinCategory="optional")
   End Object
   Begin Object Name="EdGraphPin_60635"
      PinName="UVs"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_279.EdGraphPin_60650'
   End Object
   Begin Object Name="MaterialExpressionTextureSample_9"
      Coordinates=(Expression=MaterialExpressionAdd'MaterialGraphNode_279.MaterialExpressionAdd_12')
      Texture=Texture2D'/Game/ThirdPersonBP//watermask_T.watermask_T'
      SamplerType=SAMPLERTYPE_LinearColor
      MaterialExpressionEditorX=-2176
      MaterialExpressionEditorY=272
      MaterialExpressionGuid=B73600064AC3AFB1A66742A330B46A6A
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
      Desc="Square Mask (4x4 pixel, outer border black, nearest neighbor)"
      bCommentBubbleVisible=True
   End Object
   MaterialExpression=MaterialExpressionTextureSample'MaterialExpressionTextureSample_9'
   Pins(0)=EdGraphPin'EdGraphPin_60635'
   Pins(1)=EdGraphPin'EdGraphPin_60636'
   Pins(2)=EdGraphPin'EdGraphPin_60637'
   Pins(3)=EdGraphPin'EdGraphPin_60638'
   Pins(4)=EdGraphPin'EdGraphPin_60639'
   Pins(5)=EdGraphPin'EdGraphPin_60640'
   Pins(6)=EdGraphPin'EdGraphPin_60641'
   NodePosX=-2176
   NodePosY=272
   NodeComment="Square Mask (4x4 pixel, outer border black, nearest neighbor)"
   bCommentBubbleVisible=True
   NodeGuid=FBD6F5364260E1AB60574AA8C0C375AC
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_277"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60644"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60643"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60642"
   End Object
   Begin Object Class=MaterialExpressionMultiply Name="MaterialExpressionMultiply_36"
   End Object
   Begin Object Name="EdGraphPin_60644"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_254.EdGraphPin_60579'
      LinkedTo(1)=EdGraphPin'MaterialGraphNode_255.EdGraphPin_60582'
   End Object
   Begin Object Name="EdGraphPin_60643"
      PinName="B"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_261.EdGraphPin_60606'
   End Object
   Begin Object Name="EdGraphPin_60642"
      PinName="A"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_276.EdGraphPin_60638'
   End Object
   Begin Object Name="MaterialExpressionMultiply_36"
      A=(Expression=MaterialExpressionTextureSample'MaterialGraphNode_276.MaterialExpressionTextureSample_9',OutputIndex=1,Mask=1,MaskR=1)
      B=(Expression=MaterialExpressionTextureSample'MaterialGraphNode_261.MaterialExpressionTextureSample_8',OutputIndex=1,Mask=1,MaskR=1)
      MaterialExpressionEditorX=-1949
      MaterialExpressionEditorY=474
      MaterialExpressionGuid=99A34DD54615C1AA85DF558F460A295C
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
   End Object
   MaterialExpression=MaterialExpressionMultiply'MaterialExpressionMultiply_36'
   Pins(0)=EdGraphPin'EdGraphPin_60642'
   Pins(1)=EdGraphPin'EdGraphPin_60643'
   Pins(2)=EdGraphPin'EdGraphPin_60644'
   NodePosX=-1949
   NodePosY=474
   NodeGuid=D04B1B4B40072086C38845AE2AFDF88A
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_278"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60647"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60646"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60645"
   End Object
   Begin Object Class=MaterialExpressionDivide Name="MaterialExpressionDivide_5"
   End Object
   Begin Object Name="EdGraphPin_60647"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_279.EdGraphPin_60648'
   End Object
   Begin Object Name="EdGraphPin_60646"
      PinName="B"
      PinType=(PinCategory="optional")
   End Object
   Begin Object Name="EdGraphPin_60645"
      PinName="A"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_251.EdGraphPin_60574'
   End Object
   Begin Object Name="MaterialExpressionDivide_5"
      A=(Expression=MaterialExpressionComponentMask'MaterialGraphNode_251.MaterialExpressionComponentMask_2')
      MaterialExpressionEditorX=-2448
      MaterialExpressionEditorY=272
      MaterialExpressionGuid=951A1546462530C923E847AC8C018488
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
   End Object
   MaterialExpression=MaterialExpressionDivide'MaterialExpressionDivide_5'
   Pins(0)=EdGraphPin'EdGraphPin_60645'
   Pins(1)=EdGraphPin'EdGraphPin_60646'
   Pins(2)=EdGraphPin'EdGraphPin_60647'
   NodePosX=-2448
   NodePosY=272
   NodeGuid=80EE6D9A4AE6D0138D9CF49D200302AF
End Object
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_279"
   Begin Object Class=EdGraphPin Name="EdGraphPin_60650"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60649"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_60648"
   End Object
   Begin Object Class=MaterialExpressionAdd Name="MaterialExpressionAdd_12"
   End Object
   Begin Object Name="EdGraphPin_60650"
      PinName="Output"
      PinFriendlyName=" "
      Direction=EGPD_Output
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_276.EdGraphPin_60635'
   End Object
   Begin Object Name="EdGraphPin_60649"
      PinName="B"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_247.EdGraphPin_60565'
   End Object
   Begin Object Name="EdGraphPin_60648"
      PinName="A"
      PinType=(PinCategory="optional")
      LinkedTo(0)=EdGraphPin'MaterialGraphNode_278.EdGraphPin_60647'
   End Object
   Begin Object Name="MaterialExpressionAdd_12"
      A=(Expression=MaterialExpressionDivide'MaterialGraphNode_278.MaterialExpressionDivide_5')
      B=(Expression=MaterialExpressionAppendVector'MaterialGraphNode_247.MaterialExpressionAppendVector_3')
      MaterialExpressionEditorX=-2304
      MaterialExpressionEditorY=272
      MaterialExpressionGuid=42868ABC45A5E0916E1FAC92A5C33039
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
   End Object
   MaterialExpression=MaterialExpressionAdd'MaterialExpressionAdd_12'
   Pins(0)=EdGraphPin'EdGraphPin_60648'
   Pins(1)=EdGraphPin'EdGraphPin_60649'
   Pins(2)=EdGraphPin'EdGraphPin_60650'
   NodePosX=-2304
   NodePosY=272
   NodeGuid=D96C8672434F37B63DA87B9E7D422F2A
End Object
Begin Object Class=MaterialGraphNode_Comment Name="MaterialGraphNode_Comment_6"
   Begin Object Class=MaterialExpressionComment Name="MaterialExpressionComment_8"
   End Object
   Begin Object Name="MaterialExpressionComment_8"
      SizeX=2912
      SizeY=1184
      Text="Foam"
      MaterialExpressionEditorX=-3094
      MaterialExpressionEditorY=155
      MaterialExpressionGuid=1D2E0F8B4F0EB8ED6DEB3CA12DD9294F
      Material=PreviewMaterial'/Engine/Transient.PreviewMaterial_0'
   End Object
   MaterialExpressionComment=MaterialExpressionComment'MaterialExpressionComment_8'
   NodePosX=-3094
   NodePosY=155
   NodeWidth=2912
   NodeHeight=1184
   NodeComment="Foam"
   NodeGuid=7D5F8DAA40B12AB1808214BDF615D681
End Object


you don’t have to rely on a texture mask.
you can even make a shore wave using depthbias alpha (see this example), which is why I suggested distancefields in the first place (should be superior to depthbias alpha and as of 4.12 the landscape is in theory creating proper distancefield data)

And again, that method doesn’t define the shore, it defines the distance from the surface to the ground. You can have a sandbar very close to the surface of the water, but not breaking, and both the depth biased and distance to nearest methods will assume it is a shoreline and start generating waves where there shouldn’t be any at all.

The only way to accurately determine the shoreline is through a texture mask or a skirt mesh. Vertex painting is too expensive if you’re going to cover the entire ocean with vertices, and skirt meshes won’t work for very large oceans, so this leaves the texture option as the best one. If you do use a depth-based method, it will only be good for rocking seas and simple foam, not waves along the shore.

well yes, but then all you have to do is ensure there is a smooth slope underwater so the shader won’t make these mistakes. if you don’t want waves, no smooth slope.
with the proper underwater slope, the depth-based method can still produce quite good results for waves along the shore
here’s the same sample again as video: link. it’s a topdown game so it’s not that detailed but it can work

having a slope underwater is a small concession you have to make but it still produces natural results (btw IRL you see a sandbar close to the surface of the water it will have waves anyway). but if you really don’t want to make it then you’ll have to go for the more expensive methods

But that top down game is not really relevant anyway unless your game has similar camera constraints in which case you can fake things way more easily even with the standard depth fade.
You cannot use the same method and have it look the same when the player has more control over the camera angles, like a fps or especially a third person view with camera zoom in/out.

Anyways, when using distance fields you will have to disable generated distance fields for all your static meshes so that you can just read the landscape df (I’m assuming that can be done, haven’t tried it).
If you also want df for shadows and whatnot then obviously your material will also read the df of any mesh near the water plane… you cant have both working perfectly at the same time.

Have you tried using a 16bit landscape heightmap (select HDR compression in the texture settings)? from my limited testing it looks a lot less jaggy but you are not wrong when you said you are limited to pixel accuracy when using that method :stuck_out_tongue:
If your shore area is only a small part of your landscape then you can crop that part out from a higher resolution heightmap (like 4k +, assuming you have the means to do that ofc :stuck_out_tongue: is your heightmap made in world machine?), then it’s just a simple matter of mapping it properly to match your landscape.

the method would work all the same if using distance fields. plus that game was done in UE3, I would expect more from UE4 :stuck_out_tongue:

but regular meshes causing shore waves wouldn’t be a disaster would it? in most cases I would even think it’d be the intended behavior

actually I’ve been thinking about making a request for “distance field channels” (limited to 4 channels, so storing the DistanceField as a Vector4 rather than a Float) but I think Epic won’t like the performance implications

Not a disaster but the intended behavior (at least the way I see it) would be mesh df + landscape df… but you cant have that when a nearby mesh overrides the landscape df.

That sounds great to me but yeah… I don’t think Epic will like it either :stuck_out_tongue: it feels to me they are way too strict when it comes to adding new features (even though it can just be optional :rolleyes:).

Even though distance to nearest works on landscape, my method for generating waves had waves appearing over sand bars, and not nice sine waves: the entire sandbar just faded between white and blue. My wave-generation method using a gradient around the shoreline did not work with depth-based methods because it had waves crashing and distorting where no waves should be crashing at all. Once again, the only thing you can get with distance based functions is a very simple foam around the object itself. The distance-field method does not render fast enough for games, and the depth-based method does not produce waves around objects. So the best method, the only method that is sure to work when determining the shoreline, is a texture mask. And don’t knock it! This is how Assassin’s Creed III made their water: with a 512x512 texture mask for the shoreline. And their water was lovely.

Even though distance to nearest works on landscape, my method for generating waves had waves appearing over sand bars, and not nice sine waves: the entire sandbar just faded between white and blue. My wave-generation method using a gradient around the shoreline did not work with depth-based methods because it had waves crashing and distorting where no waves should be crashing at all. Once again, the only thing you can get with distance based functions is a very simple foam around the object itself. The distance-field method does not render fast enough for games, and the depth-based method does not produce waves around objects. So the best method, the only method that is sure to work when determining the shoreline, is a texture mask. And don’t knock it! This is how Assassin’s Creed III made their water: with a 512x512 texture mask for the shoreline. And their water was lovely.
[/QUOTE]

The texture method is not working with 3D generated waves like the ocean community project or the physical water surface from the marketplace. It only works for flat water that does not crawl up and down on landscapes and other shore objects. Distance field based can do this.
A completely different technique, day dreaming really, might be to use wave particles that react naturally to objects and assign them foam. But this is a rather high-hanging fruit.

Actually, that’s not impossible, or nearly as taxing as you think. GPU particles collide really easily with scene depth and distance fields. If you can use the GPU to render water particles, it is really easy to do so. Not for an entire ocean, but for a shoreline, yeah, it’s totally feasible. NVIDIA Flexworks has small-scale water simulations down pat. I’m sure lower quality ones would work well for shorelines.

Technically if it can work in a distance field it can also work in a texture, since you can encode distance fields as textures. It may just be there is an additional step needed to transform height date or whatever texture data you have into something more like a distance field. In general, blurring the values a ton will make it work better with something like gerstner waves.

It is very difficult to have a gerstner wave that reacts to the shoreline without making sure that the field has mostly continuous low curvature. Any sharp changes of any kind will cause a huge discontinuity in the wave. You need more of a very averaged direction towards the shore rather than an exact height field (though heightfield and local DF still useful for FX like wave crests hitting rocks in open water, the rock DF doesnt need to alter the wave direction just spawn foam + FX).

I have implemented a jump flooding method that can convert seeds into voronoi diagrams (look it up in the pixeljunk shooter paper), and next I want to make it work with landscape edges. All I should have to do is render the heightmap into an RT and detect pixels that straddle the waterZ (like sobel method) and encode those pixels as seeds and every other pixel as black and then run the jump flood. Fingers crossed. If I get something good I will share it with you guys.

That sounds really interesting Ryan, I would love to hear more about it when you have the time! :slight_smile:

So I haven’t had time to do that yet but it occurs to me many of you guys probably dont know about this photoshop trick to convert masks into distance fields. This has some big limitations like the spread radius is not very big, so you will want to downsize your texture if the gradient is not reaching far enough, but it works.

So here are the steps.

  1. Bring in an image of your heightfield into photoshop. Here is a snip from the kite terrain I used to demonstrate:

  2. Use Levels tool to make it black and white at the water level. It will be helpful to take a 2nd screenshot with matching camera angle with some object placed right at the waterline so you can make sure you get the right spot.


(ie, the white needs to be any terrain above the water… you could even make your landscape shader do this for you automatically pretty easily by doing “if Z > water, 1, else 0”)

  1. Use the Select->color range tool to select all the whites:

  2. Make a new layer and fill in the selection with white. Then fill in the original background layer with black. No image for this step.

  3. Add a layer style to the new top layer. The settings are very important. This is one of the most hidden, powerful tricks in photoshop that nobody seems to know about.


It needs to be: Stroke: Position=Outside, Fill Type=Gradient, Style=Shape Burst. Then make sure toset the size appropriately.

Also if this was more of a true distance field like for a font, you would want to choose Position=Center so that the distance field goes inside too and is at 0.5 on the border. Since we don’t care about waves going on top of the beach we don’t need to waste the limited range in that area.

You should then get something like this which is much more usable as a wave map from shore, but note it isn’t perfect as it treats even tiny pebbles poking up through the water as islands. So you may choose to mask some parts of it separately.

You could then blur this texture a bit to remove some of the sharp corners and then convert it into a normal map using the nvidia filters and end up with a decent vector map for the waves.

You would want to make sure to fade out the contribution of this vector map before it reaches flatness or in areas that have intersections going two ways. This would work much better with an island than a valley like I did here but hopefully you get the idea.

For this valley I probably should have used a bit of a thinner width for the gradient since you can’t really have the waves going out further than half the width of the ‘lake’ which seems to be what I created above. Still hope its useful.

I would probably fix the small outcroppings dominating the image by removing them from the first pass before adding the stroke filter, and then moving them to another layer with a much darker white value and set it to ‘ligten’ or something so it would have its contribution pushed beneath the island gradients. Then you may have to still mask the areas where the direction sharply goes opposite directions.

Just tried to do that last part but for the life of me I can no longer find out how to “Apply layer style” and “rasterize layer” is greyed out (wtf)… hmmmm I used to do both of those things all the time.

(edit: found how to bake image style. for some reason they decided to needlessly rename that to be layer style-> create later. why must they do this, that name doesn’t even make sense :P)

Thanks for the nice tutorial!

Regarding distance fields and Gerstner waves, or 3D water is general, I recently started looking into the topic and bought the Physical Water Surface from the Marketplace, which is a straight Gerstner Sum of some 19 components as I remember. I works really well with the distance field based foam using the DistanceToNearestSurface node and then some material node magic on top of that. Really nice organic foam while the waves are going up and down around objects. Will post a little video when the shader is somewhat final.

Yep you’re right, didn’t know about this at all. :wink:

Thank you for such an in depth explanation Ryan, I can see this being useful for much more than just water. Going to put this on my to do list and try it out asap. Thanks!

I tested the distance field based approach and at least for us it is the way to go. Thanks for pointing me to it. To be honest, a week ago I did not know the distancetonearestsurface node even exists :slight_smile:

1:50 with the foam grawling under the rock is the stuff!

How goes with this project? Were you able to solve the?