The shader used in my terrain editor actually functions similarly to the default Urho3D terrain shader, just with modifications. It has 2 blend textures (used as 8 greyscale channels) which are used as interpolants to blend from among the 8 tiling detail textures, which are held in a texture atlas. The height channel (alpha channel of the detail textures) is used as a further factor in the blending, to avoid ‘smooth’ gradient blends between terrains. Instead, ‘lumpy’ blends are done, where height differences can give a greater weight to a particular texture. This can, for example, make rocks protrude through grass and soil, rather than just smearing a direct linear blend between them. A later iteration of the shader introduces tri-planar mapping, which projects the detail textures onto the terrain along each of the 3 cardinal axes, and blend among the 3 using the terrain normal, to eliminate the stretching that comes from draping the detail textures like a blanket onto the terrain, projecting along the vertical axis only.
Essentially, the shader associates one channel from the 2 blend textures for each of the 8 terrain types. So, R from blend0 weights the first of the 8 detail terrain types (a dirt texture, in the application), G weights the second (a different variety of dirt), B weights the third (grass), and A weights the fourth (sand). Similarly for blend1 channels and the last 4 detail textures.
After the weight for a particular channel is obtained from the blend maps, a further modification is performed using the height (obtained from the detail texture’s alpha channel). This height is typically the same displacement map used to generate the detail texture’s normal map. It is used to offset the linear blend weight factor for the terrain type. Areas where the height of a particular detail texture is high end up being weighted more than areas where another detail texture is low height, if the weight factors are equivalent. This forces the ‘lumps’ of a detail texture to protrude through lower surrounding terrain, giving rise to the effect. Image
There is no overall diffuse map to break up the tiling on a macro scale, unfortunately, so the terrains look quite repetitive from a distance. However, this can be mitigated somewhat due to having access to 8 different terrain types. In earlier versions, I did implement the technique described in the UDKTerrainAdvancedTextures document, of blending the terrain detail back into itself at a larger scale (the section titled Multi-UV Mixing: Reducing tiling through scalar mixing), but with the 8 terrain types + tri-planar this becomes quite exceptionally heavyweight, and my potato is just too potato to handle it well.
Urho’s materials system is not nearly as advanced as UDK, so while you can accomplish what you desire with Urho, be prepared to do a lot of the grunt work of shader writing yourself. The ‘default’ Urho terrain material is suitable for simple demos, but is not powerful.