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 file huge after export #1440

Closed
anzmaaan opened this issue Aug 3, 2021 · 2 comments
Closed

.gltf file huge after export #1440

anzmaaan opened this issue Aug 3, 2021 · 2 comments

Comments

@anzmaaan
Copy link

anzmaaan commented Aug 3, 2021

Hello!

Exporting my selected objects from Blender (some of the objects came from Cinema4D, rest was created in Blender), I get a file that is surprisingly large to what I expected it to be - in terms of texture file sizes (all textures are jpgs, total 5 Megabytes) and polygon count (82k for the whole scene), there are no animations, blend shapes etc. just static meshes. Upon opening the .gltf in VS Code, the file reveals a large chunk of data at the end (see attached file) which goes on and on and represents the binary embedded as of my understanding. I can't really make sense of the cause for the size, maybe somebody can help. Ultimately I need a .glb file <10 Megabytes. Currently I'm looking at about 22 Megabytes for a glb-export of my scene.

Kind regards and thanks for looking into it!
issue.zip

@scurest
Copy link
Contributor

scurest commented Aug 3, 2021

  • Never ever use glTF Embedded. It includes all binary data as base64 text, which inflates its size by 33%.
  • Your images alone are 11MB, you have to downsize them or save them at lower quality.
  • You have a bunch of unused UVMaps. In particular, "geo_aussenzaun.001_Plane.005" has 7 unused UVMaps taking up 6MB. Delete them.
  • Run files through gltf-pack for smaller filesize.

@anzmaaan
Copy link
Author

anzmaaan commented Aug 4, 2021

Thanks a lot for your tips and your quick reply!

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

No branches or pull requests

2 participants