Basic raytracer

Description

Motivation

At one moment I was helping a student from my town to get his Bachelor's degree at VDU. He needed a project related to graphics and programming, so I suggested working on a raytracer seeing as raytracing is quite an easy technique to implement and you can get nice result out of it.

Overview

This project is on hold. So far I've managed to cover all the material about raytracing and I am clear how to cast rays, test for interaction with triangles, how to calculate diffuse and specular shading, as well as how to cast shadows and do reflections. With this raytracer you can load a model, place the camera, set up basic lighting and start raytracing the scene. Once this is done, the raytraced scene's image can be saved as a PNG. The current raytracer is incomplete, because it can't do reflections, render textured models and the casting of shadows is buggy. Anyhow this is what this program can do at the moment:

  • Cast rays
  • Test for interaction
  • Calculate diffuse and specular shading
  • Cast shadows (buggy )
  • Generate and save an image

Download

Diffuse and specular shading


Shadow bug