I have a tile based game where the terrain is made up of combination of eight(8) tiles (grass, sand, alphalt, dirt,water etc.)
I have figured out a quick easy way to create edge transitions giving each tile type a priorty (grass is highest, water is lowest) and using grayscale masks
but it only works for top, bottom, left and right edges.... I cannot figure how to make the corners look good.
This is most probematic when a corner has multiple types of terrains involved.
99% of the "tutorials" on the web talk about terrain consisting of two types of tiles (grass and water).. I need at least 3 (grass, sand, water) but would prefer the 8 I have.
I have come up with two concepts.... but am still perplexed about handling corners.
+---+---+---+
| 1 | 2 | 3 |
+---+---+---+
| 8 | X | 4 |
+---+---+---+
| 7 | 6 | 5 |
+---+---+---+
Assuming "X" is the tile being analyzed.... my first idea would be to examine the 8 neighbors and create a mask to apply to "X" that would allow each of its neighbors to encroach inside "X"
The other would be to create masks to have "X" encroach outside onto each of its neighbors
But either way... the corners are the issue. If 2,3 and 4 were all the same terrain ... no problem... but if each were different..... then what do you show? and how do you show it?
My terrain tiles are 102 x 102 pixels so I have enough resolution to work with.

Any specific help would be great!
and gee.. if anyone even felt like taking my tiles and writing a little demo....

here is a partial screenshot of what I have so far (as you can see it REALLY needs some blending)

Note.. the TRACKS are a layer all their own.... so there is one image of TERRAIN tiles (above) and another for TRACK (and soon to be another for Buildings and bushes)
The (hopefully) end result will be a virtual "toy" train set. Build your layout.... place your trains. Drive them around the layout... all without losing 3/4 of your garage.