Before you start

This assignment uses the OpenGL graphics library together with a cross-platform OpenGL windowing library called GLFW and an OpenGL extension manager called GLEW. It also uses CMake for building. Download any of these that you do not already have. It should be possible ot do this project on Windows, Mac or Linux. If using Linux, you may also need to download a driver for your GPU from the GPU manufacturer, if the generic driver does not support the features we need.

The base code has been pushed to a GLapp directory in your class repository. This includes cmake files to try to find GLFW and GLEW. If you install them in your user directory or a place it can't find, be sure to set the GLEWDIR, GLFW32DIR, and GLFW64DIR environment variables before running cmake. There is a GUI for cmake, but I always run from the command line (Windows, Mac or Linux, all starting in the GLapp directory):

Linux (or Mac using Makefiles)

mkdir build
cd build
cmake ..
make

Windows Visual Studio

mkdir build
chdir build
cmake -G "Visual Studio 15 2017 Win64" ..
GLapp.sln

Mac Xcode

mkdir build
cd build
cmake -G Xcode ..
open GLapp.xcodeproj

Try the sample code well before the assignment due date to make sure you can get it to run.

The Assignment

hexagonal triangle grid For this assignment, you will be using OpenGL to create a simple interactive view of a procedurally modeled scene. The sample OpenGL application creates a terrain on a rectangular grid based on data from an image. You will create a fractal landscape using an fBm sum of noise functions on a regular hexagonal grid. The landscape itself should be rendered as triangles in a height field; each vertex having a unique x,y, with z provided by the fractal function. Use a sum of octaves of the provided Perlin noise function to create your fractal height. Compute everything you need to render once, when you generate your landscape. During your rendering loop, you should only be responding to user interaction and rendering using pre-computed data.

634 only

Students registered for the 634 version of the course should make a multifractal landscape, with varying roughness at different points in the landscape. You may choose to vary the roughness based on whatever you like (altitude, slope, color code from an external file, or anything else that comes to mind).

What to turn in

Turn in this assignment electronically by pushing your source code to your class git repository by 11:59 PM on the day of the deadline and tagging the commit assn3. Do your development in the GLapp directory, modifying the sample code.

Also include an assn3.txt file telling us about your assignment. Include your name and campus ID at the top of this file. Do not forget to tell us what (if any) help you received from books, web sites or people other than the instructor and TA.

Check in along the way with useful checkin messages. We will be looking at your development process, so a complete and perfectly working ray tracer submitted in a single checkin one minute before the deadline will NOT get full credit. Individual checkins of complete files one at a time just before the deadline will also NOT get full credit. Do be sure to check in all of your source code, Makefile, README, and updated .gitignore file, but no build files, log files, generated images, zip files, libraries, or other non-code content.