CMPS-3480 - Computer Graphics
Terrain generation using Perlin Noise, by Joshua Garibay
Features:
- OpenGL
- Procedurally generated terrain
- Camera movement with collision
- Sun lighting
- Color variation based on height
Finished result
10/24/25 - Basic movement working
Set up initial scene with some cubes using lab-6 as a framework. Used spaceship framework to get some basic movement with keyboard to work with the x11 window
10/28/25 - Rendered a grid of quads
Got turning with mouse to work and improved movement using https://learnopengl.com/Getting-Started/Camera. Got physics timers from spaceship framework working for consistent movement speed. Filled an array of vertices for points on a grid to render with GL_QUADS.
Attempting to use GL_TRIANGLES instead
Got GL_TRIANGLES working, each square is now made up of two triangles
Change from using a constant height of 0 to using Ken Perlin's noise algorithm from lab-3
After some research, added scale and amplitude variables to function call to perlin noise for more natural looking terrain (https://rtouti.github.io/graphics/perlin-noise-algorithm). Also made terrain larger for testing
10/29/25 - Fixed normals
Fixed the normals for each triangle face for better lighting
10/30/25 - Begin adding gravity
Added a keybind to toggle gravity to walk on the terrain
10/31/25 - Add grass texture
Brought in Gordon's texture class. Rendered a quad with a grass texture for testing
12/03/25 - Multiple updates
Put the grass texture on each of the terrains triangles
Brought in our class stencil framework, specifically model3d.cpp to get some models into the terrain along with shadows for them.
Added some GL_LINEAR fog with help from https://www.swiftless.com/tutorials/opengl/fog.html
Also added an fps counter to help with measuring performance
(Changed the scale of the terrain to 2 to make it bigger in this image)
Was working on adding a skybox, but had issues with my shadows, so I ended up removing the skybox