-
Notifications
You must be signed in to change notification settings - Fork 92
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
Fix GeometricTransform (fix #56) #58
base: master
Are you sure you want to change the base?
Conversation
* add Mesh to a child node to hold GeometricTransform * Fix * Fix typo * Fix type * Fix Typo * Fix * Fix * Fix * Fix * Optimize * Cleanup
Co-authored-by: K. S. Ernest (iFire) Lee <[email protected]>
Co-authored-by: K. S. Ernest (iFire) Lee <[email protected]>
@bqqbarbhg Could you take a look with some of your fbx test suite? You don't have to spend too much time. |
Unfortunately currently I don't really have much extra time to spend on non-critical ufbx stuff, as I have a lot going on simultaneously. Though, I can still give a few thoughts: This seems to be quite similar to the ufbx helper nodes option, which was disabled by default as there was concerns about the node tree not matching up with the FBX file. So then to be consistent I think this should be an option, maybe not enabled by default. On the surface level this diff seems solid for basic cases, and does fix the problem of instanced geometry transforms, like the ufbx import option. One key thing to pay attention to however is skinned meshes: the geometric transform is expected to be baked to the geometry when using the FBX bind matrices, so you'll need to include that into those manually if transforming it under a child, depending on how the whole glTF pipeline and Godot do things. In general I really recommend testing with skinned meshes that use geometric transforms. About the dataset testing, if you want to replicate the testing setup I have for Godot ufbx, you can get started with the hacked editor I have, diff here: https://github.com/bqqbarbhg/godot/compare/7abe0c60140..5ce120bdd79 (you can ignore the changes to Using this requires an empty project to load the files in and some way to iterate test cases from the command line, I used my python3 /path/to/execute_per_fbx.py \
--verbose --allow-fail \ # Just some options for execute_per_fbx.py: verbose and keep going if Godot crashes
--exe /path/to/godot/godot.windows.editor.x86_64.exe \ # Godot editor built with '--import-fbx' hack
-p ufbx -p gltf \ # This will execute every command twice for each FBX with #p="ufbx" and #p="gltf"
--root /path/to/fbx-files \ # Directory with FBX files, searches recursively
-- \ # Rest of the options are passed to the '--exe', Godot in this case
-e --path /path/to/empty-godot-project \ # Usual Godot options
--import-fbx "#p" /path/to/output "#" # Options to hacky loading, "#p" is ufbx/gltf, "#" is the FBX filename The above command will start the editor for each FBX file contained in |
Oh one thing to note about the |
when Fbx node has GeometricTransform, use an additional Gltf node to hold the mesh and the transform. fix #56