Hi all..

i have finally finished my second computer graphic assignment about night-rendering, the location i have chosen is nothing but our school's northspine entrance. If you still wonder which entrance is, it is the way to go to northspine as if you walk from southspine, passing by nanyang auditorium.
I wrote the program using open GL from scratch. Well some of you might wonder why I did not use other available modeling software like maya or 3Dmax than translate the model to openGL. Yes it is true, I am curious to draw things using openGL, that is my main reason. Well the other reason.. ehm.. I am not very familiar with modeling software I mentioned earlier

2nd Assignment

3D Model Theme : Night Rendering of NTU
Location : Northspine Entrance
Programming Language : OpenGL

Files:

Source Code(in zip file) : NTU@Night

link to screenshot

Design:
Main Object :
Campus main spine building and plant “boxes”

Texture
Texture plays very important part in any 2D or 3D model, it adds realism and simplify unnecessary detailed design. There are 4 textures used for this drawing, they are wand.bmp, wall.bmp, lighing.bmp and boden.bmp.(please check folder data in the attached file for the pictures). To reduce the number of light sources, Light mapping is also used in many parts of the building, to create fake light model. However this multi texturing produces very good lighting effect, without having actual light sources in that area. Light on the plant-box-wall along the spine is created using light mapping. The other multitexturing is the texture I implemented for ceiling of mainspine building.

Lighting
There are actually 2 types of lighting used in the model, they are diffuse and ambient light. I placed 5 light sources along the main spine walkway, close to the light bulbs. Thus when we navigate around the scene, we could see the light is fading away as we are walking away or getting brighter as we are walking closer to the light. However, i decided to cancel off the idea of diffuse lighting and deleted normal vector for each vertex, because it looks better without any diffuse lights, for my 3D NTU at night modelling.
The exact light intensity and location can be found in the source code.

Rendering
There are some functions which I used to render the scene. In order to improve the quality material color, lighting( ambient), smooth shade model, depth test and real prespective with nicest rendering option are activated.

Color
There are only a few colors used in the model, because most of the models are “glued” with 2D texture.
Black (0.0, 0.0, 0.0) : light pole
PaleGoldenrod (0.93, 0.90, 0.66) : light bulb
Gray (0.745, 0.745, 0.745) : building and plant “boxes”
Light Gray (0.85, 0.85,0.85) : bulb holder

Functions
Key to navigate around the scene: (with respect to viewer position looking at the empty space in front of the building model
T : to move forward
B : to move backward
F : to move left
H : to move right
A : to make clockwise rotation
D : to make anticlockwise rotation
L : to enable, disable lighting effect
F1 : to view full screen
Esc : to quit

Acknowledgement
I would like to thank you everyone who have helped me through out this assignment.
Prof Edmond Prakash
Like Gobeawan
Donny Iskandar

The following are link to website that I have been visiting for consultation or some reading in order to complete this assignment.
http://lorenz.acsu.buffalo.edu/rgb.html
http://apron.morrowland.com/
http://nehe.gamedev.net/
http://www.gametutorials.com/Tutorials/OpenGL/OpenGL_Pg2.htm
http://www.spacesimulator.net/tut3_texturemapping.html
http://www.opengl.org