SOLVED Terrain painting itself with given textures in view of its height / deep / average

Hello guys,

first of all, im gonna try to explain my problem a bit more exclipicit:

  1. I got an terrain object in my Unity Editor.
  2. I made a heightmap for it in PS and put it in - works nicely, see first screenshot.
  3. Now I am looking for a script, that paints my terrain with given textures automatically with these rules:
  • very high parts of the terrain should be painted white (white texture)
  • high parts yellow
  • average or normal height parts orange
  • parts under the average red
  • very deep parts black

I already found a script, that could help me:

I think that im looking for a splatmap or something like this.

Do you have any idea or any solutions ?

Thank you, Louis

I found the solution: