Graphics Engine

This project was a year long exploration of rendering for a high level graphics class at DigiPen. The project can load any OBJ or PLY file and texture it or illuminate it with the Phong or Blinn lighting models. The project was built from scratch in C++ using OpenGL and imgui.

During the two semesters that I was working on this, I gained a deep understanding of the graphics pipeline as well as several techniques for rendering and lighting and the advantages they provide. The project was implemented using OpenGL specification and incorporates lighting, texturing, reflection , refraction, and spacial partitioning.

Spotlights with reflections and Phong mix

Phong Lighting Model

Spacial Partitioning

Carousel imageCarousel imageCarousel image
Carousel imageCarousel imageCarousel imageCarousel imageCarousel imageCarousel image

OpenGL

The course was a follow up to a series that was more focused on theory. Previously I had done work with rendering lines and rasterizing triangles but it was all done on the CPU. This project introduced me to OpenGL in a concrete way and I began making use of the GPU.

Implementing the object rendering portion involved managing the parsing of different file formats and the data structures that stored them. This data was then managed by buffer objects that were sent to the GPU. I then wrote shaders using GLSL to render face and vertex normals and eventually implemented the Phong lighting model on top of that. The course explored several ways of making this pipeline more efficient such as reducing calculation with the Blinn variation. Eventually I implemented a deferred rendering system that allowed me to render many objects with many lights and still maintain over 60 FPS.

Spacial Partitioning

Once I introduced many objects into a single scene, the next topic explored was how to organize those objects so it is possible to make queries in the scene (such as using raycasting) in an efficient way. The series of pictures demonstrates several objects using axis-aligned bounding boxes (AABB) to build a hierarchy that incrementally separates the scene into twice as many boxes until each object has it's own bounding volume.

The examples above demonstrate AABB but extending it to ellipses, spheres and oriented bounding boxes (OBB) is also possible.