View Full Version : Loading 3D model
02-04-2001, 05:21 AM
I know that this is topic which is asked daily, but here it goes again. How could I load simple 3D models to my program (C++). It shouldn't be like ASE file which is like a text file.
Take anything but .3ds!!!
It's really not whell documented
(if you know where i can get some info
about the keyframe chunk mail i8myshoe@whatthe****.com, thanks http://www.opengl.org/discussion_boards/ubb/smile.gif )
goddamn, the word stared out is the f word http://www.opengl.org/discussion_boards/ubb/smile.gif
This is a problem I ran into. Basically, there is no default support for loading in model files and drawing them. So, you basically have to a.) find a parser for a given file format b.) build your own parser for a given file format. Once you read the file in then you have to organize the parsed data some way to be drawn. At this point you have an ulcer. Ended up writing a simple parser. Took some work but it sure would be great if opengl had a standard file format! Its a real barrier to entry.
02-05-2001, 08:16 AM
I've just worked on a game and I made 3D models with 3ds Max. To load these models in openGL, I did a script with MaxScript (you can export to a file the vertex, tex coordinates...). You just have to read your file at the beginning of your program.
02-05-2001, 09:15 AM
Ok, here are 2 cool links :
the one i use, http://lib3ds.sourceforge.net/ : a 3ds 4 lib for import/export .3ds files ;)
the one i WILL use, http://www.codercorner.com/Flexporter.htm : a 3ds max 3/4 exporter
02-07-2001, 04:08 AM
Speaking of 3D models, is there ANY out there that are:
2) Has a free Viewer/Editor for (IMPORTANT http://www.opengl.org/discussion_boards/ubb/smile.gif )
HELP!!!! I have the same problem!!!!!
So can't anyone give us some info on this particular subject?
I know it is discussed a lot but the thing is, the majority of the answers is "try 3DS", which seems to be a non-smart thing to do.
06-27-2003, 11:41 AM
There are myriad tools available online to parse various 3D modelling files and render them in OpenGL C code. I myself use a 3DS importer that I adopted off the web somewhere, I think www.gametutorials.com (http://www.gametutorials.com) (they also have OBJ and MD2 loaders).
Binary formats like 3DS are generally smaller and faster, but are somewhat more cryptic to understand and parse. Text formats like ASE and OBJ are much easier to understand and write for, but generate much larger files.
If you need a free viewer/editor, I would try Milkshape 3D (MS3D). I know that there are several OpenGL loaders for MS3D files, and the actual editor can be downloaded for free from http://www.swissquake.ch/chumbalum-soft/ms3d/download.html
06-27-2003, 01:51 PM
what - the 3DS format isn't very well documentet ?? please go to support.discreet.com, register there, go into the download section and download a pack called "3DS file toolkit 3", there is anything inside what you need to load and save 3DS files.
07-02-2003, 05:00 PM
It's been said a billion times before, but here goes: try www.wotsit.org. (http://www.wotsit.org.) They have documentation on most file formats.
I know you said that text isn't what you want, but OBJ in particular is an easy first format to parse. It's ASCII so it's human-readable. There are a few problems with OBJ that I have: I wish it stated at the top of the file how many vertices, faces, etc. there are. Second, I wish the index of the vertex list started with zero instead of one (so a face says "f 1 2 3" to mean it uses the first vertex, second, etc. instead of "f 0 1 2"). But mostly I just whining. http://www.opengl.org/discussion_boards/ubb/biggrin.gif
[This message has been edited by gtada (edited 07-02-2003).]
What program are you using to export with? I use 3DMax and i export to a wavemesh .obj format, increadibly EZ to read.
I take what i said back, just read the question again sorry... http://www.opengl.org/discussion_boards/ubb/redface.gif
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.