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.

Loading external COMPRESSED gltf files

Home Forums Puzzles Loading external COMPRESSED gltf files

Tagged: , , ,

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #14230
    scalare
    Customer

    Hi, we’re very close to finish our proof of concept development, and we’re now getting into files and textures optimization. Our configurator setup includes a main gltf file and several dummy external gltf files, each of which include just a plane mesh with just a material applied to it.

    So, when we need to apply a different material to an object, we load the corresponding dummy gltf file into the scene with “append scene” puzzle, and when it is loaded, we copy over the material from the loaded mesh to the desired object.

    While this worked perfectly for “regular” gltf files, we cannot make it work with LZMA compressed files. We can load the main gltf.xz file without problems, but we’re not able to load the xz files for the dummy files. We get errors in the console, like this:

    Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 16777216, (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0

    In fact, all the examples in the documentation for both “append scene” and “load scene” puzzles have their examples with files that go like “path/to/scene.gltf”.
    But it seems that specifying a file that includes the xz extension isn’t working. Oh, and by the way, we already have the option “compressed assets” enabled at the Init category for the puzzles.

    Any ideas of what we may be doing wrong? Thank you!

    #14260

    will check this, thanks

    Chief 3D Verger | LinkedIn | Twitter

    #14270
    scalare
    Customer

    Thank you!

    #14305

    Hi,

    this is a memory issue with XZ decoder. It may happen if your assets are compressed with a high compression rate or large dictionary (more than 8MB in size). What tool did you use to compress your scenes? Check out the following topic in the manual to get more info about proper compression settings.

    If you used conventional “Enable LZMA Compression” feature included in Blender/3ds Max plug-ins please send us the loaded asset so we can investigate this issue further.

    Soft8Soft Tech Chief
    X | FB | LinkedIn

    #14324
    scalare
    Customer

    Hi Alexander,

    yes, I just used the “Enable LZMA Compression” feature in Blender. However (not sure if this could be the cause), I did not create a separate blender file for each of the dummy files. I just created those planes from a previous version of the same main blender file, where I selected only the planes with the camera icon to indicate that I wanted to export just that mesh (one time per each dummy), and exported them from there. After doing that, I removed the dummy meshes from the blender file and exported the main file without them.

    Attached you will find a zip file with the gltf and bin files for a dummy, and their compressed versions, and a texture that is used for the material.

    Thanks a lot!

    #14329

    Hi scalare, we’ve figured out and fixed this issue. It should be available in the upcoming 2.12 release, probably this week.

    Co-founder and lead developer at Soft8Soft.

    #14330
    scalare
    Customer

    That’s great, thank you, Ivan!

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