Skip to content
Permalink
3448625469
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time

Session 6 - Terrain Generation

Table of Contents

  1. Base project
  2. Terran generation
  3. Change models
  4. Change camera

Base project

The base project can be downloaded from this week Github folder. which contains the TerrainShaderized Visual Studio Solution to get you started with the modern version of OpenGL. The project uses the libraries: GLM, GLEW and freeglut. The project contains initialisation code to create a window and to draw a flat height map. Compile and run the code and check that you get the grid shown below.

Make Sure, the project Configuration is set as 'x64' (NOT 'Win32').

baseProject picture

Terran generation

The instruction for lab task can be found in "Workshop 6B Instructions.pdf".

Hint: The random function with range from -1 to 1 should be expressed as

	h1 = (rand() % 10) / 5.0 - 1.0;

The final result should like this:

Finalresult picture