15th November 2008:
Since university started, I thought I'd have no time to work on any little side-projects but then I managed to get myself a final year project on terrain LOD algorithms :). I removed the whole fish shoal thing from the code for now and concentrated on the terrain. I switched back from a randomly generated heightmap to loading it in from disk as a texture. Then I used Digital Elevation Map data retrieved from the space shuttle's Shuttle Radar Topography Mission to generate a heightmap image of Iceland. The actual data I used was pre-processed by someone to fill in holes.
After getting the heightmap generated, I manipulated it to smooth off the edges where appropriate. Then I used the same data set to generate a slope-map of the same area and used this data to determine what proportion of each texture that partcular vertex has. Rather than using height to determine the texture then, it uses inclination of angle at that point in the terrain. Flat areas are therefore greener and angular, rocky areas tend to have rock and snow on them. Next, I applied special conditions for heights around and below water level to make them use more of the sand texture and a condition to add snow-caps to high peaks.
The final result is impressive, if I do say so myself.
03rd September 2008:
After completing the tutorial, I went on to develop a random terrain generation method which generates heightmap values dynamically. The algorithm is based on this one. I came up with some variant algorithms to generate different types of terrain such as shores. I practiced importing and placing models on the terrain, which turned out to be very simple. From there, I created a class of object called a swarm which is designed to mimic a shoal of fish. Each fish moves forward at its own pace and randomly changes direction slightly in the X, Y and Z axis. When fish stray too far from the shoal, they swim back in toward the centre. When fish are pointing more than 20 degrees away from the direction the shoal is moving, their heading is corrected back again. The result is a coherent shoal of fish.