Rodent-Ray-Tracer
Watch here! https://youtu.be/ZYSCZxGVRW4
Historical Context
July 8-Aug 10. Done the summer between transfering to Berkeley, in the last month of summer.
Technologies
C++, glm
Challenges
Conceptualizing ray tracing theory, creating camera rays, ray-surface intersection, bounding rays, scattering rays, path tracing, Kajiya’s rendering equation, BRDF, global illumination, scattering rays, monte carlo integration, diffuse lambert reflection, emissive materials, area lights, reflection models like Lambertian, physically based rendering, optics, (geometric optics in general, Fresnel equation, Brewster's angle, Schlick's approximation), materials (electrics, dielectrics, metallics), some cool probability, anti-aliasing, signal processing.
Learning all of this awesome stuff and turning it into a program.
Achievements
Understanding everything above
The Story
Having worked my butt off the previous school year and gotten accepted to transfer to Berkeley, I was making the most of my free time enjoying life, working out, and hanging out with friends. One of the things I was most excited for about Berkeley was being able to take their computer graphics class. Having around 3-4 weeks of summer left, the exact thought occurred to me: “Why learn computer graphics at Berkeley if I can just learn it now?” The idea excited me so much I was set on making a ray tracer from scratch. Doing the most research and preparation for a project before, I spent around a week reading, watching videos, and taking notes on what a ray tracer is. Then, I sat down and made it from what I had understood. I knew I wanted to make a path tracer which implemented Kajiya’s Rendering Equation. Before writing a single line of code, I drafted a design of the entire program and overcame some design problems for how to make the ray tracer scalable and easy to use, fortunately this was the least of my worries as all my previous trials and tribulations had given me the confidence and experience to write clean code. With the goals, features, and design of the program all planned out and written, the only thing I had to do was implement them. Of course, you can't plan for everything so I was only around 70-80% faithful to my original design, but I only made changes where I saw an opportunity to improve the original design, either more logical, performant, or easier to maintain. In a week or so I had a ray tracer! I was overjoyed with the beauty, simplicity, and power of raytracing. Since I had met all of my initial goals, I wanted more!! Raaaa, I needed to add support for refraction and to make it physically based. Fortunately, having gained an appreciation for physics the past year, it was a pleasure of mine to study all the physics, namely optics and material science, behind physically based rendering. Studying these topics just made me wish I had been able to take more physics classes in school (I had only gotten a chance to take mechanics and electromagnetism). Regardless, I threw myself in the deep end for the next week. I would literally be thinking about transmissive materials, dielectrics, Snell's law, BRDFs, and the rendering equation while I was at the gym with my friends. I literally wouldn't shut up about how excited I was about the ray tracer- no path tracer. I would discuss with all of my friends that knew anything about physics/optics what and how they thought about certain ideas regarding probability, optics, and material science. Anyways, this was some of the most fun I had making anything, and still, more than I made a physically based path tracer from scratch, I gained a huge appreciation for physics, math, and computer science as that project was a beautiful culmination for all three subjects. Simply put, the more you know about any of the three, the better a ray tracer you can make. I was working on the raytracer until the day I moved out to Berkeley, and before then, was already planning for how I could make a second ray tracer that could be 100x better.