Skip to content

CPU Raytracer

A C++ implementation of a basic raytracer with global illumination rendering

Project Overview

This C++ raytracer simulates the physical properties of light and its interaction with 3D objects, implementing a global illumination rendering algorithm that accurately models light transport.

Raytracing Algorithm

Simulates bouncing of light rays with recursive tracing for reflections and refractions.

Geometric Primitives

Supports spheres, planes, cylinders, and complex models like the Stanford Bunny.

Lighting & Material

Implements ambient, diffuse lighting with material properties including reflection.

Example Scenes

Reference Scene
Bunny Scene
Reference Scene

The Raytracing Journey

Developing this CPU raytracer was an exciting dive into the fundamentals of computer graphics. Implementing the core algorithms from scratch provided deep insights into light transport, material properties, and computational optimization.

Technical Challenges Overcome

  • Implementing efficient ray-object intersection algorithms
  • Optimizing recursive ray tracing for complex scenes
  • Developing physically accurate material and lighting models
  • Handling complex geometry like the Stanford Bunny
  • Balancing rendering quality with performance constraints

Despite the computational demands of CPU-based raytracing, the project demonstrates impressive visual results and serves as a solid foundation for understanding modern rendering techniques.

Technical Highlights

Core Raytracing Features

  • Recursive ray tracing with configurable depth
  • Support for multiple geometric primitives
  • Physically-based material properties
  • Ambient and diffuse lighting models
  • Basic anti-aliasing implementation

Libraries & Tools

Designed and built by Ivans Minajevs.