Advertisement

Importing models

Started by October 21, 2000 03:15 PM
7 comments, last by Cobra 24 years, 1 month ago
As you can probably all tell from the title, I need to know about importing models into a program. Its very very time consuming to actually build the models using Triangles, Quads and Polygons ( for glBegin(GL_...) ) Does anyone know of any VERY VERY simple tutorials on importing model files ( .mdl, .md3, e.t.c ) into my programs. When I say VERY VERY simple tutorials, I mean like nehe''s ones which are very full and complete so that you understand every little bit of it. ( It doesn''t matter how complex the tutorial is, as long as it explains well ). I actually need a tutorial that imports a model file, NOT a decompiled model in a .cpp file. If anyone knows of any good tutorials for this, could you please post a URL on this message... I''m pretty sure I''m not the only one who needs a tutorial like this, because as soon as we know how to do this, we can start making some truly impressive looking programs, whereas at the moment we keep it simple due to the time it takes to code it. It will also make it soooooooo much easier to edit/animate the models. If anyone knows ANY, please post them here. THANX in advance. THANX ~Cobra~
"Build a man a fire, and he will be warm for a day. Set a man on fire, and he will have warmth for the rest of his life"
Goto my website at http://welcome.to/zacksmith/ and download my Basic OpenGL Framework. It has .md2 (quake2) model support.

Zack
A moment enjoyed is not wasted. -Gamers.com
Advertisement
WOW! I wasn''t expecting anything quite so full.. THANX LOADS.. Much appreciated.
Its a little more complex than I was planning on, but its helped loads.

If anyone else has any tutorials/code for importing simpler models ( just a single shape, sphere, cube e.t.c without animation yet ) it would be appreciated if you posted it here.

Thanx again Zack

~Cobra~
"Build a man a fire, and he will be warm for a day. Set a man on fire, and he will have warmth for the rest of his life"
If your modeling program can export ASE files than your all set. ASE files are VERY easy to understand. They give you geometry and texture coordanites. You can load them up very easily also. Only with like 5 small loops.
What about making a 3D studio max exporter ?
It is highly effective and i think it''s quite easy, since 3d studio max has very good documentation on writing an exporter and it is very nice structured.
At the moment I''m still in the stage where I dont really know exactly how all that importing models thing works.

I went through Zacks MD2 coding, (very impressive by the way Zack), but its a bit of a big step to go from NO model coding knowledge to MD2 models with animations and frame counts e.t.c

If any of you have any tutorials just on importing a model like say a house or something, without animations e.t.c, then I can really get started understanding it.

TELL YA WHAT.. as soon as I know how to do it, I will personally write a very simple tutorial on importing models so that even newbie OpenGL programmers can understand it, and I will send it to NeHe if he wants to put it up. That way we''ll all know how to do it.

As soon as I know models e.t.c actually work when importing them, THEN I can start writing programs like model viewers, editors e.t.c, whereas at the moment Im still kinda in square1, I.E a total newbie to importing models.

Once again... if anyone knows any good tutorials for importing models, please post the URLs here. And once again Thanx to Zack for the MD2 coding.

~Cobra~
"Build a man a fire, and he will be warm for a day. Set a man on fire, and he will have warmth for the rest of his life"
Advertisement
what''s up with everyone needing tutorials? wolfman is right. ase files are really easy. just export one, look at it, and see how it works.
OKAY, what''s an ASE file, what do I export one from e.t.c
I was going to ask this before but decided to wait and see if anyone could offer any tutorials e.t.c

Please reply.

~Cobra~
"Build a man a fire, and he will be warm for a day. Set a man on fire, and he will have warmth for the rest of his life"
An ASE file is a file format that stores 3D model data. It looks something like this:

VERTICES:
0: 3.2 0.0 2.6
1: 2.6 1.6 5.2
2: 2.7 1.5 2.7
3: 2.8 4.9 3.6
....

FACE:
0: 0 2 3
1: 2 1 3
2: 2 0 4
....

They also have additional information on texutre coordanites and stuff.

Most 3D modelers can export to an ASE file.

This topic is closed to new replies.

Advertisement