It turns out this question has been asked in the forums.
Using 16bit heightmap in material to recreate landscape
The Epic ‘Kite Demo’ has Terrain Heightmap sampling from a Material applied to static mesh on the rivers and lakes in the sub level maps.
For best results the height map needs to be 16 bit .png (can use 8 bit but that may cause stair stepping ).
Load the .png Heightmap as HDR (RGB, no sRGB) compression. In the material your Heightmap sample type should be ‘Linear Color’ and sample from the Red channel.
Here is results I got on the kite demo asset ‘SM_Scree002b’ rocks. I exported the FBX and painted the the vertices that the terrain blending would effect. You can just paint the vertices per-instance in the Unreal Engine Editor.
I also set the material blend mode to ‘Masked’ and checked ‘Dither Opacity Mask’ and used the painted vertices to set the ‘OpacityMask’ material attribute. The result is a decent blending to the terrain that looks good from both a standing and crouched position of the player. A player in prone position would see some blending artifacts but its good enough for in game imo.
Here is the material nodes, I got the UV calculation and Heightmap lookup from the ‘KiteDemo’.
Your ‘HeightmapScaleZ’ and ‘TerrainOffset’ will differ, I found mine through trial and error. Subtracting ‘Absolute World Position’ locks the height to your terrain, so what ever your vertices world Z is, this node graph will give you an offset to your terrain. The ‘MakeFloat3’ vector plugs into your materials ‘WorldPositionOffset’ attribute. The ‘KiteDemo’ has this graph as a material function, great idea, I am going to do the same so it can be easily applied in any material.
If you don’t have your height map or have modified one with sculpting, the Unreal Editor can export it for you in 16bit ‘,png’ format.