Jump to content
  • Advertisement
Sign in to follow this  
Whelzorn

OpenGL 3d Model type?

This topic is 5086 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, let me first start off by saying that I am very new to OpenGL, and for that matter, all of 3d programming. I am pretty fluent in c++, and am looking to step up a level. I have been reading tutorials and such, and am now looking at various ways to load different types of 3d models. I have found a VERY basic format of model, it came from one of the NeHe tutorials, and looks something like this: NUMPOLLIES 36 // Floor 1 -3.0 0.0 -3.0 0.0 6.0 -3.0 0.0 3.0 0.0 0.0 3.0 0.0 3.0 6.0 0.0 -3.0 0.0 -3.0 0.0 6.0 3.0 0.0 -3.0 6.0 6.0 3.0 0.0 3.0 6.0 0.0 // Ceiling 1 -3.0 1.0 -3.0 0.0 6.0 -3.0 1.0 3.0 0.0 0.0 3.0 1.0 3.0 6.0 0.0 -3.0 1.0 -3.0 0.0 6.0 3.0 1.0 -3.0 6.0 6.0 3.0 1.0 3.0 6.0 0.0 ... etc... Ok, I know thats not really a type of 3d model, I was only wondering if there are any 3d modelling programs that will export to this, or a plugin for blender that has been already written (I can't do python...) that will export this. Another option is a simple class that I could learn to import some other fairly simple 3d model format, if anyone here knows of one. Thanks for helping a newbie, -Justin

Share this post


Link to post
Share on other sites
Advertisement
I don't know if there is anything to parse that and load it or export it from a 3d modeler. I do know that there are many 3d file formats with great support in programs already. Why don't you look into ones such as maybe 3DS, md2, md3 (first to come to mind)? You should be able to find all the information to load that kinda file, and many 3d packages can export to one of those formats.

EDIT: Oh yes, and look at Wotsit's for file format specifications.

Slaru

Share this post


Link to post
Share on other sites
An OBJ file is a popular supported format that is fairly easy to parse. For my own purposes, I've written a program that converts obj to a format very similar to what you describe. It's pretty easy, just read all of the vertices into a stl::vector, and when you get to the face definitions, spit out those vertices into your file. It wouldn't be much more difficult to store those vertices so that you can count the faces and output that number first. Most modeling programs support OBJ files.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!