Flat map, dirt and grass texture
Height map, snow texture
I took a smarter approach to height this time around, I created a HeightMap class, which can load an 8 bit raw image file (like the kind that terragen exports and that photoshop can read) this file format is very very simple, AND with photoshop has good tool support so I chose to use it as our heightmap source.
this class loads and manages the heightmap, and provides a 'sample' method, which allows you sample part of the heightmap via u,v coords (0 to 1) and returns a 0 to 1 value.
I am going to offer this class as freeware to any who would like to use it; it will require a bit of modification to fit your needs but it should be minimal.
unsigned long size;
unsigned char* data;
float sample(float u,float v);
unsigned long length=in.tellg();
data=new unsigned char[length];
Message::showProblem("Unable to load height-map '"+rawFile+"'.");
float HeightMap::sample(float u,float v)
unsigned int x=(u*(float)(size-1));
unsigned int y=(v*(float)(size-1));
unsigned char s=data[y*size+x];
Now that I have a well-developed tiled terrain the next step is to add splatting, which I will document when I have it working.