I’m creating terrain using heightmaps. However, I have a few questions about heightmaps.
- How are triangles constructed from the heightmaps? Is this correct: for each pixel, a square is created with that pixel and the pixels adjacent to the right, to the bottom, and to the right-bottom, and the resulting square is split into two triangles.
- How many triangles are produced per pixel? Would a 4096 by 4096 image have 4 times the triangles of a 2048 by 2048? Is a 4096 by 4096 viable in terms of performance on a typical computer?
- A large part of my heightmap is flat terrain. However, I notice that TerrainQuad does not optimize and uses the same number of triangles for perfectly flat terrain as it does for rocky terrain. Is there an inbuilt way to optimize this, or is there a simple way for me to extend TerrainQuad and add that functionality? Or is there some other, more efficient way to represent this terrain?
- I’m using the alphamap/terrain splatting technique. Is there a way to adjust the “sharpness” or “blurriness” of the splatting at boundaries between textures? eg. I want one terrain, specified by one of my alphamap colors, to have minimal splat.
- Can multitexturing and the alphamap/splat technique be combined?