This project is created as a part of the university Computer Graphics course. The purpose of this program is to present some basic and more advanced graphics concepts. Application was written in C++ with GLSL graphics shaders. It uses OpenGL with GLEW and GLFW librararies. I used Assimp package for object loading and stb_image for image loading.
Currently ChessLights project has the following functionalities:
- Visualisation of several 3D chess objects on the board.
- 4 different camera modes: static, tracking, POV and free.
- 3 types of light sources: directional, point and spotlight, along with system of power decreasing with distance.
- Moving, rotating and vibrating object with responsive spotlights on it.
- Day and night cycle.
- Smoothly changing fog effect.
- 3 shading options: flat, Gourad and Phong shading.
- Controlling interface for several functionalities.
When camera mode allows that, you can move with WSAD and mouse. When lights on, you can change the direction of spotligh with arrows. Buttons:
- 1 - Turn on/off fog
- 2 - Change camera mode (Static, POV, Tracking, Free)
- 3 - Object shaking on/off
- 4 - Lamps on/off
- 5 - Time start/stop
- 6 - Shading mode (flat, Gourad, Phong)
This model uses 1 color for every pixel in the triangle. Board has very few polygons that is why it looks poor. We can notice edges in the round figures.
In this model, colors are interpolated depending on position in a triangle. Result is better, but defects are still visible.
In this model, normal vectors and colors are interpolated. Best result.
Fog density is calculated with function:
White king is constantly moving and rotating.



