GithubHelp home page GithubHelp logo

zhangjiangen / roam-terrain-generator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sksharan/roam-terrain-generator

0.0 0.0 0.0 256 KB

Experimenting with infinite terrain generation using ROAM level of detail

License: GNU General Public License v2.0

CMake 27.42% C++ 69.20% GLSL 3.37%

roam-terrain-generator's Introduction

roam-terrain-generator

roam-terrain-generator is an experimental program that generates infinite landscapes using a modified "split-only" version of ROAM for level of detail (LOD).

Features

  • Uses a chunking algorithm to generate infinite terrain
  • Uses ROAM algorithm to determine LOD for each terrain chunk
  • Multithreaded implementation allows terrain LOD to be updated efficiently
  • Applies textures procedurally based on the slope of the land
  • Generates grass blades with instancing (previously done with a geometry shader)

Setup and Build

Place any images called dirt.jpg, grass.jpg, grass_blades.png, and rock.jpg into TerrainGenerator/textures. These textures will used when rendering the landscape. (Some potential textures: dirt, grass, grass-blades, rock)

This project has the following dependencies:

  • OpenGL 3.3
  • SDL 2.0.7
  • GLEW 2.1.0
  • GLM 0.9.8.5
  • libnoise
  • Simple OpenGL Image Library (SOIL)

CMake 3.8+ is required to generate the build files. From the top-level project directory, run the following commands:

mkdir build
cd build
cmake ../

Dependencies are resolved using CMake's internal Find scripts and custom Find scripts in the cmake directory. If a dependency cannot be located, try modifying the paths in the top-level CMakeLists.txt.

Controls

  • Mousemove: Look around
  • W: Move forward
  • A: Move left
  • S: Move backward
  • D: Move right
  • E: Switch between walk mode and fly mode
  • R: Toggle wireframe mode on/off
  • Spacebar: Fly up (fly mode only)
  • Shift: Fly down (fly mode only)
  • ESC: Exit the program

Notes/Limitations

  • Cracks can form in the terrain due to differences in level of detail between terrain chunks.

Images

Wireframe for a single terrain chunk with the greatest number of triangles in the lower left corner (where the viewer would be located):

ROAM Wireframe

roam-terrain-generator's People

Contributors

sksharan 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.