Terrain Lab

In this lab you will turn a heightmap image into a terrain that you can traverse with a first-person camera.

Terrain

Your first challenge is to load a terrain into your scene. Follow these steps:

Read in a grayscale heightmap image. Generate this image yourself in an image editor like the The GIMP or Photosop.
Make a Terrain class as described in the readings and use the heightmap's grayscale values to instantiate a terrain.
Turn the terrain into a trimesh.
Render the trimesh with diffuse shading.
Show your terrain to your instructor to receive credit.

Camera

Your second challenge is to add a first-person camera that can walk across the terrain. Follow these steps:

Make a TerrainCamera subclass as described in the readings.
Plop the camera down in the middle of the terrain, setting its height according the terrain's blerp method.
Strafe and advance the camera with the WASD keys.
Pitch and yaw the camera with the mouse.
Show your instructor your working renderer to receive credit.