3D Game Project

The course 3D Computer Graphics and Animation, required to build a game in C++ and OpenGL. A basic framework was provided, but all the shading, shadows and extra things were done by me.
The aim of this course was not to create something beautiful, but to learn to use OpenGL, so the main focus was on developing shaders.

You can find the code HERE


The 3D models have been done in Maya.​​​​​​​
The following parts of the game were developed by me:



Blinn-Phong Shading was implemented and applied to the floor, tree heads, trunks, houses and the robot.
Toon Shading with Blinn reflections was implemented and applied to the robot. The robot .obj was downloaded from Turbosquid.
Shadows were calculated using the shadow map technique, with a fixed, slightly yellow light. The bias value was tailored in order to find a good visual balance between peter panning and shadow acne. Every model casts shadows apart from the main character. In order to soften shadow edges, Percentage closer filtering(PCF) was implemented. Even in this case, the number of sampled texels was tailored with trial and error to obtain a more realistic visual appearance.
The X-ray view was implemented with Blinn reflections, and it samples colors from a texture, based on distance. The X-ray view can be called pressing “x”. The shader will shade a “hole” through the first occluding layer as seen from the camera. By pressing “c” and “v”, the size of this hole can be increased/decreased. All the remaining parts of the models, outside the hole, are shaded just with diffuse light, while the floor is shaded with its initial shader. The shader X-ray shader, samples a texture,based on distance from camera and the Blinn specularity.
An attempt of creating a third person view was made. By pressing the key “1”, the user could switch to third person view. 
Finally, a minimap was implemented.The minimap was created by rendering the scene from above, storing it as a texture and rendering it on a quad. The minimap can be activated / deactivated pressing “2”. The main character is visible in the map as a red dot moving in the scene.
3D Game Project
Published:

3D Game Project

Published:

Creative Fields