Page MenuHome

Fbx export writes the embedded textures paths with a .fbm extension after playing with 'pack/unpack textures into blend files'
Closed, ResolvedPublic

Description

System Information
Operating system: unknown / irrelevant
Graphics card: unknown / irrelevant

Blender Version
Broken: 2.80
Worked: unknown / untested

Short description of error
When exporting to FBX with embedded media causes the referenced textures paths to have '.fbm' as a file extension rather than their original type ( ie : jpg or png ) in the FBX file.
This causes other applications like Unity or 3DsMax to fail importing the embedded textures.
Upon saving and reopening the blend file, the issue persits.

Exact steps for others to reproduce the error
0) open blender

  1. assign a texture to amaterial
  2. Pack texture into blend file
  3. Unpack all into files
  4. export to FBX with embedded textures
  5. Notice that the texture file name ends with .fbm in the FBX file. ( with FBX converter or just open the file in a text editor )

Event Timeline

Any progress on this as it is bit of a blocker for us in the Indie Games area who use Blender and import into Engines like Unity.

Germano Cavalcante (mano-wii) lowered the priority of this task from Needs Triage by Developer to Needs Information from User.EditedWed, Nov 27, 1:53 PM

What do you mean by: "Using 'pack textures into blend files' then 'unpack files' seems to corrupt the blend file"?
Please describe only one bug per report.

What he is saying, is that when you export to FBX with embedded textures, the texture in the FBX has an extension of FBM, which Unity3D will ignore.

What he is saying, is that when you export to FBX with embedded textures, the texture in the FBX has an extension of FBM, which Unity3D will ignore.

If this is the case, I will remove that part in the description.

Not sure if this is a problem in Blender or if it is a limitation in Unity and 3DsMax.

@Bastien Montagne (mont29), what do you think?

FBX exporter is generating local paths like untitled.fbm/Screenshot from 2019-11-20 19-25-02.png for embedded data, which afaik follows FBX conventions (having a subdir next to the fbx file, named after that fbx file with 'fbm extension, and put all embedded data there)... In any case, it does not change extension of the file itself.

So unless you can demonstrate that this is a broken behavior, am afraid there is nothing wrong on our side of the code here...

I will have to let the person who created this ticket explain, as he works for Unity. But what I can tell you is what he has told me, is that in Blender 2.8 when you export an FBX, Unity will no longer recognize the texture and will not export the embedded texture. from the FBX file. Blender 2.79, seems to not have this issue or at least I can't duplicate in with Blender 2.79 and I have maintained with Unity, that every other package that can read FBX files, does not have an issue with the FBX only Unity seems to.

But Unity have point blank said that this is a Blender 2.80 issue and wont budge on it.

this third party communication is never going to work, if Unity believe there is a problem with Blender FBX exporter, they are more than welcome to make a proper report with proper technical explanations. Until I get that kind of info, there is nothing I can do. Besides losing time checking on things that are working as expected afaik.

Hi everyone, the issue I'm referring to is not that the file extension itself is changed but the path written in the FBX file ends up with a .fbm extension.

What do you mean with: "Using 'pack textures into blend files' then 'unpack files' seems to corrupt the blend file"?

That seems to be the action that causes the issue, what I mean by corrupt the file is that once this action has been made, the export bug occurs even after closing and reopening the .blend file.

I attached a video to illustrate the reproduction steps, I hope that clarifies it.

Hi everyone, the issue I'm referring to is not that the file extension itself is changed but the path written in the FBX file ends up with a .fbm extension.

What do you mean with: "Using 'pack textures into blend files' then 'unpack files' seems to corrupt the blend file"?

That seems to be the action that causes the issue, what I mean by corrupt the file is that once this action has been made, the export bug occurs even after closing and reopening the .blend file.
I attached a video to illustrate the reproduction steps, I hope that clarifies it.

Just to be clear the pack all and unpack all, is not something I do either. In the video they are not what I do to export the FBX.

And here is an image of the settings I always use when exporting an FBX into Unity and have been doing it this way for a long time. I do not, do that pack all and unpack all.

Still cannot confirm that, exporting embedded image file still gives me proper full name:

["Texture", [545603934, "base_color_texture::Texture", ""], "LSS", [
    ["Type", ["TextureVideoClip"], "S", []],
    ["Version", [202], "I", []],
    ["TextureName", ["base_color_texture::Texture"], "S", []],
    ["Media", ["Screenshot from 2019-11-20 19-25-02.png::Video"], "S", []],
    ["FileName", ["/home/guest/Downloads/untitled.fbm/Screenshot from 2019-11-20 19-25-02.png"], "S", []],
    ["RelativeFilename", ["untitled.fbm/Screenshot from 2019-11-20 19-25-02.png"], "S", []],
    ["Properties70", [], "", [
        ["P", ["UseMaterial", "bool", "", "", 1], "SSSSI", []]]]]],
["Video", [238807933, "Screenshot from 2019-11-20 19-25-02.png::Video", "Clip"], "LSS", [
    ["Type", ["Clip"], "S", []],
    ["Properties70", [], "", [
        ["P", ["Path", "KString", "Url", "", "/home/guest/Downloads/untitled.fbm/Screenshot from 2019-11-20 19-25-02.png"], "SSSSS", []]]],
    ["UseMipMap", [0], "I", []],
    ["Filename", ["/home/guest/Downloads/untitled.fbm/Screenshot from 2019-11-20 19-25-02.png"], "S", []],
    ["RelativeFilename", ["untitled.fbm/Screenshot from 2019-11-20 19-25-02.png"], "S", []],

Please attach here one of your problematic FBX files, but almost certain it's Unity which is acting up on the untilted.fbm/foobar.png kind of paths here...

Still cannot confirm that, exporting embedded image file still gives me proper full name:

["Texture", [545603934, "base_color_texture::Texture", ""], "LSS", [
    ["Type", ["TextureVideoClip"], "S", []],
    ["Version", [202], "I", []],
    ["TextureName", ["base_color_texture::Texture"], "S", []],
    ["Media", ["Screenshot from 2019-11-20 19-25-02.png::Video"], "S", []],
    ["FileName", ["/home/guest/Downloads/untitled.fbm/Screenshot from 2019-11-20 19-25-02.png"], "S", []],
    ["RelativeFilename", ["untitled.fbm/Screenshot from 2019-11-20 19-25-02.png"], "S", []],
    ["Properties70", [], "", [
        ["P", ["UseMaterial", "bool", "", "", 1], "SSSSI", []]]]]],
["Video", [238807933, "Screenshot from 2019-11-20 19-25-02.png::Video", "Clip"], "LSS", [
    ["Type", ["Clip"], "S", []],
    ["Properties70", [], "", [
        ["P", ["Path", "KString", "Url", "", "/home/guest/Downloads/untitled.fbm/Screenshot from 2019-11-20 19-25-02.png"], "SSSSS", []]]],
    ["UseMipMap", [0], "I", []],
    ["Filename", ["/home/guest/Downloads/untitled.fbm/Screenshot from 2019-11-20 19-25-02.png"], "S", []],
    ["RelativeFilename", ["untitled.fbm/Screenshot from 2019-11-20 19-25-02.png"], "S", []],

Please attach here one of your problematic FBX files, but almost certain it's Unity which is acting up on the untilted.fbm/foobar.png kind of paths here...

This is the file that I used to report this with Unity.

Nothing special with this model, but I certainly did not do the pack all and unpack all that the OP did.

All I did was switch to UV Editing and create an image, unwraped the cube and painted on the texture. Then saved the texture and did a standard shader node setup. I then exported this file with the settings I have in the image I posed above.

Unity says that the filename only has an Extension of FBM, as it is binary I can't confirm that.

Indeed, that file has:

["Texture", [94811292, "base_color_texture::Texture", ""], "LSS", [
    ["Type", ["TextureVideoClip"], "S", []],
    ["Version", [202], "I", []],
    ["TextureName", ["base_color_texture::Texture"], "S", []],
    ["Media", ["CubeTexture.png::Video"], "S", []],
    ["FileName", ["E:\\Unity\\_pubgTest\\Assets\\CubeTest.fbm"], "S", []],
    ["RelativeFilename", ["CubeTest.fbm"], "S", []],
    ["Properties70", [], "", [
        ["P", ["UseMaterial", "bool", "", "", 1], "SSSSI", []]]]]],
["Video", [531937063, "CubeTexture.png::Video", "Clip"], "LSS", [
    ["Type", ["Clip"], "S", []],
    ["Properties70", [], "", [
        ["P", ["Path", "KString", "Url", "", "E:\\Unity\\_pubgTest\\Assets\\CubeTest.fbm"], "SSSSS", []]]],
    ["UseMipMap", [0], "I", []],
    ["Filename", ["E:\\Unity\\_pubgTest\\Assets\\CubeTest.fbm"], "S", []],
    ["RelativeFilename", ["CubeTest.fbm"], "S", []],

Can you please attach the .blend and texture files then? I still cannot reproduce that kind of broken path...

sure

Still cannot reproduce that, if I put the texture file one level up in dir hierarchy compared to the .blend file (since its relative path is //../), open your .blend, and export with copy+embed options, I still get expected results:

["Texture", [715784328, "base_color_texture::Texture", ""], "LSS", [
    ["Type", ["TextureVideoClip"], "S", []],
    ["Version", [202], "I", []],
    ["TextureName", ["base_color_texture::Texture"], "S", []],
    ["Media", ["CubeTexture.png::Video"], "S", []],
    ["FileName", ["/home/guest/Downloads/CubeTest_local.fbm/CubeTexture.png"], "S", []],
    ["RelativeFilename", ["CubeTest_local.fbm/CubeTexture.png"], "S", []],
    ["Properties70", [], "", [
        ["P", ["UseMaterial", "bool", "", "", 1], "SSSSI", []]]]]],
["Video", [362584945, "CubeTexture.png::Video", "Clip"], "LSS", [
    ["Type", ["Clip"], "S", []],
    ["Properties70", [], "", [
        ["P", ["Path", "KString", "Url", "", "/home/guest/Downloads/CubeTest_local.fbm/CubeTexture.png"], "SSSSS", []]]],
    ["UseMipMap", [0], "I", []],
    ["Filename", ["/home/guest/Downloads/CubeTest_local.fbm/CubeTexture.png"], "S", []],
    ["RelativeFilename", ["CubeTest_local.fbm/CubeTexture.png"], "S", []],

Then how can I reliable do this for every FBX I create and only with Blender 2.80?

Would using the mobile version of Blender (AKA the zip version) maybe behind this.

Because I can not see any difference to what I am doing with Blender 2.79, which works fine and Blender 2.80 and the only difference is Blender 2.80 is not installed and is the Zip version unpacked to a directory. And yes, Blender 2.81 does this same thing for me as well and it is also the zip version.

and could it be a windows versus linux issue, I noticed you are not using the Windows version.

I tried again with the files attached by Andrew and reproduced the issue by following the same steps you did ( place the texture in the parent folder, open .blend and export as fbx copy+embed).
I then tried reinstalling Blender and redoing the same and reproduced it again,
Just to make sure, I deleted he files in /User/Me/AppData/Roaming/Blender Foundation/ and reinstalled Blender but it happened again :(.

I also tried again the repro steps I gave earlier with a fresh install and the same thing happens.

Here's the exported FBX.


Here's the file I used but it should be the exact same as I did not save it.

I'm using a fresh version downloaded today.
version: 2.81 (sub 16), branch: master, commit date: 2019-11-20 14:27, hash: 26bd5ebd42e3, type: Release
build date: 2019-11-20, 16:33:00
platform: Windows

I'm not sure what other info I could provide to help, let me know if there's anything I can do.

and could it be a windows versus linux issue, I noticed you are not using the Windows version.

That's a good point, I'll try to get my hands on a Linux machine and repro.

and could it be a windows versus linux issue, I noticed you are not using the Windows version.

That's a good point, I'll try to get my hands on a Linux machine and repro.

I am just glad someone can duplicate it, other than just me.

Bastien Montagne (mont29) raised the priority of this task from Needs Information from User to Waiting for Developer to Reproduce.

That indeed looks like an OS-specific issue, will check. Thanks.

Bastien Montagne (mont29) lowered the priority of this task from Waiting for Developer to Reproduce to Confirmed, Medium.Mon, Dec 2, 6:10 PM