Skip to content

eliotttesnier/RayTracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

883 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📝 Description

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.


🔧 Core Features

  • 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


💻 Live Preview (Bonus)

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

📂 Scene Configuration

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:

Example Render

🖼️ Render Showcase

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.

🔗 Table of Contents

🛠️ Installation & Build

This project uses CMake for compilation.

🔧 Manual 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.

⚙️ Quick Compilation via Script:

A shell script is provided to simplify compilation:

./shell/cmpRelease.sh

💡 This script automatically builds the optimized Release version of the raytracer.

🚀 Usage

Once compiled, run the raytracer with your chosen scene configuration file:

./raytracer <SCENE_FILE>

Example:

./raytracer scenes/config.cfg

Scene Files:

Scenes must be configured via a .cfg file using the libconfig++ syntax.
Example scene file is provided in the configs folder.

📖 Documentation

Notion
The documentation is available in the doc folder. It contains the following files:

👥 Team

This raytracer was developed as part of a second-year project at Epitech Nantes.

Name Email
Alban alban.roussee@epitech.eu
Eliott eliott.tesnier@epitech.eu
Nolan nolan.papa@epitech.eu
Noa noa.roussiere@epitech.eu

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors