Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PerlinTerrain

This is a test project which I made to play around with perlin noise for terrain generation. Excuse me since I can't guarantee that the buildsystem is cross-platform (It was a test project so I didn't integrate a proper cross-platform buildsystem).

The language I am using is C and am rendering using OpenGL and GLFW. For perlin noise algorithm, I am using stb_perlin since it is quite a popular single header library.

Development environment

The platform I am using :-

  • Windows 10, 64-bit
  • MinGW-W64 14.1.0
  • Buildsystem is Make

Features

  • Generated the heightmap using stb_perlin
  • Rendered a small piece of flat terrain
  • Used the data from the heightmap on the terrain's vertices
  • Generated the surface normal for each triangle of the terrain and did some diffuse lighting
  • Can change parameters of the app using command line arguments.

Controls

  • W, A, S & D for movement
  • Space for going up (relative to the camera)
  • Left Shift for going down (relative to the camera)
  • Hold B for wireframe mode
  • R for reloading shaders (For devs)
  • G for regenerating the heightmap and the terrain (1s cooldown after each use)
  • Escape to exit
  • Right click to move the camera with mouse

Glimpses

Heightmap Terrain with diffuse lighting Terrain in wireframe mode

About

A test project for using perlin noise for terrain generation

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages