4
$\begingroup$

I'm looking for a format where I could store a triangle mesh and multiple textures into a single file. Most formats only reference an external file for textures. I found that the FBX format should support this, but I need something with an open-source C++ library. And by single file I don't mean putting it into a single archive, I don't want users to have to deal with that.

I don't need anything fancy, no animation, no shading, nothing. Just triangles + textures. Ideally this would be a binary format (or at least the textures would be stored in binary inside the file). This should be some well supported format, so that tools exist to open it. I'm currently looking at X3D but I can't figure out if it can include the textures directly.

$\endgroup$
3
$\begingroup$

glTF is capable if embedding both geometry and texture data in a single file. It also has binary version (*.glb). There are several open-source savers/loaders, one of them being header-only tinygltf by Syoyo Fujita.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.