This is the gltf file I am using it is around 47mb. when i load this file in threejs and export via gltfexporter. the output file is around 150mb.
Tried buffergeometryutil.mergevertices before exporting still file size is 150 mb.(the issue seems to be due to textures)
Tried draco compression too still issue persists.
I have similar problem with another model too.
loading time of first model is normal but second model takes more time to load and to export.
How can i reduce the size of such models?
Ps. These models are downloaded from sketchfab
This was tried to fixed once but the PR was never merged:
mrdoob:dev
← MozillaReality:GLTFExporter/export-original-images
opened 10:49PM - 28 May 19 UTC
**Note:** this PR is based on top of: https://github.com/mrdoob/three.js/pull/16… 481
After doing some tests in Mozilla Spoke, we found that the exported scenes were quite a bit larger than the source assets. We used optimized PNGs in our glTF models, loaded them via GLTFLoader, and exported via GLTFExporter.
This repository contains some of our results:
https://github.com/robertlong/GLTFExporterTextureSizes#modified-blender-gltf-to-spoke-gltf-export
In order to reduce the exported glTF file size we found that the GLTFExporter needs to be able to export the original optimized PNG images.
This PR uses the `fetch()` API to fetch the original image as a blob and then uses the existing methods to pack them into a `bufferView` etc. I also found that the GLTFLoader was disposing of object urls for images which made it impossible to export images in a glb, etc. Because of that I introduced an option `revokeObjectUrls` to the GLTFLoader. This defaults to true to maintain backwards compatibility, and can be set to false if you need to reuse the object urls for export, etc.
In the meanwhile, consider to optimize the exported glTF asset with tools like gltfPack which allows you to add texture compression.