NIGHT LIFE IN NTU

 

Introduction

NTU has built a lot of outdoor study places within the campus to accommodate the study needs of the student. Some of these study places were located outside the lecture halls to serve as a short discussion area for lecturers and students after a lecture. Generally, these places were often taken up by students for studying and discussion or having a quick lunch whenever the canteen is filled with people during lunch time. In addition, notice boards from various school clubs were situated besides these study places so as to provide updated information on events organized by these clubs.


For this assignment, I had randomly select a study place located in North Spine, outside Lecture Hall 5 which is shown on the right. The scene, captured using a digital camera, is made up of several objects having a back wall with two notice boards on it. A dark blue horizontal strip that run below the two notice boards and two 4-legged black coloured table with a sitting bench on each side. The wooden table with benches were each situated in front of the two notice boards respectively.

 


 

Rendering Tools

The whole scene was rendered using OpenGL. OpenGL has being the premier environment for developing portable, interactive 2D and 3D graphics application since its first introduction. It has being the most widely adopted graphics standard so far and thus it is well available. It supports all UNIX workstations and run perfectly well on every Windows 95/98/2000/NT platform.

Development of the scene was done using Visual C++ which load the OpenGL APIs in its development environment that enable creation of graphical objects. The final output will be a window executable(.exe) file upon successful compilation. In addition, lightmaps and texture will be used to provide additional realism on modelling the scene.

 


 

Scene Rendering

Most of the objects in the scene was created by GL_QUADS, a primitive polygon type that is made up of four vertices joined together. This polygon type was selected for rendering as most of the objects in the scene was of rectangular shape. With reference to the actual scene shown earlier, the first task in beginning the rendering work was to create brick flooring.

Flooring and Background Wall

A single quad will be used to create the floor with a brick texture cover on top of it to model the brick flooring. Next, the background wall will be created. The rectangular background wall was easily created by four GL_QUADS which form the front, back, right and left sides of the wall. The techniques involved usage of translation operations to create the left and right sides of the wall at each end with the wall colour set to white on all sides.

Notice Boards

The left notice board, which made up of several 4-sided quads objects, was next rendered using a similar techniques, but only the front and back sides of the notice board was created. The reason was because the top, bottom, right and left sides of the notice board will be replace with four 4-sided polygonal objects that model the notice board's greyish borders. The back sided quad of the notice board will be set deep green which represent the internal side of the notice board with the front sided quad which simulate the glass door of the notice board set to tranparent. Similar rendering settings were repeated for the right notice board.

Table Benches

The last feature on the wall was a dark blue strip that run horizontally below the two notice boards which were easily created by a single sided quad. This completes all the rendering on the wall. The remaining objects to create will be the two black tables with sitting benches attached. Firstly, the bench table top will be first created follow by the four diagonal table legs. Following it will be to render the left and right sitting bench. All these rendering setting will be repeated to create the right table bench.

Ceiling

Lastly, the top ceiling was created using a 1-sided quad with three white 1-sided quads, horizontally attached to the bottom side of the ceiling that model the three light sources. This completes the full rendering of all the objects in the selected scene. To add more realism to the scene, lightmaps were used. A lightmap was bind onto the background wall to simulate lights that were cast onto the wall while another three similar light maps were bind onto the three individual light source on the ceiling.

Navigation

A simple navigation was provided to navigate around the rendered scene. The arrow keys on the keyboard were defined to the viewer to move forward, backward, left and right of the scene so as to achieve different viewpoints on the objects created in the scene.

 


 

Summary

Upon completion of this assignment, I have further reinforced some graphical rendering concepts using OpenGL programming. I have also understand the use of lightmaps that simulate lights which were cast onto objects and achieve increase realism on the overall scene. Last but not least, the knowledge gained here will be essential to my game demo. Here is the zip file of my rendered scene.

References

Nehe Tutorial

Apron Tutorial

OpenGL