facebookincubator / FBX2glTF

A command-line tool for the conversion of 3D model assets on the FBX file format to the glTF file format.
Other
2.1k stars 332 forks source link

Embedded textures lost during conversion #152

Closed ANTONBORODA closed 5 years ago

ANTONBORODA commented 5 years ago

Hello, When trying to convert the attached file from FBX to glTF all the textures, except one, are lost and all texture references in glTF are replaced with the first one. It's working fine with 3DS Max and Unity. Tried to convert on Windows and Mac OS. Same result. testRoom_asci.FBX.zip

zellski commented 5 years ago

Thank you very much, especially for including a FBX file to reproduce it! I'll dig into this today. I'm especially interested (and humbled) because I've seen the behaviour you describe once before, but at the time I dismissed it as a problem with the FBX...

ANTONBORODA commented 5 years ago

I digged a little deeper and it seems like a problem with an FBX file and not the converter.

ANTONBORODA commented 5 years ago

And I'm back again with the same issue. We thought it was an issue with our FBX pipeline, but no. The issue is still here.

ANTONBORODA commented 5 years ago

I've removed a previous large repro project. Here's a very simple repro. Only 2 textures and second one is lost during conversion. simpleRepro.fbx.zip

zellski commented 5 years ago

Great, thanks. Should be able to investigate shortly.

zellski commented 5 years ago

Ugh. We were using the logical FBX name of the texture as a key, and both yours are named "Diffuse Texture". I'll figure out what's a better discriminator –– probably file location –– and fix it.

zellski commented 5 years ago

Fixed in https://github.com/facebookincubator/FBX2glTF/commit/12025de1799ef8d743e2543823cacdac185bdbdf. Will be included in 0.9.6.