[SOLVED] BASIS compression in ASTC mode causes strange download sizes

Hi,
when optimizing one of our projects we noticed that one of our texture files had inflated a lot in size when looking at the file download size in the bowser inspector. Upon further inspection we found that this texture had been compressed using BASIS, but with the ASTC mode to reduce artifacts. In the playcanvas editor the reported file size after compression was 24 KB whereas the reported size in the inspector was 1.4 MB!

BASIS compression in ETC mode however, did not cause this unexpected file size inflation, so there seems to be something buggy with the ASTC mode.

The original picture was a 1024x1024 jpg picture with a size of 10 KB.

Anyone have any idea what’s happening here?

Basis is for reducing the VRAM usage for textures. File size may increase or decrease but is not related to the VRAM usage.

Can you screenshot the basis compression section for the texture please?

yeah, but I’ve understood it that this is the file size after compression (which should reflect download size) while vram size is shown next to it.
image

Before we have experienced some increase in file size when using the ASTC mode, but none as dramatic as in this case

Can you share the texture in question in a public project?

ok. give me 2 min

Also,

I’m pretty sure I asked something similar before, but I can’t seem to find it. Can you confirm that the sizes you’re seeing are also in the published build? If I recall correctly, I had the editor saying a much smaller size than what I would get when launching the app, but publishing the build would download the expected file sizes.

1 Like

Oh, ok. you are right.
when making a build, the downloaded file size is much smaller and reflects the reported file size in the editor. It would seem this only occurs when running directly from the editor.

Anyways here’s a blank project with the texture: https://playcanvas.com/editor/scene/1606673

1 Like

Ah, interesting. I did not know that the basis file would compress well in gzip.

In the launch tab, we don’t gzip assets for transfer across the network.

On publish, we do and the basis textures seem to compress very well which you can see here

This is why you see it being 1.4MB in the launch tab.

wow,
that is interesting!
and nice to know. thanks gyes! :slight_smile: