Raytracer
A modular ray-tracing renderer written in C++17. It produces synthetic images by casting rays from a virtual camera, intersecting geometric primitives, and evaluating direct lighting.
Project goal
The Raytracer turns a scene description (a JSON file) into an image. For each pixel, the engine:
- generates a primary ray from the camera;
- finds the closest valid hit across scene geometry;
- computes shading from lights and material response;
- writes the final color to the image buffer (exported as PNG).
The project stands out with an interface-driven architecture and a
runtime plugin system (.so) for rendering and the graphical
interface, plus an interactive UI to edit the scene — including mesh vertices.
Use the search bar at the top (shortcut /) to quickly find an option, a class or a scene key. The documentation is available in French and English (🌐 FR button).
Feature overview
10 primitives
Sphere, plane, cube, cylinder, cone, triangle, torus, tanglecube, fractal, .obj mesh.
Lights & shadows
Point and directional lights, shadow rays for visibility.
PHONG / PBR materials
Color, specular, reflectivity, transparency, IOR, metallic, roughness, textures…
BVH acceleration
Bounding-volume hierarchy built before rendering; per-mesh local BVH.
.so plugins
Renderers and interface loaded dynamically via dlopen.
Vertex editing
Interactively move the vertices of a triangle or mesh in the viewport.
Cluster rendering
Client/server infrastructure to distribute tile rendering over the network.
Headless mode
Render straight to a PNG file without the UI (-r output.png).
Quick start
# Build (produces ./raytracer and the plugins in ./plugins)
make
# Interactive render of a scene
./raytracer tests/configs/subject.json
# Direct render to a PNG (no UI)
./raytracer -r output.png tests/configs/subject.json
See Installation for prerequisites and Usage for options and the scene format.
Documentation map
| Section | Content |
|---|---|
| Installation | Prerequisites, dependencies, build, troubleshooting. |
| Usage | Command line, scene file format, real examples. |
| Architecture | Code organization, modules, tools and interactions, rendering pipeline, cluster. |
| Features | Primitives, lights, materials, shadows, reflections, BVH, meshes. |
| Graphical interface | Panels, components, windows, gizmos, vertex editing, shortcuts. |
| Reference | Interfaces, main classes, math types. |
| FAQ | Common problems and solutions. |
This documentation is generated from the project's real code (Makefile, headers,
scene parser, examples in tests/configs/) and the Markdown docs in the
docs/ folder.