(Yet another) Terrain Algorithm

About tiles/chunks: All (TerrainTesselaotr, PGMM, SORAX) do only render the terrain. That means, take a function height( x, y ) as input, usually in form of a greyscale image, and produce a mesh as output. Nothing else. The big trick is to create terrain with few vertices and triangles, to have better performance (FPS).

It is up to you to prepare heightmaps (images) which fit together. Usually you don’t paint such a heightmap directly with e.g. a paint program, but you use so called “terrain editors” to interactively model your terrain. Some of them can produce tiling terrain, others not.

The most easy way to create tiles which fit together is to first create a single heightmap of all the terrain, and then cut this heightmap in pieces, usually with an overlap of one pixel. There is no randomness in such a tiling process.

The only part where random comes into play is that some terrain editors/generators use various random-based algorithms to create a first draft of the terrain (diamond-square, perlin, …). For a game you might want to edit this terrain, lower it in some places, flatten it somewhere else to place buildings, dig rivers, erode mountains, and so on…

About camera stuff: do you mean the code to switch between different cameras (if I remember right: distant observer and tracking camera), or do you mean the code that implements a third-person tracking camera?

enn0x