SC443:
Computer Game Programming
Assignment
#2: NTU Round-The-clock
The purpose of this assignment is to
create a 3D scene in NTU using OpenGL or Direct3D in an attempt to recreate a realistic
scene. The scene I have chosen to model is a scene of the North Spine corridor
Level 2 (where there are notice boards and benches). In the modeled scene, the
following items have been recreated:
·
Study Bench x 1
·
Wall x 1
·
Notice Board x 1
·
Floor x 1
Due to the limited number of 50 polygons,
my original attempt to re-create a starwell was not done. This new scene
contains less than 50 polygons (a 2nd bench was intended to be
created but that will exceed the number of polygons). A hidden light source is
in the scene located in the Notice Board (it can be seen on the reflection in
the texture of the Notice Board). The entire scene was created using
Microsoftfs Visual C++ using the OpenGL implementation and the Glaux Library
(in contrast to the GLUT Kit).
The 2 pictures above are taken in the Day
and Night scene. Although the background colour changes, take note that this
does not affect the lighting. There is a hidden light source in the scene that
provides the appropriate light for the scene.
To reduce the polygon count, the Notice
Board has been reduced to 1 rectangle, and the supports for the Bench are
missing the top and bottom portions (hidden because they are located under the
ground and inside the Bench Top).
A pre-rendered picture of the notice board
with a light source is used to reduce render time because the light is always
on.
Various commands have been implemented in
the scene. The arrow keys allow for up-down and left-right rotational movement.
The Page Up and Page Down buttons provide a zoom capability. In addition, the D
button will increase the gdaylighth and the N button will reduce it.
Most of the coding has been helped along
through http://nehe.gamedev.net/ A significant amount of code has been re-used or referenced
from the tutorials available on that website. Textures are obtained from the
NTU Virtual Campus. Totally polygon count: Bench (28) + Notice Board (1) + Wall
(1) + Floor (1) = 31. You can download the source code and executable files here.