Raytracer

Render 3D objects, simulates light reflections, refractions and shadows.

Published on Jul 18, 2022

This is the final project of my curriculum at school 42, realised as a team of 4 students in about three months.

The goal was to create in C and without the help of libraries that we hadn’t coded ourselves, a raytracer engine, so ability to render simple 3D objects, simulates light reflections, refractions and shadows.

It was also necessary to create a input file type for the program and do the parsing to be able to load scenes.

On my side I worked on many parts of the project:

  • The input file and its parsing
  • The UI & UX, and events management (keyboard, mouse, buttons)
  • Special modes (filters) that modify the final rendering of the image
  • The PNG image export system
  • The ability to add elements in the scene
  • Management of scene elements, modification of position, size, colors, shader, …

I learned a lot during the development, I tested new things like the advanced event management with different interface elements (button, textarea, radio button, input, …).

It was a long and challenging project but the result was worth it.

When

2017

Duration

3 months

Language

C

Images

View of the program with a scenecomposed of multiple objects.

Multiple objects with perlin nose textures. Greyscale filter applied on a textured sphere. One of the filters (Sobel) applied to the first image. Night vision effect applied.

Links