****************************************************************** ** ** ** README : Assignment 3 ** ** ** ****************************************************************** **********************Section 1: Team Members********************* Liviu Tancau 991360353 Mark Teper 991603886 *******************Submitted Animation File(s)******************** chess-long.avi - XviD encoded sample game at 512x512 chess-tiny-mpg4.avi - sample game at 256x256 encoded with Microsoft MPG4 chess-short.avi - XviD encoded trivial game (3 move checkmate) The second video is suitable for putting up online since it is smaller and uses a widely available codec. The first video is better for evaluation purposes because the quality is better. The third video was submitted as a backup before the other two (unfortunately there is no unsubmit command). ********************* Features at a glance ************************ - interactivity - transparency - reflections - shadows - phong lighting - animated movement - animated colors - animated deformations - animated camera *********************Source and Data Files************************ Animator(.h/.cpp) - Controls animations. Animations were done ased on keyframing using a variety of different interpolation techniques (cubic, sinusoidal, linear, etc. ) Camera(.h/.cpp) - Camera location and animation Chessman(.h/2.h/.cpp) - Algorithms for all handling of chess pieces including validating games, determining winner, monitoring checks etc. Also controls all the animations of chess pieces. globals.h - Mathematical constants Main3DS(.h/.cpp) - Code for the window, setting up glut and openGL. Also controls rendering and animation. Mesh(.h/.cpp) - Loading and rendering of obj mesh files. Handling the loading of alternate low quality meshes. piTimer(.h/.cpp) - A platform independant timer used to control the animation progress. It is needed because animation is based on real time and not frame count. sceneObj(.h/.cpp) - Superclass for all scene renderable objects. Also contains classes for all renderable properties such as visiblity, transforms etc. stl.h - platform independant loading of stl library texture.h - Loading and management of texture files Util.h - general utilities including matricies and paramaters for animation datafiles.zip - zip containing the following folders: /texture - folder containing the 3 texture files /data -folder containing the (alternate) low face count meshes we made /data-big -folder containing the high-quality meshes from 3dcafe.com 3movemate.lnl - sample game file of the quickest checkmate in chess kasparovVdb2 - kasparaov vs. deep blue the second game (doesn't end kasparov resigned) game.txt - a quick game created for demonstration makefile - the makefile *********************Compile and Execute************************ The program can be compiled either in Linux (CDF) or Windows. To compile in Linux, just run make (Makefile is included). To compile on Windows, open the lab3.dsw file (Visual C++ workspace). After compiling unzip the datafiles.zip file (contents are required to run) The program can be launched in several ways: - chess (no parameters) This launches the chess game in interactive mode. You can alternate playing both sides by clicking a square to select a piece and then clicking the destination. Check the console for messages such as "Illegal move". When a king is in check it will turn red. When the game is over, you will see a message to that effect in the console. To move the view around the scene, you can use the following: - left mouse button drag -- slides the board around - right mouse button drag -- rotate the scene (incl. up/down) - middle mouse button drag -- zoom in or out - chess random The computer will randomly make moves for both sides. The camera is also controlled automatically. - chess file This is like random mode, but the moves are taken from a file. The moves must be in "e2e4" format. Camera control is automatic. - chess render Like the file mode, but outputs the file "./AVI/output.avi". This will only work if the program is compiled on Windows (needs VFW libraries). On Linux it just prints an error. If you think your PC is good enough, append the parameter "hires". This will launch the game with more detailed pieces (done automatically in render mode). Note: CDF lab machines are NOT fast enough to even run the program at low resolution. You need to find a fast machine with a good 3D video card in order to evaluate the assignment. It may also be that the Linux OpenGL implementation is too inefficient, since we've successfully tested the program on a few Windows machines, but on CDF the framerate is far below 1 fps. ***************************DESCRIPTION********************************* Our program animates a chess game and is capable of running in two modes. In its first mode it allows interactive play from the users, using the mouse to indicate the piece positions. In the second mode it plays back an existing game file, complete with an automatic camera moving around the board. Furthermore, the program is able to validate chess files and ensure legality of moves. In designing this project we expanded on much of the code that had been developed earlier. We used the mesh loader from assignment 2 and based the animation code on the animation done in assignment 1. We implemented an extensive keyframing system capable of modelling any mathematical interpolation. Furthermore we extended the animation system so it could animate almost anything from colours to positions and angles. Each piece has more then 10 animatable properties. We also implemented many additional items. Real time shadows and reflections help make the board look more realistic. Lighting and materials improved the shadding of the pieces. Finally, individualized movement and capture animations were designed for the pieces to make the animation more entertaining. ***************************CITED SOURCES******************************** -Two sets of meshes were used in the project the high quality ones came from www.3dcafe.com. The low quality ones were produced ourselves based on these models. -Information on creating and writing to the AVI Stream was found on the Microsoft MSDN website. -Information on drawing shadows on a plane was found on Prof.John L. Donaldson website at http://occs.cs.oberlin.edu/faculty/jdonalds/ -Reflection drawing technique was based on technique from http://nehe.gamedev.net/ ************************DIVISION OF LABOUR**************************** Liviu wrote the animation system and model loaders as part of assignments 1 and 2. He also wrote all the chess loading, playing and rendering and animation code, including the interactive mode. Furthermore, he wrote the video recording code for AVIs. Mark wrote the reflections, shadows, texture mapping and lighting code. As well, he animated the camera and wrote the camera animation sequence.