This project is a Raytracer written in C++, developed during our second year at Epitech Nantes. It was designed to simulate the behavior of light in 3D environments using ray tracing techniques to produce physically realistic images.
We implemented the project in compliance with strict architecture guidelines, including interface-based design, use of design patterns (Factory, Decorator...), and optional plugin systems for future extensibility.
-
Scene rendering from external config files (libconfig++)
-
Multiple geometric primitives: Sphere, Plane, Cylinder, Torus, OBJ file, etc.
-
Transformations: Translation, Rotation, Scale, Shear
-
Lighting:
- Ambient, Directional, Point lights
- Colored lights
- Phong shading
- Ambient Occlusion
-
Materials:
- Flat color, Reflection, Refraction, Transparency
- Texturing (procedural & file-based)
- Normal mapping, Chessboard, Perlin noise
-
Optimizations: Adaptive antialiasing, Spatial partitioning, Multithreading
We also developed a live preview GUI using SFML, allowing you to:
- Navigate the scene in real-time
- Reload the scene on file changes
- Preview renders and progression before export
Scenes are described in .cfg files using libconfig++ syntax. You can easily define:
- Camera position, resolution, FOV
- Lighting setup
- Objects, transforms, and materials
- Scene settings (antialiasing, ambient occlusion, etc.)
Example render:
This section presents all the rendered scenes used to demonstrate the features implemented in the raytracer.
Each entry includes a screenshot, a short description, and a checklist of the validated features.
- 🖼️ NormalMapping.png
- 🖼️ InfiniteRefraction.png
- 🖼️ ShrekOBJ.png
- 🖼️ TorusReflect.png
- 🖼️ Space.png
- 🖼️ Transformations.png
- 🖼️ MountainOfBogosses.png
- 🖼️ WallOfTom.png
- 🖼️ Fractale.png
- 🖼️ Cubes.png
This project uses CMake for compilation.
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .The executable will be generated at the root of the project as raytracer.
A shell script is provided to simplify compilation:
./shell/cmpRelease.sh💡 This script automatically builds the optimized Release version of the raytracer.
Once compiled, run the raytracer with your chosen scene configuration file:
./raytracer <SCENE_FILE>./raytracer scenes/config.cfgScenes must be configured via a .cfg file using the libconfig++ syntax.
Example scene file is provided in the configs folder.
Notion
The documentation is available in the doc folder. It contains the following files:
- doc/TechnicalDocumentation.md : This file contains the technical documentation of the project.
This raytracer was developed as part of a second-year project at Epitech Nantes.
| Name | |
|---|---|
| Alban | alban.roussee@epitech.eu |
| Eliott | eliott.tesnier@epitech.eu |
| Nolan | nolan.papa@epitech.eu |
| Noa | noa.roussiere@epitech.eu |
