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

Set the unlit / unshaded extension when importing / exporting GLTF #74287

Merged

Conversation

hakro
Copy link
Contributor

@hakro hakro commented Mar 3, 2023

Fixes #74268

@hakro hakro requested a review from a team as a code owner March 3, 2023 11:12
@hakro hakro changed the title Get the unlit / unshaded extension when importing GLTF on export Set the unlit / unshaded extension when importing / exporting GLTF Mar 3, 2023
@akien-mga akien-mga added this to the 4.1 milestone Mar 3, 2023
Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@lyuma
Copy link
Contributor

lyuma commented Mar 5, 2023

KHR_materials_unlit must also be added into the document's top-level extensionsUsed dictionary?

I'm asking some gltf nerds just to double-check if this is true, but I'm pretty sure.

@hakro hakro force-pushed the gltf-import-export-unlit-extension branch from 9a7f444 to e14fa55 Compare March 5, 2023 21:44
@hakro
Copy link
Contributor Author

hakro commented Mar 5, 2023

KHR_materials_unlit must also be added into the document's top-level extensionsUsed dictionary?

I'm asking some gltf nerds just to double-check if this is true, but I'm pretty sure.

Good catch, thank you.
I missed it, since the import in blender worked fine.
But you're right, it's better to have it as it's documented here:
https://github.com/KhronosGroup/glTF/blob/main/extensions/README.md#about-gltf-extensions

I checked how Blender also does the export, and the dictionnary is there as well.

Now the export from Godot looks like this :

2023-03-05_22-31

Cheers !

@akien-mga akien-mga merged commit a18820a into godotengine:master Mar 6, 2023
@akien-mga
Copy link
Member

Thanks!

@YuriSizov
Copy link
Contributor

Cherry-picked for 4.0.1.

@hakro hakro deleted the gltf-import-export-unlit-extension branch March 22, 2023 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unlit (unshaded) material property is ignored in glTF files
5 participants