I’m looking for a simple file format to use for wireframe models. I am aware of VRML, u3D, etc, but these seem heavyweight for my needs. My criterea are:
- Must have a clear spec. Either open or very well established/documented.
- I only need (want) simple models – vertices and edges. I don’t want to handle faces or objects. If the format supports more, that’s fine so long as I can ignore them.
- End-user tools are not a requirement, but would be great. If not, it must be human readable (and editable for simple models).
- It would be nice (but not necessary) to be able to annotate or at least label nodes.
- It shouldn’t matter what language I’m using, but probable options are Java/C++ & OpenGL
Or am I just better writing vertices/edge lists to a text file and be done with it?
I don’t know of any formats that actively target wireframe views. (Edge/vertex only) You’ll almost always have to deal with faces at the very least. The fortunate part there is that unless you have a very specific need for nothing but an edge list wireframe rendering can be done with just about any API from a face list.
As for the format, OBJ is good and simple, if a little outdated. It’s also likely the easiest format to find documentation for. Microsoft’s X files are great for quick and dirty rendering, but I’ve always been somewhat partial to the Quake formats. They tend to be very game-oriented, though, and as such include a lot of info you probably don’t want.
If none of those meet your needs, maybe look into COLLADA. It probably won’t work for you by itself, but you could write a quick exporter into your own format that only contains edge/vertex info, and at that point you essentially have support for every modeling package on the planet 🙂