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

GLTF import external images correctly #66889

Merged
merged 1 commit into from
Oct 5, 2022

Conversation

LunaticInAHat
Copy link
Contributor

This PR corrects three distinct defects that were present in the initial implementation of PR #66856:

  1. Textures that referenced images in external files were not imported correctly (fix in line 3081)
  2. GLTF assets that did not have a 1-1 correspondence between samplers and textures ended up using the wrong samplers for textures (fix in line 3216)
  3. Godot would crash when trying to import invalid GLTF assets that referenced images, textures, or samplers that did not exist

@LunaticInAHat LunaticInAHat requested a review from a team as a code owner October 4, 2022 16:05
@LunaticInAHat
Copy link
Contributor Author

@Sirus97 Could you please validate this PR with the assets that you have, to make sure it still works on your end?

@LunaticInAHat
Copy link
Contributor Author

I have rechecked the 4.x implementation that was merged in PR #59481 and I do not believe that it is susceptible to the first two defects addressed by this PR -- they are specific to the way things had to be done in 3.x.
The 4.x implementation is also less susceptible to crashing when importing invalid GLTF files, but perhaps not as resilient as it could be. Would it be desirable for me to open a PR to enhance the 4.x importer's robustness?

@Sirus97
Copy link

Sirus97 commented Oct 4, 2022

@Sirus97 Could you please validate this PR with the assets that you have, to make sure it still works on your end?

It's still working on the Windows build.

Copy link
Member

@fire fire left a comment

Choose a reason for hiding this comment

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

@Sirus97 and @LunaticInAHat has checked and approved.

I'm too distant from godot 3.

@akien-mga akien-mga merged commit 9c6810e into godotengine:3.x Oct 5, 2022
@akien-mga
Copy link
Member

Thanks!

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.

5 participants