Skip to content

Pitchiu/ChessLights

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChessLights

Introduction

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.

Functionalities

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.

Manual

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)

Description

Shading models

Flat

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.

flat

Gourad

In this model, colors are interpolated depending on position in a triangle. Result is better, but defects are still visible.

gourad

Phong

In this model, normal vectors and colors are interpolated. Best result.

phong

Fog

Fog density is calculated with function: $e^{-(distance \cdot density)^{gradient}}$

Zrzut ekranu 2023-09-06 013342

Moving

White king is constantly moving and rotating.

Movement.mp4

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published