Reducing the file size of glTF (.glb) files to be saved (Blender)

この記事は約3分で読めます。
スポンサーリンク

Things I want to do

As explained in the article below, you can save glTF (.glb) files in Blender, but if the shape is complex, the file size will increase, and loading times will be slow when opening it on the web.

This section explains how to reduce the size of saved glTF (.glb) files.

スポンサーリンク

Environment

Blender:3.4.1

スポンサーリンク

Changing mesh export settings

To display the export dialog, go to ‘File’ in the upper left corner → ‘Export’ → glTF 2.0 (.glb/.gltf).

In the save dialog, uncheck the ‘Normals’ option in the ‘Mesh’ group and save.

By changing the settings as described above, you can reduce the save size.

スポンサーリンク

Compression export settings

To display the export dialog, go to ‘File’ in the upper left corner → ‘Export’ → glTF 2.0 (.glb/.gltf).

Check the ‘Compress’ option in the save dialog and save.

By changing the settings as described above, you can reduce the save size.

However, please note that if you save the file using this method, it will not be readable by Threejs in the implementation described below.

The following steps are also required to read a compressed glTF file.

圧縮されたglTF(.glb)ファイルをLoadして表示(Threejs)
やりたいこと圧縮されたglTF(.glb)ファイルをThreejsを読み込む。圧縮方法は↓環境Threejs: r150Chrome: 111.0.5563.65準備...
スポンサーリンク

Result

By changing the mesh export settings and the compression export settings, we were able to reduce the size of the output glTF file.

The save size for each setting is summarized below.

Normal savecompressionSize (kbyte)remarks
×786Default settings
××220
106
×30

The model used is the following die.

スポンサーリンク

Websites I used as references

【Three.js】3Dモデルのサイズを小さくする方法 | テクサLog
Three.jsではblenderで作成したglTFファイルを扱うことができますが、オブジェクトの数が多かったりするとファイルサイズがかなり大きくなってしまいます。その結果サーバ...
スポンサーリンク

Related pages

A summary of how to load and display 3D objects created in Blender using Threejs.

コメント

タイトルとURLをコピーしました