Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FBX import using FBX2glTF not working #59996

Closed
stryker313 opened this issue Apr 7, 2022 · 18 comments · Fixed by #59998
Closed

FBX import using FBX2glTF not working #59996

stryker313 opened this issue Apr 7, 2022 · 18 comments · Fixed by #59998

Comments

@stryker313
Copy link

stryker313 commented Apr 7, 2022

Godot version

4.0 Alpha 6

System information

Windows 10 Nvidia GTX 1060 Intel i5 4690k

Issue description

FBX animations that I attempt to import do not import.
I have set the fbx2gltf path, and still nothing. The file will be in the editor, but it has a red x through it.
For reference, I put the fbx2gltf.exe that I used in the minimal repo project

modules/gltf/editor/editor_scene_importer_fbx.cpp:83 - FBX conversion to glTF failed with error: 105.
  editor/editor_file_system.cpp:1928 - Error importing 'res://smallMesh@Praying (1).fbx'.

This happens with animations of all FBX type, regardless of origin.

Steps to reproduce

  1. Set you fbx2gltf filepath to the FBX2glTF.exe
  2. Move an fbx file into your project directory using your file manager (not dragging directly into the editor)
  3. The fbx file will not import (fbx file has a red x through it)

Minimal reproduction project

FBXimportbug.zip

@akien-mga
Copy link
Member

It's choking on the parentheses in the file name:

sh: -c: line 1: syntax error near unexpected token `('
sh: -c: line 1: `"/home/akien/Projects/godot/toolchains/FBX2glTF" "--pbr-metallic-roughness" "--input" ""/home/akien/tmp/godot/bug/FBXimportbug/smallMesh@Praying (1).fbx"" "--output" ""/home/akien/tmp/godot/bug/FBXimportbug/.godot/imported/smallMesh@Praying (1)-ffb1f0ad0b110cb34540e145f57fa585.glb"" "--binary" 2>&1'

Might be missing escaping / I might have removed the ones @fire put by mistake when reworking both FBX and Blender importers.

@akien-mga akien-mga added this to the 4.0 milestone Apr 7, 2022
@akien-mga akien-mga self-assigned this Apr 7, 2022
@stryker313
Copy link
Author

I renamed the file to "anim" and it still doesn't import.

@akien-mga
Copy link
Member

It imports OK for me when renamed to anim.fbx:
image

@stryker313
Copy link
Author

Desktop Screenshot 2022 04 07 - 17 03 56 81

@stryker313
Copy link
Author

Just to confirm, it IS the fbx2gltf.EXE from [V-Sekai fork] for windows 10 that I am suppose to be using? I don't really understand what the issue could be...

@akien-mga
Copy link
Member

Just to confirm, it IS the fbx2gltf.EXE from [V-Sekai fork] for windows 10 that I am suppose to be using? I don't really understand what the issue could be...

Yeah, I just tested with the latest version from https://github.com/V-Sekai/FBX2glTF/releases/tag/v0.12.9-p2 and it works fine for me on Linux.

It's worth noting that the V-Sekai readme mentions that on Windows it requires MSVC redistributable, maybe that's missing on your end? https://github.com/V-Sekai/FBX2glTF#platform-binaries

Can you try to run FBX2glTF.exe manually from the command line? With e.g. this command:

FBX2glTF.exe --pbr-metallic-roughness --input anim.fbx --output anim.glb --binary

@fire
Copy link
Member

fire commented Apr 7, 2022

I can reproduce the bug. I don't know why yet.

@fire
Copy link
Member

fire commented Apr 7, 2022

g .fbx fails to import. Also x y.fbx too.

@stryker313
Copy link
Author

anim.zip
result

@stryker313
Copy link
Author

Warning: node /RootNode/Eyes_Source_Cylinder.001 uses unsupported transform inheritance type 'eInheritRrSs'.
         (Further warnings of this type squelched.)
Animation mixamo.com: [0 - 206]
Wrote 7407405 bytes of binary glTF to anim.glb.

@fire
Copy link
Member

fire commented Apr 7, 2022

Expected "broken" result.

image

@fire
Copy link
Member

fire commented Apr 7, 2022

#57895 can be resolved by disabling lods. @SaracenOne Also mentioned a way to apply scale to the mesh. @reduz mentioned applying the rest.

image

@stryker313
Copy link
Author

Will report back on the MSVC in a bit.

@akien-mga
Copy link
Member

Will report back on the MSVC in a bit.

Your test above shows that running FBX2glTF.exe worked and generated a .glb. So it seems to work fine, you seem to have the required components.

It's weird if it still doesn't work in the Godot editor though, as it runs the same command.

@fire
Copy link
Member

fire commented Apr 7, 2022

Looks good akien-mga@d4b54e3 if it works on the test case with fbx2gltf on Windows.

@akien-mga
Copy link
Member

@stryker313 Once the Windows CI builds finished for #59998, you should be able to find a Windows editor binary to download here: https://github.com/godotengine/godot/actions/runs/2111701311

Could you try it and confirm if it fixes the FBX import issue with a name that contains (? It might be that this bug was actually Unix specific though, and if so the bug you're experiencing even with anim.fbx might be different.

@stryker313
Copy link
Author

@akien-mga yeah it works now 🍡
Desktop Screenshot 2022 04 07 - 17 55 56 26

@akien-mga
Copy link
Member

akien-mga commented Apr 7, 2022

Great, so the double quoting was also a problem on Windows (would end up as "FBX2glTF.exe" "--input" ""anim.fbx"" ... which likely doesn't work on Windows).

@akien-mga akien-mga changed the title FBX import using FBXtoglTF not working FBX import using FBX2glTF not working Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants