Striving for Photorealism in UE4

Hi guys. I have reproduced the material with which creates the landscape in the video of Quixel Megascans.

I would like a little help to finish it from if it can be or another person who knows how to solve two missing functions.
WS_Variation and Height_Mask

I attach two compositions but I think they are not right.