-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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 Importer Rewrite for Godot 4.0 #40707
Closed
RevoluPowered
wants to merge
1
commit into
godotengine:master
from
RevoluPowered:fbx_port_to_godot_vulkan
Closed
FBX Importer Rewrite for Godot 4.0 #40707
RevoluPowered
wants to merge
1
commit into
godotengine:master
from
RevoluPowered:fbx_port_to_godot_vulkan
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RevoluPowered
force-pushed
the
fbx_port_to_godot_vulkan
branch
from
July 25, 2020 21:59
908d631
to
9222801
Compare
RevoluPowered
force-pushed
the
fbx_port_to_godot_vulkan
branch
from
July 25, 2020 22:03
9222801
to
fab0e31
Compare
Co-authored-by: Gordon MacPherson <[email protected]> Co-authored-by: Andrea Catania <[email protected]> Co-authored-by: K. S. Ernest (iFire) Lee <[email protected]> This is a complete rewrite of the importer. It will give more deterministic behaviour and has been sponsored by IMVU inc, over 1 year has gone into the development of this importer to remove the burden of the FBX SDK. This was my project for 1 entire year and I really enjoyed the opportunity to add to Godot. Along the road of implementing fixes we implemented fbx pivots, animations and inheritance type handling, which in most cases works properly. We have implemented animation and mesh skinning too this should work out of the box, if there are issues let us know. It's designed so that you can expand this with ease, and fix bugs easily too. It can import from Autodesk Maya and import into Godot, with pivots. There are bits we could polish but for now this is good enough. This was sponsored by IMVU, and a special thanks to everyone who supported this project. Signed-off-by: Gordon MacPherson <[email protected]>
RevoluPowered
force-pushed
the
fbx_port_to_godot_vulkan
branch
from
July 25, 2020 22:04
fab0e31
to
a26ace1
Compare
@reduz got a few questions about the new API:
Editor builds werror=yes added as fixes required #warning "FIX Transparency mapping here it prob should not be clear coat"
^
modules/fbx/data/fbx_material.cpp:218:2: warning: FIX THESE SWITCHES :D [-W#warnings]
#warning FIX THESE SWITCHES :D
^
modules/fbx/data/fbx_material.cpp:191:11: error: 5 enumeration values not handled in switch: 'TEXTURE_HEIGHTMAP', 'TEXTURE_SUBSURFACE_SCATTERING', 'TEXTURE_SUBSURFACE_TRANSMITTANCE'... [-Werror,-Wswitch]
switch (mapping_mode) {
^
modules/fbx/data/fbx_material.cpp:191:11: note: add missing switch cases
switch (mapping_mode) {
^
modules/fbx/data/fbx_material.cpp:301:2: warning: FIX ME - Alpha transparency [-W#warnings]
#warning FIX ME - Alpha transparency
^
modules/fbx/data/fbx_material.cpp:411:2: warning: "Texture import flags are gone?" [-W#warnings]
#warning "Texture import flags are gone?"
^ |
Mapping modes
Import flag are global settings now. |
Superseded by #41985. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds the ability to load Autodesk FBX files, without requiring the SDK or third-party dependencies.
Previously due to FBX Pivot Transforms this was not possible, also inherit type (nodes which do not inherit parent scale, or do different multiplication orders) was previously complex to support and is required to support Maya fully.
We abstract most of Ref away and keep this simple for anyone who needs to make some edit to the importer. Pivot transform handles pivot's and also inherit type (scaling ignored, parent before scaling, etc)
Previously we had four layers, one for assimp one for godot, and one for the importer itself converting the data to godot, this removes assimp from the middle simplifying the method to
FBX Document -> Godot Importer (this is a direct importer now, and should be much more efficient in some cases over the previous importer)
Another advantage is we also only have a single set of core math types between FBX and Godot (Vector3, Vector2 and Transform), less conversions, less can go wrong.
This can be extended with as many features as we want now and there is now room to grow it into all the specific tools for Maya etc, or even possibly 3ds max.
Why the decision to drop assimp?
FBX Importer with viable support for commercial FBX files
Known bugs:
Known unsupported (will be added)
This work is sponsored by IMVU.