Giter Site home page Giter Site logo

lromerio / proceduralterrain Goto Github PK

View Code? Open in Web Editor NEW
11.0 3.0 4.0 27.44 MB

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

License: MIT License

CMake 0.47% C 30.89% C++ 67.48% GLSL 1.16%
procedural-terrain computer-graphics school-project epfl

proceduralterrain's Introduction

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

proceduralterrain's People

Contributors

atobywankenobi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.