
Raytracer
In this block, we were tasked with creating a Raytracer, we had to start from scratch without much knowledge about how they worked, so first, we had to look into how they worked.
This took some time. But with some good guides and helping each other in class most people, including myself, got the basics set up.
I started with some spheres, to then make a duck which could be used for other tests later on. If by now you don’t know yet. I like ducks.

This lead to more ducks, however now I started working with lambert shading. I also started experimenting with bounding boxes, this image was produced with bounding boxes in release mode of visual studio. With the boxes, it took 1 second, without it took almost 1 minute.

My next goal was set on adding Blinn-Phong shading, and with the settings on each object, I could change how big the specular part was on each duck.

I continued on with reflection even being able to say how much something should be reflective, in the image you can see the duck is 100% reflective, while the ground isn’t.

Next up I wanted to do refraction, but not just refraction. So I looked into beers law and how things are darker when needing to travel further through certain objects.

I could also set how much each small step would affect the color change, which could give you smoother corners like the left one. Or the harder corners like the ones above.

The last thing I wanted to do was real-time, this took some time since I basically had to change the rendering system, instead of writing to an image I would now need to create an image every frame. In the gif, you can see some funky stuff that happened in the process.
Eventually, I got it all working and even managed to create a BVH (Bounding Volume Hierarchy) with it when I would create big scenes.

Conclusion:
Overall this project was a good learning experience, I had to handle some 3D math while also working with some math when it comes to shapes. I learned some methods of improving framerates and how to move the player in 3D. As well as having my first case of Gimbal Lock.
Technology Used:
Development Time:
Student Year:
Visual Studio, Perforce.
8 weeks.
First Year.
Programming Language:
Platform:
C++.
Windows.