Casey Albert-Hall

CPE 471 Final Project

Cave Exploror Simulator

In this project, I created a textured cave using both wild .obj files as well as objects I built myself using cubes and spheres.


Solar system image.
The overgrown goblin cave entrance.
Columns from the cave looking up at the stalactites on the ceiling. Both are created in clusters.

Technologies

  1. Hierarchically modeled character and cave components
  2. Splitting multi-shape .obj files into individual shapes with multiple textures, specifically the brush and mountain plane surrounding the cave entrance.
  3. Blinn-Phong point and directional lighting. A direction light gives the cave low-level lighting, and a point-light from the character is applied as increased lighting to the scene.
  4. Textures are applied to all elements within the scene besides the character.
  5. Movable camera with 360° rotation.

Development Hurdles

Torchlight From Character



Using objects with multiple shapes

Once I had gotten object texturing to work, a big challenge was dealing with the multiple shapes within the goblin cave file. I ended up going into Blender and deleting hundreds of shapes that I didn't care about within the file in order to isolate the ones that I cared about. Once found, I was able to modify the Shapes.cpp file to take in indices of shapes so that I could divide and heirarchically model them.

Concluding Thoughts

Although I had planned on further features, namely merging the character movement with the camera, I like the way my cave explorer simulation turned out. In hindsight, I probably could've done more if I had created one unified cave scene in Maya or Blender using the other objects, then put that into OpenGl and focus more on lighting and collision-detectiong. However, since now I can easily throw in as many stalagmites, stalctites or columns as I want, there is potential for an infinite cave to be generated, so I have a direction to move from here.

Resources

Installation


Note: If submitted code does not compile after build, remove lines 48-61 from GLTextureWriter.cpp. For whatever reason this issue occurred on one machine after submission, but not on the machine I built the project with.

In a Unix terminal a new build directory:

  1. cmake .
  2. make
  3. To run: ./finalProj ../resources

In Windows machine set up to run visual studio, simply run the solution in the build directory.

Controls