|
NTU Round-the-Clock
|
Scouting for a scene...
|
Came across this building when I was
walking to my friend's room. |
|
The above is actually the tv lounge for hall 12 which I decided to model.
After which I came back the next day and took some photographs from all possible angles which will help
me in modelling the whole scene.
More pictures on the scene 1 2
3 4 5
6
|
Working on it...
|
First, deciding on graphics engine. Its either DirectX or OpenGL.
Since, I was taught using OpenGL in Computer Graphics module (SC208), I decided to use it again.
Next, modelling, to model the whole scene using OpenGL is a tedious
tasks, especially when the scene becomes more complex. After looking
through some reference links on senior works, I found out that a OBJ loader can read OBJ files
generated by Maya into OpenGL.
|
Modelling the scene...
|
|
First time using Maya is a challenge,
I was having difficulties in the orientation of objects, size, etc in the axis.
However, the video tutorials provided by Maya were very helpful. It cover some basic features
of Maya such as moving, scaling, rotating around the scene, creating and view objects, etc.
Soon I was able to model the whole scene as shown.
|
 |
 |
 |
|
Starting on OpenGL...
|
The first priority was to export the
scene that was modelled using Maya to OBJ file format. After which,
using the OBJ
Loader by Ben Humprey (DigiBen), I could quickly test if the Loader
program is working.
Next, light sources, basic nagivation keys as well as 'D' and 'N' function keys are incorporated into
the Loader program.
Lastly, lightmap and textures were created and mapped on the objects
in the scene.
|
Final product...
|
Finally, the whole scene is complete!
|
 Day Scene (Front) |
 Night Scene (Front) |
 Day Scene (Back) |
 Night Scene (Back) |
|
Notice the shadow of the street lamps in day as well as the light
in night. This was done by using the glBlendFunc and glColor4f(d,d,d,1.0) with a lightmap in OpenGL.
By varying the value of d, I was able to cast a black circular 'shadow' on the ground (since the light
source is directly above the scene) when d is less than 0 or a 'light image' on the ground when d is more than 0.
Next, the scenes from Front and Back. You can notice that the tv lounge itself is transparent.
Again, this was done using glBlendFunc and glColor4f(1.0,1.0,1.0, 10.0) with a 'glass-like' texture in OpenGL.
I could create a seemingly translucent effect on the tv lounge by setting the alpha value at 10.0.
|
Conclusion
|
After much hard work and research, I have gained much
experience on scene rendering. A lot of factors have to be considered before and during the
rendering of a scene, such as polygon counts, lightings, textures, navigation, etc. In order
to create a complex with minimum CPU processing, 'hacks' such as texture, lightmaps are used
to create realism in a scene.
|
Download Code and Executable
|
Acknowledgments
|
1. I wish to thank Dr Edmond C. Prakash for
this opportunity to do some hands-on on the concepts learned in lecture.
2. Ben Humprey (DigiBen) for his tutorial and code on OBJ Loader that solves the BIG
part of my problem in Maya to OpenGL implementation.
|
-Home-
|
|
|