Skip to content

An infinite procedural terrain, done in C++ with OpenGL

License

Notifications You must be signed in to change notification settings

lromerio/ProceduralTerrain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Procedural Terrain

Water

Description

An infinite procedural terrain, done in C++ with OpenGL. Developed in the context of the course CS-341 Introduction to Computer Graphics at École polytechinque fédérale de Lausanne (EPFL).

Here you can find a short video demo of the project.

Getting Started

You should have at least OpenGL 4.1 installed on your computer. Then all needed libraries are included in the external folder.

To build and run the project execute the following commands:

mkdir build
cd build
cmake ..
make
cd project
./project

Features

Terrain

  • Infinite generation
  • Ridged multifractal perlin noise
  • Tessellation shaders for level of detail rendering
  • Distance fog

Texturing

  • Distance and normal based blend
  • Mimap textures

Sky

  • Cubemap texture
  • Day and night cycle

Water

  • Normal mapping for wave simulation
  • Sky and terrain reflection
  • Simple distorsion

Controls

The project is provided with a simple GUI done using the imgui library. It allows to tweak parameters and changing camera mode between the six available, which are described here below.

Custom

Use W A S D keys to move around the terrain, drag with the mouse to change the view.

Flythrough

Use W and S to move forward and backwards, A S Q Eto move rotate the camera respectively left, right, up and down. When in flythrough mode all camera movements have an inertial behaviour.

FPS

The commands are the same as for the Flythrough camera, but in this camera mode you are always on the terrain level.

Prerecorded Bezier

This camera mode follows a prerecorded Bezier path. You can increase/decrease the camera speed pressing W/S.

Record Bezier

Move the camera as in Custom mode, press R to record a Bezier control point.

Bezier

After recording a Bezier path in the Record Bezier mode, this camera follows it. Again you can increase/decrease the camera speed pressing W/S.

License

MIT licensed, details in LICENSE.md

Authors

Other Screenshots

Tessellation Texture

About

An infinite procedural terrain, done in C++ with OpenGL

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published