Skip to content
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

Add export settings to the export dialog for GLTF #7259

Closed
aaronfranke opened this issue Jul 11, 2023 · 2 comments
Closed

Add export settings to the export dialog for GLTF #7259

aaronfranke opened this issue Jul 11, 2023 · 2 comments

Comments

@aaronfranke
Copy link
Member

aaronfranke commented Jul 11, 2023

Describe the project you are working on

I am working on a Godot game with dynamically loaded assets, mostly GLTF files. These assets can support many advanced extensions exported from Godot, like the OMI physics extensions.

Describe the problem or limitation you are having in your project

In addition to importing GLTF files into our game, we need to provide users with a way to create those files. Fortunately Godot has a GLTF exporter in the editor, and we can allow Godot to export advanced extensions like OMI physics.

However, sometimes when exporting from Godot, the file size they take up is simply too big. One easy way to reduce the file size is to change the image format to one with a lower quality setting, but this is currently not possible to do, since the GLTF exporter has no options and is currently limited to only exporting PNG files.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

The proposal is to add a menu to the GLTF export dialog to allow configuring export settings. These are things that would not be in the Godot scene pre-export, but need to be specified at export time. An easy one would be setting the copyright string. And of course, solving the limitation of this proposal: setting the image format.

However, we don't have to just hard-code a few settings. We can open this up to allowing GLTFDocumentExtension classes to provide export settings, so that any extension can be configured at export time.

For the visuals, we can take inspiration from the similar settings in Blender's export menu:

Screenshot 2023-07-11 at 12 50 53 AM

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

PR: godotengine/godot#79316

Screenshot 2023-07-11 at 3 22 20 PM

If this enhancement will not be used often, can it be worked around with a few lines of script?

It can't be worked around with a few lines of script, and exporting GLTF files will be used quite often.

Is there a reason why this should be core and not an add-on in the asset library?

GLTF support, including export, is a core feature and an editor feature. Also, this proposal opens the door for add-ons in the asset library to provide their own export options.

@adamscott
Copy link
Member

Discussed during the animation/asset-pipeline team meeting:

  • there should be support for .jpg;
  • there should be a way to preserve the exact bytes of the original image files;
    • like, import PNG, but if there's a JPG file, keep the JPG file as is.
  • the editor inspector should be usable by other file formats other than GLTF;

[roundabout stand in]

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Jan 2, 2024
@akien-mga
Copy link
Member

Implemented by godotengine/godot#79316.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants