Jump to content
  • Advertisement
Sign in to follow this  
DocKode

OpenGL Big Scary 3D File Formats :(

This topic is 4613 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

Hey guys, I need some help badly. I've been back and forth through every OpenGL\C++ site I know and love, and have not been able to find what I need. I am currently working on a fun little personal project. I want to load some tile meshes into a world (somewhat akin to a 2d tile engine), and then I want to load a player mesh into the world. While I've successfully loaded md2, 3ds, and ms3d formats... they all seem like too much for what I want to do. Firstly... my tile meshes are rarley vary complicated and only really need to store vertices, uv's, and texture information. Secondly, my player model needs basically the same information, because of the small fact that it is static... it's not organic. Is there a compact file format that can store this information, and where can I get a tutorial on how to implement such a format. I'd like you to keep in mind that I'm fairly new to c++, I've been working with openGL for a while, but my skills as far as writting a loader from scratch are somewhat pathetic. I would like to avoid writting a custom format to do all this because I have a wonderful modelling tool that seems to be able to export to just about everything there is out there, I just need to know which format is the best for my needs and how to take advantage of it. In anycase, thanks in advance for any help you can lend me. This community has helped me out a lot today. :)

Share this post


Link to post
Share on other sites
Advertisement
Thankyou for your quick replies.

I did look at the .obj format, I've decided to use it as a last resort really... I should have mentioned it earlier. The problem is that the file size of a .obj file could be several times larger than an equivalent model in another format.

I am hoping to turn the project into something more, and would like use a binary format to save space, and to speed up the loading process. I know that there is a binary version of .obj, but I'm not interested in using it. Is there any chance there is a format similarly simple but in a binary format.

If not, I will end up using the .obj format. I was just hoping to avoid doing so. If worse comes to worse, I could actually just write a converter from .obj to my own format. I'm not totally opposed to this idea, I just think that it would be nice to save the step of converting. It makes my workflow so much better if I don't. You know?

Anyway, thanks again you guys are very helpful.

Share this post


Link to post
Share on other sites
Edit: Ha, I need to read better before I post ;)

Anyway, I'd suggest the idea of writing a little converter from one of the formats your comfortable with into your own format that has only what you need, in binary. Really wouldn't take very long, and then you get exactly what you want.

Share this post


Link to post
Share on other sites
That idea is getting ever more appealing. thanks again. please keep the suggestions comming, the more the merrier. :)

Share this post


Link to post
Share on other sites
How about compressed OBJs? It's the sort of format that would compress down very well. You could use the zlib sweet snippet that's on the front page right now.

Share this post


Link to post
Share on other sites
Quote:
Original post by Rasmadrak
If you're using 3dsmax, you can easily create your own exporter/importer and only go for the bits you need. :)

Same applies to about every modelling package out there [smile].
I always found the MAX SDK to be quite clunky, but hey - maybe that's just me [lol].

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I'm using a combination of modeling packages... maya, blender, and milkshape 3d, because I have several artists working on it for me. It's easier for them to save to a format like obj and then allow me to convert to my own format.

Thanks for all the help guys.

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!