PDA

View Full Version : Is there a public domain parseable mesh file repository?



flagrant2
05-23-2015, 05:39 PM
I'm looking for a collection of freely downloadable and useable mesh files that I can read as a text file for use with opengl. I've looked all over for something like this and found stuff like blendswap.net, opengameart.com and artist-3d.com, but the files are all proprietary or binary formats (.blend, .3ds) that look like gibberish when you open them with a text editor.

I'd really like to find some .raw files, or even xml, anything that you can use without buying some bloatware garbage or spending days learning some library so you can get a bunch of float vectors out of these ridiculous file formats. Any suggestions?

Alfonse Reinheart
05-23-2015, 06:42 PM
I've looked all over for something like this and found stuff like blendswap.net, opengameart.com and artist-3d.com, but the files are all proprietary or binary formats (.blend, .3ds) that look like gibberish when you open them with a text editor.

You could load them in the appropriate program and export them as something you can read. For .blend, those go to Blender3D (https://en.wikipedia.org/wiki/Blender_%28software%29), which is free.


I'd really like to find some .raw files

Generally speaking, .raw is used for images (https://en.wikipedia.org/wiki/Raw_image_format), not meshes. I don't know of a "raw" mesh format.

Carmine
05-23-2015, 07:04 PM
The Wavefront .obj format is what you need. It's an ASCII format that is easy to understand and well documented. I've written code to input and display it in OpenGL myself. If you look around, you can probably find code that's already written for you. Been playing around with 'Tiny OBJ' lately, which is a simple program that inputs .obj files. It's free and compiled first time on my Mac and Windows computers. obj format has been around for a long time. There are lots of models available for free in that format. There are also web sites that convert models in other formats, such as .3ds, into .obj format for free. Google Wavefront obj, or obj format, etc. Also, almost all modeling software imports and exports into .obj format.

flagrant2
05-24-2015, 03:01 AM
Thanks for the replies.

@Alfonse: Thanks for the tip about blender, I suppose I had assumed a libre software project would have no reason to use such an obfuscated file format. Being a relative noob to graphics, I just went to wikipedia and it told me about raw files, which seem easiest to parse. See http://en.wikipedia.org/wiki/Polygon_mesh#File_formats

@Carmine: That format should do the trick if I can get blender to export to it. Thanks!

Alfonse Reinheart
05-24-2015, 08:20 AM
Thanks for the tip about blender, I suppose I had assumed a libre software project would have no reason to use such an obfuscated file format.

It's binary, not obfuscated. And it's their native format because it's basically a memory dump of Blender3D's state. It contains information that no existing format could contain, at least not in a reasonable, easy-to-parse kind of way.

GIMP uses a binary format too. As do many other open source projects.


Being a relative noob to graphics, I just went to wikipedia and it told me about raw files, which seem easiest to parse. See http://en.wikipedia.org/wiki/Polygon_mesh#File_formats

And nobody uses that "format", because it's nothing but the vertex positions. Meshes need more than than just positions.

Carmine
05-24-2015, 01:20 PM
@Carmine: That format should do the trick if I can get blender to export to it. Like I said, almost all modeling packages can export to .obj format, including 'Blender'.