Skip to content
This repository has been archived by the owner on Jan 20, 2019. It is now read-only.
/ fractal-terrain Public archive

Fractal-generated terrain in OpenGL, using the diamond-square algorithm

Notifications You must be signed in to change notification settings

monovertex/fractal-terrain

Repository files navigation

Fractal Terrain Generation

Overview

This project is a college assignment which contains a fractal generated terrain with various levels of tessellation. It also has a functional Phong lighting system and infinite world.

For more information about the fractal algorithm used, view this document.

For more project details and work in progress screenshots, view my blog posts: #1, #2, #3.

A short video can be seen here.

The project is written using OpenGL, GLEW, freeglut and a framework provided by the professors (everything starting with the "lab_" prefix).

Note: this project is not in active development.

Usage

  • W - move camera forward
  • A - strafe camera left
  • D - strafe camera right
  • S - move camera backwards
  • Mouse - move camera on Y / Z axes

  • I - move light system forward
  • J - move light system left
  • L - move light system right
  • K - move light system backwards
  • U - move light system down
  • O - move light system up

  • Q - add a new light
  • E - toggle lights between point and spotlight

  • Z - toggle fog on and off
  • X - re-load shaders
  • C - turn lights on and off
  • Space - turn wireframe drawing on and off

  • 1 - basic map (flat)
  • 2 - fractal map, no tessellation
  • 3 - fractal map, 1x tessellation
  • 4 - fractal map, 2x tessellation
  • 5 - fractal map, 4x tessellation

  • F1 - fullscreen
  • F2 - exit fullscreen

Compiling

To compile the project you need to make sure to link the libraries freeglut.dll and glew32.dll. Also remember to include the folders.

This project was initially created using Visual Studio 2013, but I did not include the project files for obvious reasons.

You will also most probably require the two .dll libraries inside the folder where your executable resides.

About

Fractal-generated terrain in OpenGL, using the diamond-square algorithm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published