PPM Ray Tracer Renderer
A ray tracing renderer that computes sphere/plane intersections, diffuse and specular shading, and shadows for a simple 3D scene, outputting the result as a PPM image file. Learners practice vector math, recursive ray-object intersection algorithms, and performance-conscious rendering loops in C++.
- Estimate
- ~13h
- Steps
- 6
- Completed by
- 0
- Proposed by
- codeseed.app
Standard Library (STL) · manual vector math
Project roadmap
- 01
Implement the Vec3 math library
~1.5hWrite a 3D vector class with dot, cross, normalize, and arithmetic operators used throughout the renderer.
- 02
Implement ray-sphere and ray-plane intersection
~2.5hWrite intersection test functions returning hit distance and surface normal for spheres and planes.
- 03
Implement the scene and camera model
~2hBuild a scene container of objects/lights and a camera that generates primary rays per pixel.
- 04
Implement diffuse/specular shading and shadows
~3hCompute Phong-style shading per hit point and cast shadow rays toward lights to darken occluded points.
- 05
Add reflections via recursive ray tracing
~2.5hRecursively trace reflected rays off shiny surfaces up to a max depth, blending results.
- 06
Write the PPM output and render a sample scene
~1.5hWrite the final pixel buffer to a PPM file and render a multi-object demo scene with shadows and reflections.
Resources
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack