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

Extracting a material that contains an embedded texture from a GLTF file generates a huge material #65566

Closed
antourenein opened this issue Sep 9, 2022 · 1 comment

Comments

@antourenein
Copy link

antourenein commented Sep 9, 2022

Godot version

4.0.alpha16

System information

Windows 10, Vulkan, NVIDIA GTX 850M

Issue description

When importing a GLTF file and extracting its materials, the specific materials that have an embedded texture are insanely huge in file size, depending on texture resolution.

I assume the textures are somehow being imported as bitmap without any kind of compression. In big scenes this causes an unbearable stutter as the game tries to read these huge textures from disk.

Steps to reproduce

Get a GLTF file with a material containing a texture (or export one from blender), double-click the file to open the advanced import and extract materials. The extracted material has a huge file size, in relation to what would be expected from the texture resolution.

If you change the texture in the extracted material for one imported separately and save the material, the file size changes to the usual 1KB. The culprit seems to be the imported texture.

Minimal reproduction project

Simple textured box glb file:
texture-box.zip

Try importing it and extracting its material.

The glb file has a file size of 537KB, and a material with a 4K texture embedded in it. The extracted material somehow ends up with a file size of 318MB, which is absolutely huge.

@Calinou
Copy link
Member

Calinou commented Sep 9, 2022

Duplicate of #62436 and/or #62295.

@Calinou Calinou closed this as completed Sep 9, 2022
@Calinou Calinou closed this as not planned Won't fix, can't repro, duplicate, stale Sep 9, 2022
@godotengine godotengine deleted a comment Nov 7, 2022
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

2 participants