This was a project done in relation to an exam I had in IMT2531 Computer Graphics at NTNU Gjøvik. It is an OpenGL implementation in C++. Content of the README from the repository can be seen below:


Graphics exam done in OpenGL for IMT2531 at NTNU


To build:

  • Clone repository
  • Run CMake
  • Set solution properties to single startup project “GraphicExam” (Visual Studio)
  • Build with compiler (Debug, Win32)

Note: CMake probably only works on Windows, and I have only built with Visual Studio with CMake

To run from .exe:

  • Go to folder Executable -> Release
  • Run GraphicsExam.exe



  • - Cycles between camera modes (Glider, First-Person Glider, Free-Roam, and Restricted-Cam)
  • I Forward (Free-Roam) or Z movement (Restricted-Cam)
  • K Backwards (Free-Roam) or -Z movement (Restricted-Cam)
  • J Left (Free-Roam) or X movement (Restricted-Cam)
  • L Right (Free-Roam) or -X movement (Restricted-Cam)
  • Y Y movement (Restricted-Cam)
  • H -Y movement (Restricted-Cam)
  • Zoom in and out with scroll-wheel
  • Move mouse around to change view orientation


  • W Pitch Up
  • S Pitch Down
  • A Roll Left
  • D Roll Right
  • , Increase speed
  • . Decrease speed
  • R Reset to original position
  • F Teleport to new random position

Seasonal Change

  • 1 Toggles ‘Winter’
  • 2 Toggles ‘Spring’
  • 3 Toggles ‘Summer’
  • 4 Toggles ‘Autumn’
  • 5 Pauses seasonal change
  • O Toggles contour lines
  • Increase lerp on zones
  • Decrease lerp on zones

Time Change

  • 6 Toggles ‘Night’
  • 7 Toggles ‘Morning’
  • 8 Toggles ‘Noon’
  • 9 Toggles ‘Afternoon’
  • 0 Pauses time change

Feature List


  • Loading heightmap with usage of stb_image
  • Showing proper vegetation with smooth transitions between zones (water - grass - mud - snow)
  • Contour lines can be toggled


  • 3rd person Glider mode
  • First person Glider mode
  • Free-Roam mode
  • Restricted-Movement mode
  • Zoom in/out

Seasonal / Time-of-Day change

  • Seasons cycle automatically between Winter - Spring - Summer - Autumn
  • Season and month is printed on top left corner
  • Time-of-day cycles between Night - Morning - Noon - Afternoon
  • Time-of-day is printed as a 24 hour clock on top right corner
  • Rising water levels in Spring


  • Glider model loaded with .obj (extracted with blender from the .blend file)
  • WASD for controls (Pitch and roll)
  • Speed increase with ‘,’ and decrease with ‘.’
  • 3rd person and First-Person perspective, change with ‘-’
  • ‘F’ changes the current position of the glider to a random position
  • ‘R’ resets the glider position to it’s original position
  • Glider showing proper specular lighting

Some additional

  • ‘Skybox’ rendered around everything
  • ‘Up’ and ‘Down’ arrows changes the interpolation value between zones



Heightmap Loading

Heightmap Loading

Heightmap Loading


Assimp Materials

Calculating ‘up’ vector from rotation

Blending for transparency