Coder Social home page Coder Social logo

terrain-gen's Introduction

Terrain Generator

Introduction

A very simple procedural terrain generator, created as a weekend project with C++/OpenGL. Terrains can be updated in real-time or through a configuration file. Afterwards, terrain meshes can be exported to OBJ files.

Images

Features

Current Features

  • Procedural terrain generation w/ perlin noise
  • Color multiple terrain types by height
  • Export mesh to OBJ (no materials)
  • Default settings configurable with config file

Future Enhancements

  • Textures w/ triplanar mapping
  • Chunking w/ LOD
  • Normal maps
  • PBR shading
  • Better controls; e.g., sliders, displaying noise textures

Getting Started

Compilation

  1. Clone the repository
  2. Generate GLAD loader files
  3. Build with CMake

Building

Currently only Linux builds have been tested. You must have the glm and glfw3 packages installed. Configure the project with CMake, and then compile the source:

mkdir build
cd build
cmake ..
make

Configuration

Please see the sample config.txt for examples on how to configure the default terrain settings.

Usage

Key Bindings

Keys Action
1/2 Adjust Amplitude
3/4 Adjust Frequency
5/6 Adjust Persistance
7/8 Adjust Lacunarity
Z Stop camera rotation
F1 Toggle wireframe
F2 Toggle flat shading
F5 Refresh config.txt
F12 Export OBJ mesh

terrain-gen's People

Contributors

christianzski avatar

Watchers

 avatar

Forkers

kushal1440

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.