Inspiration
I have always wanted to learn more about computer graphics, and what goes behind different rendering techniques. Additionally, I wanted to take the time to get some hands-on experience with c++ since before-hand I had very little c++ experience.
What it does
This is a ray trace renderer, that shoots rays into a virtual scene, and depending on how the rays hit an object, pixels are colored to reflect the properties of the object. In the case of this renderer, the color of the objects (spheres) is mapped to the normal vector of the object, in other words, the orientation of the surface at any given point. This normal information is the foundation for implementing more rendering techniques, such as reflections, shading, and material mapping, among others.
How we built it
This project was made with raw c++ and Visual Studio 2019 for the compilation and building. The program outputs a .ppm image file.
Challenges we ran into
Rendering is very difficult, especially when it comes to reflections and materials. If more time was allotted, I would have probably been able to assign different materials to the spheres and even have visible reflections on spheres, accurate shadows, and shiny, matted, and diffused materials.
Accomplishments that we're proud of
The fact that I was able to debug a lot of the code was a big deal, especially since this is my first real experience with c++. I had a very hands-on development experience that taught me a lot about both c++ as a language as well as rendering techniques used in 3D graphics today.
What we learned
I learned a lot about how ray tracing works to provide an accurate representation of lights and objects, as well as a lot of the math that goes into rendering such a thing (specifically vector math functions like dot product and cross product to calculate surface normals). I also learned exactly how anti-aliasing works, and why it's such a difficult thing for games to render in real-time, even today.
What's next for C++ Ray Trace Renderer
The immediate next steps are to add the functionality for different materials, and eventually the ability to offload the work to GPU cores, to increase performance as well as possibly creating a real-time 3D raycaster.
Log in or sign up for Devpost to join the conversation.