Virtualx Game Engine. Forked from Godot 3.6
Find a file
Gordon MacPherson 8197a611fa Rewrite FBX Importer to convert directly to Godot scene format
Co-authored-by: Gordon MacPherson <gordon@gordonite.tech>
Co-authored-by: Andrea Catania <info@andreacatania.com>
Co-authored-by: K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>

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.

Additional fixes made before upstreaming:
- fixed memory leaks
- ensure consistent ordering on mac linux and windows for fbx tree. (very important for material import to be deterministic)
- disabled incorrect warnings for fbx_material
- added compatibility code for /RootNode/ so compat is not broken
- Optimise FBX - directly import triangles
- remove debug messages
- add messages for mesh id, mesh re-import is sometimes slow and we need to know what mesh is being worked on
- Document no longer uses unordered maps
- Removed some usages of &GetRequiredToken replaced with safe *GetRequiredToken() function
- Added parser debugging
- Added ERR_FAIL_CONDS for unsupported mesh formats (we can add these later super easy to do now)
- Add memory debugging for the Tokens and the TokenParser to make it safe
- Add memory initialisation to mesh.cpp surface_tool.h and mesh.h
- Initialise boolean flags properly
- Refactored to correct naming for the fbx_mesh_data.h so you know what data you are working on
- Disabled corruption caused by the FIXME:
- Fixed document reading indexes and index_to_direct vs indexes mode
- Fixed UV1 and UV2 coordinates
- Fixed importer failing to import version 7700 files
- Replaced memory handling in the FBX Document with pointers, before it was dereferencing invalid memory.
- Fixed typed properties
- Improved Document API
- Fixed bug with ProcessDOMConnection() not working with the bool flag set to true.
- Fixed FBX skinning not deforming for more than one single mesh
- Fixed FBX skeleton mapping and skin mapping not being applied properly (now retrieved from document skin list)
- Fixed set_bone_pose being used in final version()
- Fixed material properties exceeding 1.0.
- FBX Document parser revamped to use safe memory practices, and with graceful error messages.
- ScopePtr, TokenPtr and various internal types have been fleshed out to use proper typedefs across the codebase.
- Fixed memory leaks caused by token cleanup failing (now explicit cleanup step, no shared_ptr, etc)
- Fixed bug with PropertyTable not reading all properties and not cleaning up properly.
- Fixed smoothing groups not working
- Fixed normal duplications
- Fixed duplication check for pre-existing coordinates.
- Fixed performance of vertex lookup in large meshes being slow, using lookup table separate to the data for indexing, this reduces import time from 10 minutes of bistro down to 30 seconds.
- Fixed includes requiring absolute path in headers and cpp files using CPPPath.

Bugs/Features wish list:
- locator bones
- quat anim key interpolation (most fbx maya files have euler rotations from blender and maya, nobody uses this)
- some rigs skins scale up when SSC enabled inconsistently per bone
- some skins can disappear entirely
- material mapping needs expanded, but this will be done for 4.0 as it requires rewrite.

Workarounds for issues found until we patch them:
- mesh -> clear skin can resolve most of the bugs above.
- locators can be worked around by removing them before exporting your rig.
- some material properties wont always import, this is okay to override in the material properties.

**If you are having issues or need support fear not!**
Please provide minimal rigs which can reproduce issues as we can't spend a lot of time investigating each rig. We need a small example which breaks and we can then sort the problem. In some cases this is not possible so its okay to privately send models to us via IRC or a ticket and we can provide an email address, we won't reveal or disclose privately sent rig files to any companies, or to companies I work for, they will not be shared, only tested and bugs will be drawn up from the conclusions. Also include identifying information about what you did and how it didn't work. Please file each file separately in a bug report, unless the problem is the same.
This was sponsored by IMVU, and a special thanks to everyone who supported this project.

Signed-off-by: Gordon MacPherson <gordon@gordonite.tech>
2020-10-30 15:59:19 +00:00
.github CI: Refactor Android workflow, use pre-installed SDK and NDK 2020-10-23 13:27:44 +02:00
core Merge pull request #42981 from lyuma/command_queue_fix_3.2 2020-10-22 09:55:49 +02:00
doc Merge pull request #42927 from lawnjelly/octree_default 2020-10-21 10:19:34 +02:00
drivers Remove extra exposure multiply in FXAA 2020-10-24 13:11:27 -07:00
editor Add fast approximate antialiasing (FXAA) to Viewport 2020-10-20 14:54:52 +02:00
main Merge pull request #40555 from RandomShaper/fix_debugger_autofocus_3.2 2020-10-01 13:54:38 +02:00
misc CI: Refactor Android workflow, use pre-installed SDK and NDK 2020-10-23 13:27:44 +02:00
modules Rewrite FBX Importer to convert directly to Godot scene format 2020-10-30 15:59:19 +00:00
platform [3.2] Disable iOS SDK version check on osxcross. 2020-10-21 07:56:05 +03:00
scene Merge pull request #42009 from Calinou/theme-node-type-3.2 2020-10-20 15:58:41 +02:00
servers Merge pull request #42927 from lawnjelly/octree_default 2020-10-21 10:19:34 +02:00
thirdparty Rewrite FBX Importer to convert directly to Godot scene format 2020-10-30 15:59:19 +00:00
.clang-format clang-format: Add JavaImportGroups for Java code 2020-05-07 13:36:27 +02:00
.editorconfig 3.2 New csproj style with backport of Godot.NET.Sdk 2020-08-20 21:48:59 +02:00
.gitattributes Git: Explicitly list binary files as such to avoid EOL change 2019-05-25 10:43:48 +02:00
.gitignore git: Ignore clangd cache folder 2020-09-10 13:11:04 +02:00
.mailmap Update AUTHORS and DONORS list 2020-09-08 17:23:16 +02:00
AUTHORS.md Update AUTHORS and DONORS list 2020-09-08 17:23:16 +02:00
CHANGELOG.md Fix typos with codespell 2020-09-18 14:09:51 +02:00
compat.py SCons: Fix python2 compatibility after #37198 and #37248 2020-06-11 20:15:48 +02:00
CONTRIBUTING.md Document the requirement to update the class reference when contributing 2020-06-10 15:30:52 +02:00
COPYRIGHT.txt Rewrite FBX Importer to convert directly to Godot scene format 2020-10-30 15:59:19 +00:00
DONORS.md Donors: Add Gamblify, remove Interblock from splash screen 2020-09-16 16:14:31 +02:00
gles_builders.py SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
icon.png Optimize images losslessly using oxipng -o6 --strip all --zopfli 2018-06-28 19:17:41 +02:00
icon.svg Use new Godot icon consistently everywhere 2017-05-17 19:53:59 +02:00
LICENSE.txt Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
logo.png Optimize images losslessly using oxipng -o6 --strip all --zopfli 2018-06-28 19:17:41 +02:00
logo.svg Style: Add missing newlines to SVGs 2020-07-24 10:39:18 +02:00
LOGO_LICENSE.md Improve documentation of thirdparty code snippets 2017-05-07 11:42:37 +02:00
methods.py [3.2] Do not raise exception if iOS SDK is not installed. 2020-10-26 14:15:44 +02:00
platform_methods.py SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
README.md Improve the project README 2020-08-14 00:32:04 +02:00
SConstruct SCons: Refactor and cleanup warnings definition 2020-10-19 16:09:59 +02:00
version.py Bump version to 3.2.4-beta 2020-09-18 08:28:18 +02:00

Godot Engine

Godot Engine logo

2D and 3D cross-platform game engine

Godot Engine is a feature-packed, cross-platform game engine to create 2D and 3D games from a unified interface. It provides a comprehensive set of common tools, so that users can focus on making games without having to reinvent the wheel. Games can be exported in one click to a number of platforms, including the major desktop platforms (Linux, macOS, Windows), mobile platforms (Android, iOS), as well as Web-based platforms (HTML5) and consoles.

Free, open source and community-driven

Godot is completely free and open source under the very permissive MIT license. No strings attached, no royalties, nothing. The users' games are theirs, down to the last line of engine code. Godot's development is fully independent and community-driven, empowering users to help shape their engine to match their expectations. It is supported by the Software Freedom Conservancy not-for-profit.

Before being open sourced in February 2014, Godot had been developed by Juan Linietsky and Ariel Manzur (both still maintaining the project) for several years as an in-house engine, used to publish several work-for-hire titles.

Screenshot of a 3D scene in Godot Engine

Getting the engine

Binary downloads

Official binaries for the Godot editor and the export templates can be found on the homepage.

Compiling from source

See the official docs for compilation instructions for every supported platform.

Community and contributing

Godot is not only an engine but an ever-growing community of users and engine developers. The main community channels are listed on the homepage.

To get in touch with the engine developers, the best way is to join the #godotengine-devel IRC channel on Freenode.

To get started contributing to the project, see the contributing guide.

Documentation and demos

The official documentation is hosted on ReadTheDocs. It is maintained by the Godot community in its own GitHub repository.

The class reference is also accessible from the Godot editor.

The official demos are maintained in their own GitHub repository as well.

There are also a number of other learning resources provided by the community, such as text and video tutorials, demos, etc. Consult the community channels for more information.

Actions Build Status Code Triagers Badge Translate on Weblate Total alerts on LGTM TODOs