Community
Why does this file crash the ViewScene.exe viewer from the 2006 FBX SDK?
Do all FBX files written with 2009.3 SDK now crash older viewers?
If so, why?
As I previously said take care that I removed the content of the vertex data within the file to make it smaller for posting.
Indeed, I think that my problem is related to texture connections and it should be sufficient for illustration of this.
KFbxProperty lProperty;
int lNbMat = pGeometry->GetNode()->GetSrcObjectCount(KFbxSurfaceMaterial::ClassId);
for (lMaterialIndex = 0; lMaterialIndex < lNbMat; lMaterialIndex++)
{
KFbxSurfaceMaterial *lMaterial = (KFbxSurfaceMaterial *)pGeometry->GetNode()->GetSrcObject(KFbxSurfaceMaterial::ClassId, lMaterialIndex);
bool lDisplayHeader = true;
if(lMaterial){
//Diffuse Textures
lProperty = lMaterial->FindProperty(KFbxSurfaceMaterial::sDiffuse);
FindAndDisplayTextureInfoByProperty(lProperty, lDisplayHeader, lMaterialIndex);
......
}
}
Hello,
I wrote a FBX importer that retrieves materials based on the DisplayTexture.cxx example.
However, I cannot properly get the texture in the attached file (I also provide my code).
NOTE : I removed the vertex data from the file because it is too big, it is just given as illustration
but do not try to open it (I have the original file/texture if one needs it to test).
I am not a FBX expert but it seems that the texture is attached to the geometry and not the material
within the file. I don't know why, maybe it is a different way than usual to manage texture in FBX...
Nevertheless, if I convert the file to OBJ with the FBX converter the output is fine, i.e. the material has a map_Kd.
So I suspect my code does not cover all possible cases and I hope that someone can help me extend it.
Thanks in advance.
So the file has no problem, and I suggest u to double check your code on convertMaterialToXML.
I am not sure how you get your material, but here is the code in DisplayTexture.cxx
Can't find what you're looking for? Ask the community or share your knowledge.