As part of my graduate-level Computer Graphics class, we were tasked to use OpenGL to build a raytracer from scratch. This was quite a challenge, as we had to essentially write all the code that traces rays of light from light sources to 3D objects to the camera, and render all this on a canvas. OpenGL handles the resource management of rendering 3D objects onto the screen, but everything else had to be written by us. For extra credit, we added more realistic effects of light, including reflection, transparency, and refraction, landing our submission in the Computer Graphics Hall of Fame. As you can see in the rendering above, the glass ball is refracting the image behind it, and reflecting its environment, which simulates the way real glass reflects light.
Collaborators: Weiqi Gu
Technologies Used
C++
OpenGL
Shader (GLSL)
XML
None
What I Worked On
My project partner Weiqi Gu and I worked closely on this project, doing pair programming the entire time. We switched off on a single computer, with one person typing while the other person checked their work and guided. This turned out to be very effective, and possibly more effective than splitting up the work or collaborating remotely, because we were both able to learn and solve problems together and we were always on the same page.
What I Learned
I learned a lot about computer graphics in this project. Not only did I get an understanding of OpenGL, but also I learned everything from shaders to 3D scene creation in XML to the math involved in simulating light. I also learned about the effectiveness of pair programming when learning new technologies.