I am currently learning about raytracers based on Peter Shirley's "Raytracing in One Weekend" series of books. I've built a raytracer from scratch with multiple material rendering capabilities and realistic reflections. The raytracer has been built using C++.
This raytracer can render 3D spheres and simulate common materials like diffuse, metal, and glass. Diffuse materials scatter light evenly, simulating paint-like surfaces. Metal uses the fresnel effect for reflective, shiny appearances. Glass uses refraction to bend light through transparent surfaces based on Snell's law. By modeling basic light transport behaviors, the renderer creates the illusion of 3D forms and differing object materials through ray tracing calculations alone. While simple, it demonstrates the core principles of virtually tracing light in simulated scenes from first optical principles.
This updated raytracer features expanded geometry capabilities beyond spheres. It can now render non-spherical shapes like cuboids. Additionally, multithreading is leveraged to accelerate the rendering process and produce images faster through parallelized ray tracing calculations. These enhancements allow for more complex scene compositions with varied object forms. Leveraging multicore processors further improves performance for interactive use and faster iteration when developing scenes and materials.
A Discord bot integrates the raytracer to allow user-defined rendering via chat commands. It accepts custom parameters on the examples defined earlier. For instance, specifying a sphere size will generate images with dynamically sized spheres. Users can experiment with shape properties in real-time through simple text prompts.
Click the below button to have a brief overview on how the project is built
Feel free to contact me if you are interested in learning raytracing technology