Landscape material using the same heightmap that I used to create the landscape component to dictate where my rock, grass and dirt material get painted instead of painting it by hand

Hello, I was wanting to create a landscape material that used the same heightmap that I used to create the landscape component to dictate where my rock, grass and dirt material get painted instead of painting it by hand. I have been looking around but have not been able to find a proper tutorial.

In your material graph, grab the vertex height using a “WorldPosition” node, and then do some math with that value to blend between your different landscape layers or texture input.