Open formats for models

Hi, is there an open fileformat for models.

My designers are supplying me 3ds files all the time. But I am not sure how to read those files from my programming code. Is there a way to convert those files to XML files or some other open format? Or better is there a way to export from 3D Studio Max to some open format?

Thank you in advanced

What does this have to do with OpenGL?

Hi,
3D Studio Max can export in VRML97

s03, I figured there would be somebody here that knew the answer, since it is an unavoidable problem. (Also it could have been possible that opengl supported some format, like directx supports .x files.)

Thank you for your help twxs. I really appreciate it!

For open file format, I suggest you use COLLADA. It is done by khronos group. Also, look into FBX SDK provided by AutoDesk, it supports few popular file formats including 3ds and COLLADA. 3Ds is very widely used format and COLLADA is open standard format. FBX is free and platform independent.

Info on FBX http://usa.autodesk.com/adsk/servlet/index?id=6837478&siteID=123112
Info on COLLADA http://www.khronos.org/collada/

Or better is there a way to export from 3D Studio Max to some open format?
You can write a custom exporter and save in any format you like. Visit their website and look for the developer tools/SDKs.

Collada defines a base schema that facilitates asset transport in complex tool chains, like those used in OpenGL|ES PS3 development, though it could be used for anything you like. Khronos has it’s own website and forum for this stuff.

OpenGL itself provides no file formats of any kind.

Hi,
if you export into VRML97, you will get a wrl file which perhaps lost some information such as animation.

Hi,

Collada is a great open model format. If you’re using C++, you can use the Collada DOM lib that makes things easier when handling XML files.

About 3DS, Collada does have some importers/exporters in its forum ( Collada 3DS Importer/Exporters ). There are some plugins for other 3D modelers too (like Blender or Maya).

Hernan

Thank you for all the information.

Collada sounds like a great format but I figured it is probably a bit too advanced for what I want to do. After all, the point is that I have to write some code to read those files.

Seems like X3D has a lot of crazy properties too and I don’t like the structure that much at all. But not to lose much more time I started to write X3D support. But the more I worked on it the more I realized how confusing the structure of this format is.

I was actually looking for something simple that looks more like:

OBJECT name=“this is a car”>
SHAPE name=“this is a couple of lines”>
TEXTURE SomeInformationGoesHere/>
POLYGON drawingmethod=“GLTRIANGLES”>
POINT x=“2” y=“5” z=“10”/>
POINT x=“10” y=“1” z=“2”/>
POINT x=“1” y=“4” z=“3”/>
/POLYGON>
…some more polygons
/SHAPE>
…some more shapes
/OBJECT>

So now I am going to throw out that X3D stuff and going to look up some information to write an exporter for 3D Studio Max. Hopefully this can be written in C#. Allthough I guess it will be in C++ again. It’s a C++ world we are living in :slight_smile: .

I would suggest against VRML. Sometimes, the conversion isn’t correct, sometimes there are some differences… you almost NEVER get back what you put in.

I did some tests with VRML (not sure of the version) two years ago and it didn’t cut it for me. If you’re lucky it may do the job. Good for you.
Consider however COLLADA is the final solution. If you get it working (at least sufficiently well) you’ll never have this issue again. Wow!

PS: remember it’s an exchange format, do not use it for final assets, this would suck so badly!