libgdx / fbx-conv

Command line utility using the FBX SDK to convert FBX/Collada/Obj files to a custom text/binary format for static, keyframed and skinned meshes.
Apache License 2.0
448 stars 116 forks source link

Material count crash #48

Closed VinceAngel closed 9 years ago

VinceAngel commented 10 years ago

Hi, I'm trying FBX conv on FBX models from the www. Some models are good, some other crash during conversion and I don't figure out why exactly. I get this file for example : http://tf3dm.com/3d-model/modern-desk-34387.html to convert from FBX, and I got an error in the FbxConverter.h in prefetchMeshes() line 457 :

if (info->elementMaterialCount <= 0) { log->error(log::eSourceConvertFbxNoMaterial, getGeometryName(geometry)); scene = 0; break; }

It seems that the material count is 0, but I don't get why. I tried to debug it by myself but without any success... sorry for that.

If I can help... let me know !

Thanks.

xoppa commented 10 years ago

Thanks, I will have a look at it. Btw, importing the fbx in your modeling application and then re-exporting to fbx seems to do trick for now.

VinceAngel commented 10 years ago

Ok thanks, I'll try ! Sorry to be only able to gives issue without PR, I would prefer to submit a fix.

xoppa commented 9 years ago

Looks like the file includes non-standard materials. The fbx specification allows for such materials, but we currently don't support those. I don't think that supporting non-standard materials is something that will be added unless someone send a pull request.