FBX Export 3.1 Missing/texture Wrong UV #96538
Operating system: Mac 11.6.4 + Also headless on Ubuntu
Graphics card: AMD Radeon R9 M295X 4 GB
Broken: (3.1) Mac install and Snap on Ubuntu
Worked: (3.0) Mac install and Snap on Ubuntu
Short description of error
On export of FBX file (attached character.glb) when exporting as FBX "Copy" and "Embed textures". When importing the FBX into any Blender version the character UV is wrong / texture map missing based on file size being smaller.
Did on Mac and also on Ubuntu.
Exporting works for 3.0 headless and on Mac... can export this file as FBX and reimport it into with no issues.
Exact steps for others to reproduce the error
0. Blender 3.1
- Import GLB attached.
- File > Export > FBX
- Select "Copy" and "Embed" textures.
- Save/Export button
- File / New Project (or exist blender and restart)
- File / Import / FBX
- Select the exported FBX file
Repeat above steps with Blender 2.93 or 3.0 to see export work.
Based on the default startup or an attached .blend file (as simple as possible).
This is caused by a change in the glTF importer. For images embedded in the file, it used to write the image data to a uniquely-named tempfile and load that. It now packs the data directly with
img.pack() and does not set the image's filepath at all. I think the FBX exporter is using the filepath as a key, so it treats all images that have a blank filepath (which is all of them in this case) as the same.
This could be fixed by either having the FBX exporter handle blank filepaths, or by having the glTF importer assign images a unique "fake" filepath when importing.
I looked at the FBX importer and it always sets a filepath on images.
Changed status from 'Needs Triage' to: 'Confirmed'
@JulienDuroure I would rather not have blank filepaths in images in general, even if they are packed in Blender... So think this should rather be fixed from glTF side than FBX one?
- What about generated files? FBX exporter still have a problem in that case, doesn't it?
- Setting a filepath to packed images --> This displays on console, during glb import : ERROR: Image "" not available. Keeping packed image.
Any idea why this error message? BTW even with this error message, seems glb import works
Indeed generated pictures are not supported by FBX currently. But this is a separated issue imho.
I do not understand why you try to change the
sourceproperty of your image here? either it is packed, and then just set its
filepathproperty, or it is indeed extracted on disk, in which case you can switch its
FILEafter having set a valid filepath?
I do not understand why you try to change the source property of your image here?
AFAIK, the packed file is only used if the source is 'FILE' (just like eg the generated_color is only used if the source is 'GENERATED'). When the image is created with images.new, the source is initially 'GENERATED' so it needs to be switched to 'FILE' to actually use the packed file.
IMO it would be better to fix the FBX side since the glTF importer is not the only place images like this could come from.
I've been following this issue and I used to have this working in Blender 3.0.1. But today I can't get Blender 2.93, Blender 3.0.1 or Blender 3.4 to work. They all result in missing textures.
I have a workaround I built on my server using a headless blender install. Since I needed to do this often for work I made it an online app.
@Michael-Cawood let me know if this if for you (one time) or studio needs. For one time, the workaround is like this:
2.Explort as gltf (with the settings for seperate textures)
3.Reimport that gltf
4. Now you can export as FBX or whatever.
Hope this helps make your modeling conversion time happier.
@clayrain Genius! Yes, that fixed it. Well done. Thank you. I used Blender 2.93 for it to work.
@Michael-Cawood glad it worked. Good luck with your project!
Any love for me Blender and the rest of us? Feel like fixing this issue yet???
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?