How to compress/reduce the size of a GLTF model in Blender
Blender is a powerful open source software designed to create 3D graphics, animations and visual effects. It supports import and export of multiple file formats, including GLB, GLTF, DAE, OBJ, ABC, USD, BVH, PLY, STL, FBX and X3D. This adaptability makes it an invaluable tool for a variety of 3D projects and workflows. (https://www.blender.org/download/).
ygtu
Sep 14, 2023 • 2 min read
Recommendation: Use NSDT scene editor to quickly build 3D application scenes
To compress 3D files in Blender, follow these steps:
1 - Compressed gltf model texture
This step requires image editing software. We will use the open source software GIMP. ( GIMP - Downloads )
First, access the 3D model's texture files. To do this, use the following format: .gltf + .bin + texture:
- Import your gltf model into Blender
- Export gltf model in .gltf + .bin + texture format
- Open texture file in GIMP
- Scale image (scale to 1024X1024 or smaller for higher compression): Image > Scale Image
- Export the texture in *.jpg format at 90 resolution (or lower for higher compression): File > Export As
- Replace the texture in Blender, or use a text editor to edit the gltf model and replace the texture format as needed (e.g. ".png" to ".jpg")
- save document
2 – Reduce gltf model complexity by using decimation in Blender
The second major step in reducing the size of a gltf model is to reduce its mesh, which involves reducing the number of polygons while retaining the overall appearance.
- Import the previously edited *.gltf file into Blender
- Select the mesh to extract
- Continue decimation with the goal of getting below 50,000 faces per mesh. Always check the 3D rendering. Tip: If your model is not animated, you can extract multiple meshes by connecting them first.
- Export the model in *.glb format by selecting the Apply Modifiers instead of Compress option .
Original link: How to compress/reduce the size of GLTF models in Blender (mvrlink.com)