We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

.bin-file and effect of the xz-compression

Home Forums General Questions .bin-file and effect of the xz-compression

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #3998
    3dmdlb
    Customer

    I have a small .gltf-file (118kb) and a “big” .bin-file (5806kb). If i use the xz-compression (var URL = ‘__URL__name.gltf.xz’), the gltf has 9kb and the bin has 1080kb. But there is no (noticeable) faster loading. Maybe bc the scene is already small?
    Question from someone who has no coding experience: What is in the .bin-file and what effect has the xz-compression on it?

    #3999

    Hi,

    Reducing files size is especially noticeable on slow connections. On a fast network, or when viewing from localhost it can look almost the same. Besides compressing .gltf/.bin files, one should also take care of images especially if a project loads many high-res textures. Here are some recommended practices:

    • Prefer JPEGs over PNGs if you don’t need transparency
    • Consider lossy/lossless compression when possible
    • Use normal editing instead normal maps, vertex colors instead diffuse textures

    What is in the .bin-file and what effect has the xz-compression on it?

    glTF, Verge3D’s main file format, consists of textual (.gltf) and binary (.bin) parts. The textual part describes the scene graph and references model data in the binary file. The binary part contains geometry (positions, normals, UVs, etc) and animation data. Here is Khronos’ chart illustrating that:

    The LZMA (.xz) compression just reduces the size of the .bin file (similar to zip or rar archives). It is more efficient compared to standard gzip compression available in browsers and unpacking it is fast.

    Chief 3D Verger | LinkedIn | Twitter

    #4000
    3dmdlb
    Customer

    Thanks Yuri for your quick reply and the detailed explanation! :good:

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.