how to load model 3D into opengl program
Started by rosma, Feb 11 2009 06:09 AM
12 replies to this topic
#1
Posted 11 February 2009 - 06:09 AM
hye all.. please help me to teach me how to load model 3D into opengl program.. i feel excited to know about it.. to ANUDYAN, COULD U PLEASE HELP ME AND GIVE ME YOUR CODE LIKE YOU GIVE IT TO CHINGCHING? I'M APPRECIATE THAT..
#2
Posted 11 February 2009 - 06:32 AM
Who are Anudyan and Chingching? There is no one by those names on this forum.
As for loading models, if it's in a standard format you'll need to find a loader on the internet (or write your own if the format specification is available). What format are your models in?
As for loading models, if it's in a standard format you'll need to find a loader on the internet (or write your own if the format specification is available). What format are your models in?
reedbeta.com - developer blog, OpenGL demos, and other projects
#3
Posted 12 February 2009 - 04:44 PM
The best place to start with loading models into opengl, and also the furthest I ever got with it, is loading wavefront object models. They end in .obj. Most modelers export in this format. If you open them with a text editor they are written in plain text and the format is pretty easy to figure out, specifying faces and vertices, etc. Doing a search in Google for some like "opengl obj loader" will probably find you some examples.
Currently using Blender 2.5, FlashPunk, and Unity.
#4
Posted 16 February 2009 - 06:30 AM
ok thnks a lot fireside.. can u give me a sample code or project to load the model into opengl?? i really need ur help.. thnks
#5
Posted 16 February 2009 - 07:43 AM
I think you need to do some of the work yourself if you are to learn anything.
Alternatively, download irrlicht or ogre or some other freely available engine and use their model loading functions. You won't be using opengl directly that way, though.
Alternatively, download irrlicht or ogre or some other freely available engine and use their model loading functions. You won't be using opengl directly that way, though.
http://iki.fi/sol - my schtuphh
#6
Posted 16 February 2009 - 07:56 AM
There's some c++ code for loading obj on this page:
http://www.robtheblo...gramming.html#5
There's a 3ds loader here:
http://www.garagegam...ources/view/506
Like Sol HSA says, though, you'll learn more if you write your loader and obj is pretty easy to figure out if you open the file. NEHE also has a model loading tutorial but its for milkshape 3d. The first link is a tutorial for obj files so it's probably your best bet.
http://www.robtheblo...gramming.html#5
There's a 3ds loader here:
http://www.garagegam...ources/view/506
Like Sol HSA says, though, you'll learn more if you write your loader and obj is pretty easy to figure out if you open the file. NEHE also has a model loading tutorial but its for milkshape 3d. The first link is a tutorial for obj files so it's probably your best bet.
Currently using Blender 2.5, FlashPunk, and Unity.
#7
Posted 18 February 2009 - 02:08 PM
fireside said:
There's some c++ code for loading obj on this page:
http://www.robtheblo...gramming.html#5
There's a 3ds loader here:
http://www.garagegam...ources/view/506
Like Sol HSA says, though, you'll learn more if you write your loader and obj is pretty easy to figure out if you open the file. NEHE also has a model loading tutorial but its for milkshape 3d. The first link is a tutorial for obj files so it's probably your best bet.
http://www.robtheblo...gramming.html#5
There's a 3ds loader here:
http://www.garagegam...ources/view/506
Like Sol HSA says, though, you'll learn more if you write your loader and obj is pretty easy to figure out if you open the file. NEHE also has a model loading tutorial but its for milkshape 3d. The first link is a tutorial for obj files so it's probably your best bet.
ooo really.. thnks a lot.. well, may i ask u about AUGMENTED REALITY IN EDUCATION.. actually my final year project is about ARToolkit.. so may i know how to build my own program and combine with ARToolkit? can u help me? please i really2 need your help... thnks....
#8
Posted 18 February 2009 - 05:15 PM
I took a quick look. It's just c and opengl, so you should be able to load a model and display it like the tutorial for loading objects. You should be working through the tutorials for ArTool and probably ask your teacher for help if you can't understand it. ArtTool looks like it may have model loaders, are you sure it doesn't? If there is a forum for it, that's the first place you should go to ask questions, rather than a general forum like this one. Otherwise it uses Glut, so just find some Glut tutorials on opengl if you can't understand the tutorials from ArtTool. You should start by making triangles and quads and such before working on a model loader. NeHe has some opengl tutorials. From the looks of it, though, I would guess they already have a model loader set up.
Currently using Blender 2.5, FlashPunk, and Unity.
#9
Posted 23 February 2009 - 04:08 AM
NeHe?? what is that?
#10
Posted 23 February 2009 - 04:45 AM
As a two-second Google search would have told you, it's http://nehe.gamedev.net/
reedbeta.com - developer blog, OpenGL demos, and other projects
#11
Posted 26 February 2009 - 10:37 PM
On my website you'll find instruction for creating a caligari COB file loader. I also show how to create your own file format. In the next little while I'll be posting code how to load FBX files too.
3D OpenGL, C++ Game Development Video Tutorials @
www.marek-knows.com
www.marek-knows.com
#12
Posted 03 March 2009 - 05:02 AM
orait.. thnks a lot because helping me.. ermm do u know about augmented reality in education? actually my final year project is about augmented reality.. and my lecturer(supervisor) said must use ARToolkit.. do u know about ARToolkit? i want to build my own program using ARToolkit.. could u please give me some guide for build my own program?.
#13
Posted 03 March 2009 - 07:59 PM
I don't know if you are having problems with Google, but I looked up the forum for you to ask questions:
http://www.hitlabnz....display.php?f=4
Go to the development and code sections. There are some questions about model loading there so read them and then ask for help if you don't understand.
http://www.hitlabnz....display.php?f=4
Go to the development and code sections. There are some questions about model loading there so read them and then ask for help if you don't understand.
Currently using Blender 2.5, FlashPunk, and Unity.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











