Forum

Author Topic: Exporting GLB with no textures is twice the size of model with texture...  (Read 6337 times)

John_H

  • Newbie
  • *
  • Posts: 18
    • View Profile
Hi,

I have a model with approx. 3million triangles and 4x8k textures. When I export the model as Binary gITF (.glb), the model size is 140MB.

If I export the same model in the same format, but without the textures, the size is 347MB. This is the same whether I export the model with the 'export texture' option unchecked, or  first remove the textures from the model and then export it.

The same thing happens with other models as well.

FYI, the same model exported as OBJ and then all files zipped is 110MB with texture, 55MB without.

Thanks,
John

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15177
    • View Profile
Hello John,

I do not observe this difference on a random project, exporting the model in glTF format from the same project with Export Texture option enabled and disabled. Untextured model export results in smaller file.

Can you share the screenshots of the Export Model dialog with the parameters used for each run and the log from the Console pane related to each export attempt (with and without the texture)?
Best regards,
Alexey Pasumansky,
Agisoft LLC

John_H

  • Newbie
  • *
  • Posts: 18
    • View Profile
Hi Alexey,

I've done some experimenting, and it appears the issue only appears when there are multiple texture files. If you check the attached file (filesizes.png), you can see exports for two models. I've processed both models with 1x8k texture and 4x8k texture, and exported both with and without texture.

The models with 1 texture behave as expected, the model exported without texture is smaller than the model with; however, both models with 4 textures are considerably larger when exported without textures than with!

Also, the model that has 4x textures exported with no texture is roughly four times the size of the model that has 1x texture exported with no textures, despite the fact that they should be exactly the same model!

I'm pretty sure that this doesn't happen when exporting the same models as objs (ie, the total size of the textured model is larger than the untextured, as expected)

None of this makes sense to me! 

I've also attached a sample log from the console of an export with and without texture, and a screenshot of the options (for the non-textured model it's the same, but I untick the export texture option)

Thanks,

John

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15177
    • View Profile
Hello John,

Thank you for additional information. However, I am still not able to reproduce the problem, trying both 1.8.5 and 2.0.2 versions for multi-page texture atlas.

If you can share an example of the project (in PSZ format) that contains only textured model (no need of tie points, cameras and other processing results) for export tests, please send the project or download link to support@agisoft.com.
Best regards,
Alexey Pasumansky,
Agisoft LLC

John_H

  • Newbie
  • *
  • Posts: 18
    • View Profile
Hi Alexey,

I've attached a link to the psz file.

I had a look at the glb files in notepad, and the headers look ok, but the file without textures is 4 million lines long, compared to the file with textures which is 700k.

john

https://drive.google.com/file/d/1jXDKYfJErrV_nG33tLkpwKNylOXLN9Et/view?usp=sharing
« Last Edit: June 09, 2023, 03:53:17 PM by John_H »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15177
    • View Profile
Hello John,

Thank you for sharing, we were able to download the project for testing.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15177
    • View Profile
Hello John,

The issue will be fixed in the next update. It appeared that original model has been saved multiple times in glb file depending on the number for texture pages in the source model.
Best regards,
Alexey Pasumansky,
Agisoft LLC

John_H

  • Newbie
  • *
  • Posts: 18
    • View Profile
Ok, thanks Alexey - good to know I wasn't going crazy!

But just to confirm - this bug only occurs when exporting a model without textures; exporting the same model with multiple texture files works fine.
« Last Edit: June 14, 2023, 01:35:05 PM by John_H »