GLSL Terrain Assessment
This document outlines the requirements of a terrain rendering prototype you must write using C++/SFML/GLSL.
This can be two person project, you are free to choose a project partner. You MUST show a work break-down between the two team members. All parts need to be complete.
You can do this project on your own, in which case you need only do parts 1,3,4,5,6,7,8,9 & 10.
Requirements
(I strongly recommend that you tackle these in the given order)
- Use opengl to create a square mesh/grid with at least 2000 triangles lying on the x-z plane (i.e. a 100 x 100 grid of squares)(take note of part 10 when doing this)
- Add a key stroke function which will change subdivisions of the grid to be 10x10. This should not change the overall size of the mesh
- Implement a free camera
- Each vertex on the grid should have an appropriate texture coordinate using glTexCood2D()
- Render your grid using a minimal shader
- Create a smooth greyscale height map of your own design, it should incorporate mountains & valleys. There should be a flat area representing sea/water(about 25% of overall) with a value zero (pure black). There must be at least some areas with values above 0.95 (mountain tops)
- In a vertex shader, modulate the y-coordinate of each vertex to be proportional to the value of the corresponding textel in the height map.
- find or create 3 texture maps (sea-surface, grass, snowy-rocks)
- apply all 3 of the texture maps to the surface only in the following areas
- sea-texture in vertices where the height-map value is below 0.1
- grass-texture where height-map value is between 0.05 and 0.75
- snowy-rocks where height-map value is above 0.6
- add a light source (not positioned directly overhead) and add diffuse lighting to the scene
- add easy to see specular light to the area of sea texture (nowhere else)
- lighting should be “per-pixel”
- areas where two textures overlap, there should be a blended transition
Marking
This assessment will be worth 10% and will be marked separately by code review and a mini-viva.
Handup
Due Date 5:00 pm, Monday 24th February, via github
Marking
This assessment will be worth 10% and will be marked separately by code review and a mini-viva.
I expect that the work will be distributed equally among the team members.
Keep a log of who did what in the group. Note that the final end-of-year exam
will feature some questions based on the problems you will have encountered
during this project.