Computer Graphics

Ray Tracer

A physically-based ray tracer with global illumination, soft shadows, and more

Project Overview

A ray tracer simulates the way light interacts with virtual objects to create realistic images. Starting from the camera's perspective, it traces rays of light as they travel through a scene, calculating how they interact with different surfaces and materials.

This implementation processes POV-Ray scene files, supporting various geometric primitives, materials, and lighting models. The ray tracer was developed in C++ using the GLM library for vector and matrix operations.

Implemented soft shadows by treating point lights as area lights, casting multiple shadow feeler rays and averaging the results to create more natural-looking shadows with penumbras.

Render Showcase

Comparing standard rendering (left) with soft shadows enabled (right)

Render 1 without soft shadows

Standard Rendering

Render 1 with soft shadows

With Soft Shadows

Render 2 without soft shadows

Standard Rendering

Render 2 with soft shadows

With Soft Shadows

Render 3 without soft shadows

Standard Rendering

Render 3 with soft shadows

With Soft Shadows

Technical Features

Spheres, triangles, planes, and boxes

Reflection and Refraction

Monte Carlo Global Illumination

Anti-Aliasing

Transformations

References

Soft Shadows Implementation

View Paper

Ian Dunn, Cal Poly San Luis Obispo