3.2.3 X9.0.4WindowsAssimpI have been working with FBX models with Assimp and there seems to be an error in Assimp triangulating FBX models. There are many voids in the models and the indices are not always correct which leads to random triangles connecting different points on the mesh. If I triangulate the FBX in blender before loading it with Assimp the mesh is triangulated correctly. I was wondering what version of Assimp LWJGL 3.2.3 is using and if you could recommend a different version that may have a later version of Assimp?

Left = FBX file triangulated and exported from Blender.
Right = Raw FBX file from web, animations work correctly the mesh is just missing pieces. When that FBX is opened in Blender it renders no problem. The result of exporting the FBX Triangulated is seen on the Left.
Here are my assimp options: (Note No errors are reported after the model is imported)
AIPropertyStore store = Assimp.aiCreatePropertyStore();
AIScene aiScene = Assimp.aiImportFileExWithProperties(resourceName,
Assimp.aiProcess_Triangulate |
Assimp.aiProcess_FlipUVs |
Assimp.aiProcess_CalcTangentSpace |
Assimp.aiProcess_GenNormals |
Assimp.aiProcess_GenUVCoords |
Assimp.aiProcess_LimitBoneWeights |
Assimp.aiProcess_FixInfacingNormals |
Assimp.aiProcess_GenBoundingBoxes,
null,
store
);
if (aiScene == null) {
System.out.println("Error loading:" + fileExtension);
System.err.println(Assimp.aiGetErrorString());
LinkedList
out.add(DEFAULT_MODEL);
return out;
}
Here is the base FBX if you would like to test with your implementation as this could just be a problem on my side
Hi,
I've tested your model with the animation implementation for Vulkan that I'm writing https://github.com/lwjglgamedev/vulkanbook/tree/master/booksamples/chapter-14 and I cannot see the effects you've described. However, I am seeing some strange artefacts for some parts of the model. So I've tested with the equivalent sample for OpenGL here and it seems to work perfectly.
I'm using the assimp version that comes with the LWJGL version 3.2.3. So it seems to me that they may be some issue either with the way you load the model data or the way you use it for rendering. Now I need to check also my Vulkan code, because there is something plain wrong there...
I appreciate you trying this out, The problem must be in my code somewhere then.

I figured it out based on your comment. It was how i was calculating the order the indices were loaded into my VBO. I made the FALSE assumption that when you triangulated the mesh the order the indices were stored in assimp changed but that's not the case. I switched this to loop through each face and then each index of each face to generate a corrected set of indices and that worked.
Glad to hear that ! It will also help me to debug my code.