Pages

Evenhelm Pitch

    • Pitch
    • Requirements
    • Environment

Homework 1

    • Description
    • WebPlayer

Homework 2

    • Description
    • WebGL Version
    • WebPlayer

Other Pages

   • Home

HeightMap Assignment

This is the HeightMap assignment. Since the heightmap used is the same heightmap from the first assignment, the Unity portion will be simply reused from the original Homework 1, in which you can find buildings and a lake and that strange yellow sky. In the WebGL version, please walk forward to see the actual mountains behind the look distance fog.

I put a lot of work into the WebGL portion of the homework, including a fancy camera system, texture blending based on height, which I don't think I exactly calibrated correctly, and a custom loader that takes 16-bit single channel greyscale RAW heightmaps. Raw files are actually offset by one byte, which holds some secret information no one knows about, so the assignment was especially painful until I found out about that factor.

The loader uses AJAX to retrieve the HeightMap from the webserver. The version used for the WebGL project is 256x256, and it looks fairly decent. The HeightMap class handles loading the data and building all the various buffers for the HeightMap, while the Screen class handles displaying it all. There is a Texture2D class for loading textures, as well as an Input class which, as it's name implies, handles input for the program. The Camera class tracks camera rotation and translation, and it's handed to the Screen object to calculate the Model View matrix which indicates where the camera should face, and where it is.

Due to the difficulty with the file, this program represents three weeks of my life. I'm glad it's ready for a turnin, now though. The result is pretty decent. Controls are shown on the WebGL page under the WebGL canvas, so enjoy!

AGDD at UNC Charlotte Created by J. Bobby Soles Maintaned by A. Chaffin All rights reserved