3
\$\begingroup\$

I consider using OpenCTM files for my game. Since the format only claims to store raw mesh data, my question is if there is a associated file format for material data and paths to texture maps.

For example material of .obj meshes are stored in .mtl files. Is there such a format for OpenCTM, too?

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

To quote directly from the link you provided:

For instance, OpenCTM does not handle multiple meshes, transformation matrices, materials, light sources, physical properties, etc.

So, the answer is it does not have built in material support. However, it also says 'Supports storage of per-vertex normals, UV coordinates and custom vertex attributes.' This means that you can provide a texture separately, and also light/bump maps. All you'll have to do is put a bit of extra work in. To be honest, you could use a .mtl file and just repurpose it.

\$\endgroup\$
3
  • \$\begingroup\$ I read that, too, but it doesn't say that there is no associated file format for material, does it? I already thought about using *.mtl files but then I might better step away from OpenCTM at all and focus on Wavefront. \$\endgroup\$
    – danijar
    Commented Mar 25, 2013 at 11:44
  • \$\begingroup\$ @sharethis You can bet your bottom dollar (or equivalent) that if there's no handling for something it doesn't exist (holds true 99% of the time). Honestly, I would either use Wavefront if memory isn't an issue (it's ridiculously easy to parse) or .3ds if memory is an issue - there's an excellent article here on how to load a 3ds file - it isn't that difficult. On the other hand, OpenCTM is quite compact as formats go, and .mtl files were created to be able to be independent (it doesn't rely on anything in .obj itself). \$\endgroup\$
    – Polar
    Commented Mar 25, 2013 at 11:47
  • \$\begingroup\$ @danijar Oops, made the same mistake here. I wonder why I read sharethis... \$\endgroup\$
    – Polar
    Commented Mar 25, 2013 at 15:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .