Home › Forums › Bug Reports and Feature Requests › Compression in GLTF?
Tagged: compression, draco, lzma
- This topic has 13 replies, 6 voices, and was last updated 2 years, 4 months ago by Ryan.
-
AuthorPosts
-
2018-01-18 at 4:11 pm #1707jemCustomer
Hi,
The nature of my projects results in large GLTF/BIN. I do work very hard to reduce the complexity of the meshes and objects before they are exported, but there is a limit to what can be achieved with this strategy.
We run with mod_deflate enabled on our web servers. This usually provides a compression ratio of about 50% while pulling the files over the wire. This ratio varies depending on the content of the BIN file.
I have two concerns about depending on mod_deflate for compression:
1. Its compression ratios are not very good. I have done some experiments with other algorithms. Pre-compressing the BIN with LZMA can produce a ratio of better than 80%.
2. Web server load. Without careful configuration, a web_server might compress the GLTF/BIN files each time the file is requested. This would be wasteful.I am aware that a team at Google is working on a mesh compressor called Draco. It achieves amazing compression ratios. Other teams are working on incorporating Draco in three.js and as an extension of GLTF 2.0.
Does anyone have thoughts on compression strategies for our projects? Should we wait for the GLTF Draco extension or should we investigate a pre-compression strategy while the Draco work completes?
Thank you,
-JemJeremy Wernick
2018-01-19 at 1:45 pm #1720Yuri KovelenovStaffWe were able to achieve very good compression rates with our Verge3D Network by leveraging Amazon’s CloudFront service. For example, the gltf file of the E-learning app was compressed from 934 kb down to 106 kb (almost 9-fold), while the scene’s bin file was compressed from 575 to 84 kb (almost 7-fold). You might want to experiment with DeflateCompressionLevel setting to see if similar compression rates are possible with Apache’s mod_deflate.
On the other hand, the Draco mesh compressor seems to be an interesting approach too (although at the expense of precision and certain processing power). I think we can look closer at this technology once it is natively supported by the glTF format.
2018-01-19 at 10:01 pm #1723jemCustomerHi Yuri,
Thank you for the response. Your response inspired me to test several different bin files against several different compressors. I found the results interesting. The bin files in your E-Learning example are very compressible. The bin files that I have created are not. I was able to reproduce your 7-fold reduction when I used the E-Learning files. I could only reduce my bin files by half.My files might be a special case. My meshes originated in a CAD system. Although I simplified the models as much as possible, they still carry traces of their origin. My meshes are complex and they seem less compressible by the web server’s deflate algorithm.
I will work on further simplifying my meshes.
On Draco… I understand that it is lossy. As I understand Draco, it uses configurable vertex quantization. Maybe my meshes could benefit from losing a few least significant bits?
Thanks again for looking into this.
-JemJeremy Wernick
2018-01-22 at 9:10 am #1729Yuri KovelenovStaff2018-01-22 at 3:21 pm #1733jemCustomerThe example contains client data, so I must share it with you privately. I will send you the file.
If it helps the discussion, I can create some non-confidential CAD models so we can discuss them openly in the forums.
Thank you,
JemJeremy Wernick
2018-01-22 at 4:12 pm #1735Yuri KovelenovStaff2021-02-11 at 2:49 pm #38438hermanoCustomerHello,
Regarding this matter of compression, what is the current status with Verge3D and Draco compression?
It seems to have such good results so I cant wait until something like this can be done with the tools of Verge3D.
Cheers
Hermano2021-02-12 at 7:25 am #38464Yuri KovelenovStaffPlease refer to this page: https://www.soft8soft.com/docs/manual/en/introduction/Asset-compression.html (not Draco, but works pretty well)
2021-03-12 at 10:54 pm #39426psykokwakParticipantHi all,
I am also interested in draco compression support.
My glb file is 190MB. Compressed in LZMA it goes down to 72MB.
Using the draco blender compression I drop to 33MB.2021-03-24 at 9:53 am #39742RyanCustomeryes draco is needed!
2021-09-09 at 5:24 am #44418RyanCustomerHi. are there any update on this? I feel the priority is misaligned. Nothing is more important than load time on the web.
2021-10-27 at 11:14 am #46512RyanCustomerYuri,
isn’t draco already natively supported in gltf??
2021-12-21 at 11:27 am #48181Alexander KovelenovStaffWe made some observations recently, and it appears that Draco is not so good compared to LZMA.
2022-08-17 at 9:31 am #54962RyanCustomerI saw that KHR_draco_mesh_compression is supported in v3d 4.0+. Does this mean we can use draco in the latest version???
-
AuthorPosts
- You must be logged in to reply to this topic.