I'm trying to load .obj files in my little game. I decided to use assimp as tool to import those models. But it seems that assimp does not import them correctly.

I looked for a simple cube mesh online and found this one: http://cs.wellesley.edu/~cs307/tw/objects/cube-textures.obj

But when importing the model the number of faces is only 11 instead of 12. I then tested to load the model in the model viewer provider by assimp. But the problem is the same, one face is missing.

Is there anything I'm missing? Here is my loading code:

const aiScene* AssimpScene = this->AssimpImporter.ReadFile("C:/cube.obj",  aiProcess_CalcTangentSpace);
  • \$\begingroup\$ My first guess was that the file was missing an LF at the end, causing the last line to be ignored, but after examining it that doesn't seem to be the case. It appears to be a well formed OBJ; loads in Maya and has correct face normals, so it's not a matter of back face culling. On the other hand it's hard to believe there would be a bug in Assimp's OBJ loader, given it's ubiquity. Is it possible your local copy has been corrupted somehow? \$\endgroup\$ – bcrist Oct 14 '14 at 23:29
  • \$\begingroup\$ Also, when you say "the model viewer provided by assimp" are you referring to the old assimpview or the new open3mod? The file loads fine for me in the latter. \$\endgroup\$ – bcrist Oct 14 '14 at 23:38

Your Answer

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

Browse other questions tagged or ask your own question.