Sign in to follow this  

3d file formats: homebrew or use existing?

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

I'm at a crossroads right now. Before I can continiue coding, I need to decide whether to create my own file format, or use an existing one such as MD3. If I did make my own, I would need to utilize the following features: x,y,z normal-x,normal-y,normal-z u1,v1 ... un,vn indices [bone info] or [keyframe info] Am I missing anything else? Is it really harder to make your own? What about supporting 3DS files natively (like Irrlicht does)? Also, for the designer of Irrlicht, where on Earth did he find the necessary docs to use the modeling program formats natively?

Share this post


Link to post
Share on other sites
What do you mean by natively?
Anyways you can get the docs from a variety of places, here are some for 3ds.

Since I have not made my own model format I can't help you there.

Share this post


Link to post
Share on other sites
Defining your own model is not very difficult, if you have a solid understanding of your needs. Be sure to plan the format carefully, though, so you have room for improvement later (eg. don't use fixed offsets to any data etc.).

Share this post


Link to post
Share on other sites
Quote:
Original post by WilyCoder
...
Also, for the designer of Irrlicht, where on Earth did he find the necessary docs to use the modeling program formats natively?
Most likely www.wotsit.org - a free file format collection.

I've been fighting with this question myself, mostly the problem is solved by me having no time or excess energy to actually write anything that would need a model format... :P

Share this post


Link to post
Share on other sites
I think if youre not sure about which way to take, a good choice would be to just use an already existing one like the 3ds that you mentioned, and also notice there are plenty of 3d format converters around there, so you can almost 99% of times just get a conversion from a given format to the one you desire.
Natively supporting a format is not hard, it would suffice to create some parser class that would read the format.

PD: Writing your own aint that hard, all i can tell you is to look at existent file formats, and then try to steal the best from them :)

Share this post


Link to post
Share on other sites
I use the md2 format. It comes with what I need, Keyframes, UVs, vertices, and normals. It doesn't come with overhead like lights and scene data, it is mesh only. If you make your own format, it might look something like this anyway. On top of that, the md2 format is common enough that most all modeling programs have an import/export for it.

Share this post


Link to post
Share on other sites
I used to use my own format. Which was super incredible do anything format that was impossibly complex. Huzza!
Fun thing to make. You should try it. might learn some stuff. (in fact, you will :)

now I use .x's. (well, for the time being at least) - since they are very fast and DX obviously has good support for them.

MS are currently re-jigging their .x exporter for 3DS max so I'm using the exporter here which is v.good.

3Ds files are fairly complex beasts really. Lots of things out there don't fully support them. For example they can do all sorts of things like animation, yet I havn't seen a 3Ds importer that even gets normals right, let alone anything that complex (eg, milkshape, the various model converters out there, etc).

Share this post


Link to post
Share on other sites
Use an existing format. Why waste time creating yet another model file format when there are so many already out there? If you create your own, won't you need to create your own modeller? Or at the very least create a conversion utility? If you create the utility, then you are going to need to know how to read other file formats anyway. If you create a modeller when your actual goal is to create a game, you will never achieve it. Writing a decent modeller is a daunting task by itself.

Share this post


Link to post
Share on other sites
^^^ I have used existing formats before (X files). Now that I have switched to OpenGL, I think it would be good for me to learn what is really happening "under the hood".

I thnk that writing the exporter would be the most challenging aspect, as I have no experince doing such a thing.

Share this post


Link to post
Share on other sites

This topic is 4662 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this