Lead me to a decent file format.

I’m working on rolling my own 3D modeler and have come to a point where I need to make a decision about file format. Currently it is loading OBJ files using the built-in functions of the current mesh library(OpenMesh). OpenMesh doesn’t properly parse the OBJ’s MTL files so I need to write a loader for the material files at least. Here’s my issue, if I’m going to write my own import(and presumably export) routine what better options do I have besides OBJ?

Here’s the basics of what I need…

  1. Ability to store vertices, faces and UV coords for non-manifold meshes. (Duh!)
  2. It needs to be fairly simple and well documented. (OBJ has always been good for that.)
  3. Unless it perfectly fits my needs, it needs to be extensible. Such as in the OBJ format, it is the rule “if the importer doesn’t understand something, it just skips over it.” So an application can store its own proprietary data in the files and this won’t break other (properly written) importers.

Here’s what I would like, but as long as the file format is extensible these could be worked around…

  1. Flagging of hard edges AND shading groups.
  2. Saving of cameras and the current view.
  3. Material support beyond the basic diffuse, specular, shininess defaults. GLSL shaders?
  4. Current subdivision and shading mode(smooth,edges,ghosted,hidden,etc)on an object by object level.

I think COLLADA will probably do everything I need and want, but I also think it breaks my simple requirement. It seems to fancy itself as being the ultimate cross package file format and I don’t want to wade through volumes of documentation just to learn the simplest most straight forward portions of it. And it is constantly evolving in directions I don’t care about. I don’t want my import/export to be writing files that may be depricated down the road.

I’m kind of drawn to the idea of just building my own format on top of OBJ, because it is simple, stable and I am familiar with it. Plus a decent importer should pick up the crucial bits without error.

There are a gaggle of file formats out there and I really don’t know just what all they might offer.

Does anyone have any ideas or input that may, or may not, be useful?


EDIT: Oops, I thought I posted in the general Blender and CG Discussions forum. If this is in the wrong place would a mod please move it? Thanks!