Skip to content

bednarikjan/RayTracingChess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chess renderer using ray traycing

This project was the main deliverable of the winter semester course Computer graphics. The application is capable of rendering the chessboard with arbitrarily placed pieces, it uses the Phong shading model and supports shadows and reflections. Only the .OBJ model files are supported.

How it works?

Classical ray tracing approach is used. As the computation of the intersections with the model's triangles represents the most significant bottleneck of the application, the method Fast Minimum Storage Ray/Triangle Intersection was implemented. The bounding boxes are used as well.

Dependencies

  • MSVC compiler
  • Eigen

Configuration

It is possible to set the camera's resolution and FOV, the position of the light in the scene, background color, recursion depth of ray tracing, the colors of the pieces and chessboard fields as well as the reflectance and the shininess. Regarding the chessboard model, the user can set the position of each piece. Both the renderer and the model configuration can be done using the files configChessDefault and configRTDefault.

Install and run

  1. Open rtchess.sln with Visual Studio
  2. Compile (Release mode is recommended)
  3. Run (see synopses)

The program uses free model file chess.obj (by author cjx3711). It is possible to use your own but the program expects the separated models (chess pieces and chessboard) to follow specific name convention (see the chess.obj model file).

Synopsis

rtchess model config_chessboard config_ray_tracer output

     model               model file name (.OBJ)
     config_chessboard   chessboard configuration file
     config_ray_tracer   ray tracer configuration file
     output              output file (.PPM)

Authors

Gallery

Ray traced chess 01 Ray traced chess 02 Ray traced chess 03 Ray traced chess 04 Ray traced chess 05 Ray traced chess 06 Ray traced chess 07

About

The assignment from the master course Computer Graphics at University of Technology, Faculty of Information Technology.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages