My [OpenGL][3D] Graphics Rendering

s12705

Hoshimi
Apr 9, 2008
175
0
21
37
Dubai, UAE
| [UPDATES]
| 30-04-2011 - Moved to Dubai, UAE and now I don't have time to work on this. :( Well but I added some other functionality in it as well like you can walk inside the building now. Will post the code soon as soon as I get free. :)
| 03-05-09 - Added Scene 2 which contains very basic lighting and shading.
Hello PG,

I am opening this thread so I can show off what I have been upto in recent days. If anyone of you want to show his/her work of 3D Graphics Programming then he is welcome to use this thread.

Now, my part of the show.

I have been learning OpenGL since february and I have written a program which renders a 3D Scene of a Roman like structure(insipred by God of War) in real time. You can move through the scene with first person camera.

The 3D Model you are seeing in the scene has been hardcoded in the code(no external model loading). I have done this for the sake of learning 3D co-ordinates better. It was frustrating but rewarding.

Actually I have a computer graphics course this semester so thats why I am doing this. As the course proceeds I will be adding lighting, texture, shading, and other elements to the scene as well.

[Checklist]
1) Render a scene in OpenGL... Done.
2) Basic Lighting and Shading... Done.
3) Texture Mapping... I am on it.
.
.
.
.

Hope I contributed for the good.

Cheers!
Imran Hashmi
Karachi.

[SCREENSHOTS]
[SCENE 1: Basic Rendering]


[SCENE 2: With Lighting and Shading]

Now, I thought lighting would be easy to implement in OpenGL and yes it is easy to implement simple lighting in OpenGL but controlling it is rather hard. First I had to make all my polygons and triangles counter clockwise(CCW) because when I started 3D in OpenGL I didn't paid much attention to the winding details. So it was time consuming and frustrating. Now this is a very basic OpenGL lighting and nothing fancy in it. I did experimented a lot with lighting in OpenGL. I guess that was the reward I got this time.
 
Last edited:

s12705

Hoshimi
Apr 9, 2008
175
0
21
37
Dubai, UAE
@Krotos
Well, any Bachelors degree in Computer Science will have a course in Computer Graphics... like in Karachi University or SZABIST.
I am studying at NUCES-FAST, Karachi Campus.

@shujaswasti
@Sarmad
Thank you brothers. I am working on it whenever I get free time. Will be adding lots more detail to it as days pass.
 

Rapchik Killer

Well-known member
Jan 18, 2007
1,263
0
41
34
Karachi, Pakistan
It must have taken a LOT of time to hardcode this! But i understand it is necessary to have a strong foundation.. It always takes times to build the concepts.. neways good luck dude, if you have any queries you can post in the forums..
 

s12705

Hoshimi
Apr 9, 2008
175
0
21
37
Dubai, UAE
@Rapchik Killer
Thankyou very much. I appreciate your acknowledgment. And hey I want to see your OpenGL work. I have already seen your Maze Ball. Its very good. Keep it up.
 

s12705

Hoshimi
Apr 9, 2008
175
0
21
37
Dubai, UAE
@JAYZZY
Thanks bro.
Yes, indeed. It still looks good in the current state and yes lighting and texturing will further polish it. You can imagine how it's going to be once there is lighting in the scene.
I am using OpenGL and C/C++. Well the IDE is Visual Studio 6. I am NOT USING any graphical package like 3DS Max or Maya. Even the model is hardcoded. :)
 

aameeshah

Proficient
Aug 13, 2007
780
0
21
Hyderabad
www.shah-soft.com
Ahh The good old days! Good for you! You reminded me of my early days of learning game stuff.

I spent lot of time with plain old OpenGL and C/C++. Even when I should have moved on to some game engine but I kept doing OGL (...and now I am just doing 2d stuff in Flash).

Here is my hand-coded game demo. It just uses OGL. Physics, Particle effects and models are all done in code.

Link: http://www.geocities.com/shahji_2000/SaadatOGL.zip
Controls: Arrow keys to move missile.
 

s12705

Hoshimi
Apr 9, 2008
175
0
21
37
Dubai, UAE
@aameeshah
Awesome work. Buhat lush. Thats what I am thinking to do but I dont want to create a hype as I dont have the skills to do it right now. I am thinking of creating a 2D Platformer and use OpenGL for its rendering. It will be smooth and I can use a camera to capture all the scene in 2D. :D Not to disclose anything further because we say a lot of things like we will do that and this and we end up loosing motivation and the game idea rests in peace. So better to have something to show off than to hype without having anything.

Anyways, I like your program. Buhat tight. What are you doing these days BTW?
 

s12705

Hoshimi
Apr 9, 2008
175
0
21
37
Dubai, UAE
@Rapchik Killer
Yes I do know about it as the first thing you get when you run an OpenGL search over google you get 'NeHe'. Thanks again. Thanks a lot bro.
 

s12705

Hoshimi
Apr 9, 2008
175
0
21
37
Dubai, UAE
I have updated the section as I said. Now the scene contains some basic lighting and shading in it. Check it out.
 

abobobilly

$heeda Pastol ™
Dec 3, 2008
14,732
3
44
Lahore
breast augmentation 1 does not acceptcheap zocor online photo albumzestril drug interactions Buy valtrex depakote generic920 hoodia hct mexican micardis pharmacyviagra and prostatefemale breast enhancement Buy stromectol metformin glucophagecan ultram do heart damage interaction paxil and valiumaccutane and heighthgh and sexual drive Cheap Prednisone buy low cost zocorsoma thin blood clarinex during pregnancydogs taking prednisonei take diflucan Buy clarinex can i give my dog ultramaccutane yeast amoxil without a prescriptionamino acids and prozacsingulair pharmacy Buy arava extra pravacholneurontin patient assistance Buy Tamilfu



:RTR:
Post Reported........ Any kind of Advertisement is not allowed here :mad:
 
Last edited:

Shyber

PG Pioneering Member
PG Pioneering Member
Oct 11, 2007
16,826
2
44
39
The Land Down Under
Interesting work Imran. You using GLUT? And is it an academic project? Which uni?
I missed this thread before, but thanks a to bot and our PGers reporting it, I got to visit it. I see you're doing pretty good.

And you're using directional lights here? Regarding model designing, I suggest using a light weight 3D mesh modeler, like DelEdit (I hope I remember the name right). It allows you to make nice looking stuff, with UV coordinates of textures too. Though the texturing is not that accurate, but the file it saves - set of vertice data, normals and UV coordinates, you can then write a small parser that can load that file.

In fact, it can export a .x file too and I think there are ready made open source parser codes for it as well. The key to lighting is the proper set of its normals. Better to use vertice normals even though specifying them is a little hard and a pain in the ass - without an external app.

What's your eventual goal with the engine? Gonna add animations to it? How much have you studied so far?
 
Last edited:

s12705

Hoshimi
Apr 9, 2008
175
0
21
37
Dubai, UAE
Interesting work Imran. You using GLUT? And is it an academic project? Which uni?
I missed this thread before, but thanks a to bot and our PGers reporting it, I got to visit it. I see you're doing pretty good.

And you're using directional lights here? Regarding model designing, I suggest using a light weight 3D mesh modeler, like DelEdit (I hope I remember the name right). It allows you to make nice looking stuff, with UV coordinates of textures too. Though the texturing is not that accurate, but the file it saves - set of vertice data, normals and UV coordinates, you can then write a small parser that can load that file.

In fact, it can export a .x file too and I think there are ready made open source parser codes for it as well. The key to lighting is the proper set of its normals. Better to use vertice normals even though specifying them is a little hard and a pain in the ass - without an external app.

What's your eventual goal with the engine? Gonna add animations to it? How much have you studied so far?
Yes I am using GLUT sometimes and sometimes only Win32(wiggle). I am studying at FAST, Karachi but it's not an academic or term project. I am doing this in my spare time. I am using positional lights right now. Right now the model is pretty hardcoded but in future Inshallah I will load models from a rather simple file like .OBJ file maybe and then go on to MD2 or MD3 models(which quake uses). I would like to write a model parser myself as it will help me in understanding how the models are in format(I will surely take help with some tutorials).

Buddy, I started this in order to understand 3D. I don't have anything like a 3D engine in my mind(as the code is rather very badly written with no modularity) but who knows maybe as the time passes and I progress shall I make it into a 2D Engine with OpenGL acceleration. The models and map will be 3D but the camera angle will be set to a 2 dimensional viewing only. Thats what I have in mind ultimately.

And I advancing and learning openGL at a very slow pace. Mainly because of my university. My finals will also be starting from mid may so wont be giving a lot of time to it.
 
General chit-chat
Help Users
We have disabled traderscore and are working on a fix. There was a bug with the plugin | Click for Discord
  • No one is chatting at the moment.
    NaNoW NaNoW: ....