-
-
Notifications
You must be signed in to change notification settings - Fork 23.4k
Add fbx2gltf support for importing .fbx files #59653
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
Conversation
054fff8
to
030554f
Compare
The location of the FBX2GLTF binary is set via editor settings "filesystem/gltf_from_fbx/fbx2gltf_path". | ||
This importer is only used if project settings "filesystem/gltf_from_fbx/enabled" is enabled, otherwise [code].fbx[/code] present in the project folder are not imported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The location of the FBX2GLTF binary is set via editor settings "filesystem/gltf_from_fbx/fbx2gltf_path". | |
This importer is only used if project settings "filesystem/gltf_from_fbx/enabled" is enabled, otherwise [code].fbx[/code] present in the project folder are not imported. | |
The location of the FBX2GLTF binary is set via [member EditorSettings.filesystem/gltf_from_fbx/fbx2gltf_path]. | |
This importer is only used if [member ProjectSettings.filesystem/gltf_from_fbx/enabled] is enabled, otherwise [code].fbx[/code] present in the project folder are not imported. |
I would also move this to |
b9b0ef8
to
030554f
Compare
I was unable to do this properly. I reverted to the last commit for now. |
5ecbd4b
to
b761349
Compare
2f89ae8
to
cff5aeb
Compare
@fire I've fixed errors and cleaned things up locally, I can take it from there. |
Here's a cleaned up version that matches the cleaned up Blend importer: Some remaining issues I noted with both importers:
|
I think it was an attempt not allow the user generated path to change the output via adding new options to the execution. It probably can be removed.
Handling of extracted textures is problematic. Recall in the voice call about the blender import keeping the original images. This feature isn't currently in the fbx2gltf importer. The feature of keeping the original image path can be added to fbx2gltf.
Let's go with FBX and Blend unless you want GLTFFromFBX and BlendFromFBX. Abstraction! |
The problem was overlapping names. I couldn't call the GLTFFromFBX until the FBX importer is removed. |
I am pulling https://github.com/akien-mga/godot/tree/fbx-import as-is because fighting the CICD pipeline is fun but exhausting. Pending work.
|
Note that I just pushed an update because you changed the the Blend importer to enabled by default but this hadn't been reflected in the class reference (now fixed). |
I can do that quickly, give me a minute. |
It's worth nothing that since both the FBX and Blend importer are now enabled by default as of this PR, users will see warnings on editor start until they configure paths both to Blender and to FBX2glTF. It looks like this:
If you see this warning and it's a bother, you can either configure FBX2glTF using the latest @V-Sekai fork build for your platform: https://github.com/V-Sekai/FBX2glTF/releases This will be improved soon to be more user-friendly, and we'll also document things properly eventually. |
Lets you drag or place .fbx files in the project folder and it will import the files. An editor setting sets the location of the fbx2gltf binary. Enables .fbx and .blend by default. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with a MRP from one of the many outstanding FBX import bug reports, and it seems to work great :)
simplescreenrecorder-2022-03-30_15.27.23.mp4
Thanks! Amazing work :) |
This importer was the fruit of a lot of amazing reverse engineering work by RevoluPowered, based on the original Assimp importer that was introduced by fire. While promising and well tuned for a specific type of FBX scenes, it was found to have many flaws to support the many FBX exporters and legacy models that Godot users want to use. As we currently lack a maintainer to improve it, those issues are left unresolved and FBX import is still sub-par in the current Godot releases. After some experimentation, we're instead adding a new importer that relies on Facebook's `fbx2gltf` command line tool to convert FBX to glTF, so that we can then use our well-maintained glTF importer. See godotengine#59653 and https://github.com/facebookincubator/FBX2glTF for details.
Does support for this tool replace the built-in fbx importer? Because, for some models I have, Godot actually does a better job than fbx2gltf (which does not even produce output). The commit does not remove anything, it seems, but maybe it was done earlier. |
Are you able to provide the test files for review? |
@fire Sure, I can send a few FBX, I'd just prefer direct contact to not attach them here; would you kindly provide an email? Github does not seem to provide a PM functionality. |
Email me on the email at https://chibifire.com |
Sent! |
Lets you drag or place .fbx files in the project folder and it will import the files.
An editor setting sets the location of the fbx2gltf binary.
Pending a proposal. Need to discuss with reduz the details.
Bugsquad edit: A
3.x
backport will be considered, as it seems to really work much better than the current importer in 3.x.