CPU ray-tracer
Embarking on the journey of creating a CPU ray tracer was an great experience that provided valuable insights into the intricacies of computer graphics. As one of my initial forays into the world of ray tracing, this project served as an invaluable learning platform. While I may not be entirely satisfied with the results, it laid a strong foundation and inspired me to continue honing my skills in this fascinating field.
My CPU ray tracer boasts several key features that demonstrate its capabilities:
- Geometry Intersection: The ray tracer can accurately intersect with spheres, planes, and complex triangle meshes, allowing for the rendering of diverse 3D scenes.
- Material Rendering: It supports various material models, including Lambert, Phong, and Cook-Torrance, enabling the realistic depiction of surfaces with different properties.
- Culling Modes: The ability to choose between front-face culling, back-face culling, or no culling for meshes provides flexibility in scene optimization.
- Lighting: The ray tracer incorporates both point lights and directional lights, facilitating the creation of compelling lighting effects and shadows.
- Camera Control: Users can manipulate the camera using keyboard or keyboard and mouse inputs, granting them full control over the view.
- Shadows: The project implements hard shadows, enhancing the visual realism of scenes.
- Scene Cycling: The ray tracer can seamlessly cycle through different scenes, showcasing its versatility in rendering various environments.
Spheres And Triangles
Stanford Bunny
-
Spheres And Triangles
- 3 triangles rendered with:
Back-Face Culling, Front-Face Culling & No Culling. - 6 spheres:
Top 3 are rendered with: metallic Cook-Torrance materials: Rough Silver, Mat Gold & Shiny Zinc (roughness 1, 0.6, 0.1) Bottom 3 rendered with: dielectric Cook-Torrance materials: Rough-Green, Mat-Blue, Shiny-Red. - 4 lights:
3 point lights, 1 directional light. - 5 planes:
All with blue dielectric Cook-Torrance materials (rough 0.4)
-
Stanford Bunny
- 1 Stanford Bunny with a white Lambert material.
- 3 point Lights.
- 1 directional Light
- 5 planes
All with blue dielectric Cook-Torrance materials (roughness 0.4)
In my ray tracer, I've rendered an array of scenes to highlight its capabilities. From spheres and triangles with different materials, including metallic and dielectric Cook-Torrance materials, to a detailed Stanford Bunny model with multiple light sources and planes, each scene demonstrates the versatility and potential of this project.
While this ray tracer represents a significant milestone in my journey, I am eager to build upon the lessons learned and embark on a new project, applying the knowledge and experiences gained to create an even more impressive ray tracing system.
Rendering Showcase: