Assignment 2 : Singapore Round the Clock
Location of Scene:
A Basketball Court near my favourite coffeeshop.
As I do not own a digital camera, I was unable to take photo of the location and must do it partly from memory and observation when I visit my favourite fishball noodle stall at the coffeeshop. It is near Jurong East Community Centre.
References used:
Opengl Article on Extension Loading on Gamedev
Resources used:
This library is used to facilitate the opening of windows and provision of input. It has similar functionality as that of the GLUT library, only that this library is being maintained
I made use of the library written by Lev Povalahev to load 3DS and TGA files into my OpenGL program. This enables me to model the scene in 3D Studio Max rather than typing in all the coordinates points one by one.
Rendering:
As there was various lamp posts near the basketball call, quite an amount of LightMaps need to be used to model the night scene itself. This assignment is quite tough considering the amount of thing we need to learn to do this tutorial, for example, we need to know how to create a LightMap, how to load OpenGL extensions so that we can make use of the improvement in hardware to do some effects like Multitexturing. Besides that a scene also need to be build from scratch.
I decided to go with the method of using a 3D file format loader is because I was thinking of the Game Demo that needs to be made and learning how to load a mesh using some library would be useful. Earlier I was playing to write the file format reader myself but due to time constraints I have to go and find a workable loader. As this is a relatively straight forward assignment, I decided to go with a lightweight loader with limited functionality instead of a more comprehensive one as linking in the full feature loader would cause the program to become rather bloated. One full feature 3DS loader I found is lib3ds.
I created the LightMaps by add lights in 3D Studio max and baking the lighting information onto tacture. I have also seen other methods where LightMaps are generated by calculation and then writing directly to OpenGL texture
The program was done using Bloodshed Dev-C++ using the mingw32. As mentioned earlier I also made use of various libraries such as Simple Direct Media (SDL) and various loaders. The SDL library need to be linked with the program to compile the program. For more information on setting up the SDL library in Dev-C++ or Visual C++, do a search on google or go to the library main site. Opengl libaries also need to linked in to ensure that the program is able to compile.

Image of Basketball Court in Day Time as in my program

Image of Basketball Court in Night Time as in my program

Another view of the Day Time Scene

Another view of Night Time Scene
Download Source, Textures and Binaries