A simple linear blend can help things seem more natural, from animation, to sound, decals, and terrain.
Our level designer recently added a mountain under the mountain temple level. It looked, great, except for the nasty transition between the path and the mountain side.
The engine has a great decal system, but it's not set up to blend with tileable texures like the ground or mountain - it's for spot effects. One could use decals to lay out a path by splatting one or more decal texures along it, but with a grassy texture, the repeating would be pretty obvious.
I had been thinking about layers for a long time, and an earlier version of the engine supported up to 2 layers on every texture, with the blend map stored as part of the main lightmap texture, but support for this was dropped, as it wasn't worth maintaining for the very small use it would see, plus the editor had no way of specifying the blend factors or handling layers.
So, over the past week my partner and I took a few minutes here and there during builds to come up with a better way to do blending for the path->mountain case. When I woke up at 4:30 am the yesterday for some reason, I felt I was ready to tackle it, and managed to get it in there, tested and fixed in about 5 hours or so total.
It works like so - each material has a float called 'blend under' and one for 'blend over', each of which default to 0. Floor type textures that may bleed over other nearby surfaces are given blend under and blend over of 1. Floors made of stone or marble, would have a blend under of 1, but a blend over of zero - who ever heard of overgrown marble?
Then, at level export time in the editor, for each triangle with a blend over > 0 - let's say 'sand' - it finds all neighboring tris with a different material, and with a blend under > 0, and a blend over < than the sand material we're currently doing. If the triangle is not facing to the side too much, it is saved as part of the 'blend mesh' for this material. The blend mesh has texture coordinates calculated as if it were part of the sand, although it occupies the space of the triangles just bordering the sand tris. The vertices of the blend mesh tri that touch the sand texture are given an alpha of 1, and the other vertices get zero. This provides the smooth gradient.
At runtime, each material with some tris to blend, called a blendmesh, has its bounding box culled vs the frustum. If it's partly visible, it is blended in after the main terrain is drawn, but before decals are applied. After a few tweaks to materials, it looks pretty good.
Right now the blending is purely linear, but I'm prepared to modulate in a noise texture as well if it becomes noticeable. Right now the textures involved are fairly noisy themselves.
Here are a couple of before and after shots :