Skip to content
Snippets Groups Projects
Commit 31b0108f authored by JonShard's avatar JonShard
Browse files

Expanded readme.

parent 6386e6e0
Branches
No related tags found
No related merge requests found
......@@ -6,5 +6,84 @@
Home exam in IMT2531 - Graphics programming.
Jone Skaara - 473181.
The task for this exam was about loading a grayscale heightmap from file, generating a 3D terrain and redering it in a scene alongside a glider airplane. The airplane is controlable with WASD. There is also a freelook camera in the scene, controlable with IJKL-YH. The terrain will, change it's zones of different color based on a season value.
There is also a day-night cycle.
## Install instructions
### Install Clang++ 5 (allowing c++17 features to be compiled)
sudo apt-get install clang++-5.0 # Make sure to have an updated version of stdlib++.
# Install python3 (NOTE: a lot of ubuntu distros already come with this)
sudo apt-get install python3.5
#Remove previous installations of cmake
sudo apt-get remove --purge cmake
mkdir ~/temp # make a temp folder for the cmake binaries
cd ~/temp
wget https://cmake.org/files/v3.11/cmake-3.11.0-Linux-x86_64.tar.gz
# unzip the binaries
tar -xzvf cmake-3.11.0-Linux-x86_64.tar.gz
cd ~/temp/cmake-3.11.0-Linux-x86_64/
#place the binaries
cp -r ./bin /usr/
cp -r ./doc /usr/share/
cp -r ./man /usr/share/
cp -r ./share /usr/
cmake --version # verify the new installation:
# expected: cmake version 3.11.0
rm -r ~/temp # cleanup temp directory, it's no longer needed
git clone http://prod3.imt.hig.no/JonShard/imt2531-assignment2.git
cd imt2531-assignment2
cp ../docs/config.example.yml config.yml # Copy default config to build.
mkdir build
cd build
cmake .. -DCMAKE_CXX_COMPILER=clang++-5.0
make
./exam assets/scenes/terrain.yml # Load terrain scene.
## Controls
W - Pitch plane down
S - Pitch plane up.
A - Yaw plane left.
D - Yaw plane right.
R - Reset plane position.
F - Move plane to different positions on the map.
. - Increase plane speed.
, - Decrease plane speed.
- - Change camera (Freelook noclip camera, locked third person, locked cockpit camera).
1 - Set season spring.
2 - Set season summer.
3 - Set season autumn.
4 - Set season winter.
5 - Toggle seasons moving.
6 - Set time morning.
7 - Set time noon.
8 - Set time afternoon.
9 - Set time night.
0 - Toggle daytime moving.
O - Toggle terrain zones debug mode.
M - Zoom in.
N - Zoom out.
I - Move freelook camera forwards.
K - Move freelook camera backwards.
J - Move freelook camera left.
L - Move freelook camera right.
Y - Move freelook camera up.
H - Move freelook camera down.
Left-mouse-button + move mouse inside window - Rotate freelook camera.
## Other remarks
The mapping to the minus key is different in the glfw key enum. I mapped the minus key to the period key +1. That maps correctly on Norwegain keyboards.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment