This is a 3D engine that I am developing in C++ using only standard libraries. The engine is based on the Github repository of Dmitry V. Sokolov.
This project takes place in the context of the course "How a 3D rendering engine works" of the University of Lorraine for the Master 1 in Computer Science.
To compile and execute the project, you can use the following command:
cmake -B build
make -C build
./build/engine [degree]
To render this image, I had to implement the following features:
- Bresenham's line algorithm
- World Matrix
- Camera Matrix
- Projection Matrix
- Perspective Projection
Then I implemented the backface culling algorithm to render only the visible faces of the object.
I implemented the filling triangle algorithm to render the faces of the object. After that, I implemented the z-buffer algorithm to render the faces of the object with the correct depth and also the Gouraud shading algorithm to render the faces with the correct color.
I added the texture mapping algorithm to render the faces of the object with a texture. You can see the result below.
And now with the Gouraud shading algorithm and the texture mapping algorithm.
The final addition to the project was the implementation of the normal mapping and specular mapping algorithms to render the faces of the object with a normal map and a specular map.