lragnarsson / Emerald-Engine

3D graphics engine using OpenGL
MIT License
66 stars 21 forks source link

Terrain generation from heightmap #96

Closed hansfilipelo closed 8 years ago

hansfilipelo commented 8 years ago

This PR adds the ability to use terrain generated from heightmap. Terrain is loaded by scene loader by the following line:

path/to/terrain/folder | plane_scale height_scale

The terrain folder must contain:

heightmap.png # 8-bit/pixel (grayscale)
albedo.jpg # Texture
normal.jpg # normal map
specular.jpg # Specular map

The scene file res/scenes/terrain_demo.txt is modified to load the terrain included in repository.