Landscape texture depends on height

Hi,
How can I make landscape with auto-match texture based on heightmap? For example on 3:34 :

Thanks for your reply,

what you’re seeing in the promo video isn’t blending based on height, it’s blending based on angle (some engines call it slope) I haven’t with Ue4’s terrain/landscape materials much but shaderwise - what’s going on is it’s lerp-ing between two materials and the lerp’s mask is being driven by the angle. so like if it’s <40 degrees draw sand if it’s >40 Degrees draw rock. etc. I hope that helps.

maybe this will help you too