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

Warning: could not find a image file for texture #221

Closed alexkuz closed 5 years ago

alexkuz commented 5 years ago

FBX2glTF version: 0.9.7

It seems that converter cannot find embed textures for this FBX:

FemaleBust.fbx.zip

Warning: could not find a image file for texture: EyeDiffuseMap512x512.jpg.
Warning: could not find a image file for texture: HairDiffuseMap512x278.jpg.
Warning: could not find a image file for texture: SkinDiffuseMap1024x1024.jpg.
Warning: could not find a image file for texture: NormalMapHead1024x1024.jpg.
Warning: could not find a image file for texture: EyeDiffuseMap512x512.jpg.
Warning: node /RootNode/Root uses unsupported transform inheritance type 'eInheritRrSs'.
         (Further warnings of this type squelched.)
Animation CINEMA_4D_Main: [0 - 72]
Wrote 49562 bytes of glTF to ./FemaleBust_out/FemaleBust.gltf.
Wrote 3575392 bytes of binary data to ./FemaleBust_out/buffer.bin.

I have no experience in dealing with 3D models, but Blender handles textures just fine.

(also when I load the result in https://gltf-viewer.donmccurdy.com/ it looks weirdly "metallic" - not sure if that's a converter's problem, though, probably not)

zellski commented 5 years ago

Hello @alexkuz,

  1. I don't think the textures you mention are actually embedded in that FBX. Are they perhaps just somewhere on your filesystem? When you say, "Blender handles textures just fine", is this a general statement about Blender, or do you mean that you can import this FBX intro Blender, and the textures then show up? If so, Blender may do more magic to try to locate them. But I'm interested in finding out more.
  2. This model uses old-style Phong materials, whereas glTF 2.0 made a permanent move to modern-style physically-based materials. FBX2glTF will do its best to convert old-style to new-style, but it's impossible to do precisely (the information simply can't be disentangled), and difficult to do even remotely well. In other words, the models aren't going to look like they will in e.g. Blender, or a 3D engine that still contains old-style shaders.
alexkuz commented 5 years ago
  1. Oh, I guess you're right - just tried to remove all the textures from fs and, indeed, it didn't appear in Blender when I imported the model. Sorry for a false alarm :)
  2. Thanks so much for explanation!