-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Create an official Blender add-on for Godot asset pipeline #6883
Comments
As a concept I wholeheartedly agree, but let's take our time with this, implementing it over many years. We'll likely want to have Godot-specific extensions for information highly specific to Godot, in fact we have already reserved the
Cameras are part of the base glTF spec. Lights are covered by Physics is covered by Note that we could still make a
These might be good candidates for a specific
It will still be available of course, but the goal here is to allow as many things as possible to work without it, since we should be able to transfer any data we want from Blender via GLTF and there will be no need to tweak things in the advanced import dialog.
I disagree with this part, there is no need to prevent overriding what's in the file if you want to do so. The data in the file is optional, you should not be forced to use it. Keep in mind that you might now have Blender installed and want to tweak a model later, or maybe someone else made the model and just sent you the GLTF file.
That sounds like a separate thing though, making Blender read Godot's import config files isn't required to make Blender add more data to the GLTF file and have Godot read it.
Disagree, it's harmless to keep it, I don't see any strong reason to disable that feature.
Indeed, that's the big question. It totally does not need to be in the engine, the only reason we would do that is to encourage it as the official way since users would not have to hunt down an extension. However, considering that users would already have to hunt down a Blender extension maybe it's not a big deal. Though it may be the case that the user providing the GLTF files from Blender is a different user from the one importing into Godot. If we do have |
@aaronfranke Thanks for the detailed feedback!
We can start with extensions that already exist and are standardized (such as colliders like you mentioned), but lack support from Blender's exporter. TBF, I don't know what Blender's own stance is on which extensions the glTF exporter ships with (only KHR_*?). Might be worth discussing this as well, so that we don't work on something that Blender will later support out of the box.
According to the spec, it seems like it is possible to extend an extension. So we could indeed piggyback specialized fields onto a general purpose extension.
Right, if we can keep track of changes in the dialog as overrides, instead of always preferring the glTF metadata over what the user modified in Godot, it can work. I only had the .blend workflow in mind, but indeed exporting .gltf's is just as valid of a use case!
True, but it would be nice to have the option of keeping both UIs in sync. Not necessary for an MVP.
How would conflicting values get handled? Or would the import hint always take priority over corresponding glTF metadata? Regarding core or not: It might be convenient to have all general purpose extensions like physics be part of core, since those may be found in all kinds of glTF assets, and we already support some extensions out of the box (again, should we only stick to KHR_* extensions here?). But the Godot-specific stuff, including Blender add-on and the extension specifications, might be better off on the AssetLib. The source files should be on the Godot GitHub organization for sure. |
I support the creation of a godot engine organization repository for an update Godot Engine export / import addon. We described using gltf extensions. We can also design the feature in the proposal repo. Note: I registered the The gltf io blender addon will not add other extensions unless they're an official khronos gltf extensions. This is on @reduz 's wish list but I wanted critical mass of contributors <3 and now we have it. KhronosGroup/glTF#2147 (comment) can be used for replicating godot engine's animation player |
Describe the project you are working on
Any 3D project using Blender for asset creation
Describe the problem or limitation you are having in your project
Supersedes #2422
Note that "add-on" refers to Blender's add-on system, and not Godot's EditorPlugins.
As already mentioned in that issue, many features of Blender do not get imported into Godot. Some examples are physics settings, camera/light settings, shader node setup, or splines.
This is due to the glTF exporter not supporting such features, and .blend files are imported through the glTF pipeline.
Furthermore, certain options are Godot-specific and are not even part of Blender's UI, such as LOD settings or enabling collisions. These must currently be configured using the Advanced Importer or via import hints in object names.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
The goal is to
This is done by creating an add-on for Blender that can be enabled by the user when desired. The add-on would be responsible to extend the glTF exporter, as well as showing additional UI elements.
The add-on will need to be installed by Blender users by hand (with Godot notifying the user when this add-on is not found). This process will be simplified once Blender ships its built-in extension repository, working similar to Godot's AssetLib.
When the .blend file importer runs, it will hint Blender to enable that specific add-on (if installed), to ensure that this metadata gets imported. Possibly show a warning if metadata is found in the .blend file, but the add-on is not installed.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Create a new git repository which is a Blender add-on.
The glTF exporter can be extended by exposing a
glTF2ExportUserExtension
. GLTF import hooks can be added that can run code to add metadata.Either
extras
orextensions
can be used to store this metadata in the glTF. Here's a short overview between the differences. IMO, an extension would make the most sense, if this becomes the official Blender integration path for Godot.Any features that are already standardized through other extensions, such as
OMI_physics_body
etc., should be reused instead of redundantly recreating them in the Godot-specific glTF extension.The user interface can be extended by adding new properties to the corresponding properties pages (e.g. Object, Light, ... properties). For file-wide settings, a new panel can be added to the Scene or Output properties page. Where possible, re-use Blender's existing settings instead (such as eevee's shadow settings for lights).
Compatibility must be ensured, so that different combinations of Godot versions and add-on versions can properly import asset metadata.
Not sure how to handle unsupported object types, like Curves. I will create a prototype to see if the currently existing hooks are enough to make this possible, or if we need to implement such a hook in the glTF add-on.
I believe that if you opt into using the add-on, the Advanced Import dialog is no longer necessary for supported options. The ideal solution would be to grey out all settings in this dialog that are managed by the add-on, with a hint text informing the user to use Blender to modify these settings instead. Alternatively, we would need an option for Blender to load the
.import
files to synchronize Godot changes back into Blender. This can probably not be done automatically, but is instead done via a button.Import hints like -col etc. should be ignored as well.
If this enhancement will not be used often, can it be worked around with a few lines of script?
No.
Is there a reason why this should be core and not an add-on in the asset library?
Debatable, so please discuss!
IMO, by making this official, it greatly reduces the friction of the import pipeline for 3D assets. Making this official will guarantee support and compatibility with new features that both softwares have in common.
The .blend file importer must also be modified if this were to be implemented as a Godot add-on.
The text was updated successfully, but these errors were encountered: