Basis etc1s failure on Android

I have 3 texture profiles for compressing my images (all of them pngs):
Screenshot 2022-08-05 at 15.13.12
rgb_best settings: rgb, best, basis uastc
rgba settings: rgba, best, basis uastc
rgb_medium settings: rgba, best, basis etc1s
Using rgb, best, basis etc1s for the profile sometimes works, but most times fails. When switching to rgba for the format, it transcodes and renders fine on my mac and also on linux.

But running the bundle on Android shows something odd:
for some, but not all of these textures using ects1 transcoding ends in failure and thus the textures render black. These failing textures show a different texture format compared to the others.

Logcat:

2022-08-05 14:25:06.458 8488-8510/com.compressiontest.todo I/defold: INFO:GRAPHICS: Transcoding: /assets/rgb_medium/uvs_medium/room6.texturec from 16 to 10 (TEXTURE_FORMAT_RGBA_ASTC_4x4 -> cTFASTC_4x4_RGBA)
2022-08-05 14:25:06.463 8488-8510/com.compressiontest.todo E/defold: ERROR:GRAPHICS: Transcoding failed on level 0 for /assets/rgb_medium/uvs_medium/room6.texturec
2022-08-05 14:25:06.463 8488-8510/com.compressiontest.todo E/defold: ERROR:GAMESYS: Failed to transcode /assets/rgb_medium/uvs_medium/room6.texturec
2022-08-05 14:25:06.463 8488-8510/com.compressiontest.todo E/defold: ERROR:GAMESYS: No matching texture format found for /assets/rgb_medium/uvs_medium/room6.texturec. Using blank texture.
-- these work, note the different format
2022-08-05 14:25:06.483 8488-8510/com.compressiontest.todo I/defold: INFO:GRAPHICS: Transcoding: /assets/rgb_medium/uvs_medium/boden2.texturec from 12 to 0 (TEXTURE_FORMAT_RGB_ETC1 -> cTFETC1_RGB)
2022-08-05 14:25:06.533 8488-8510/com.compressiontest.todo I/defold: INFO:GRAPHICS: Transcoding: /assets/rgb_medium/uvs_medium/boden6.texturec from 12 to 0 (TEXTURE_FORMAT_RGB_ETC1 -> cTFETC1_RGB)
2022-08-05 14:25:06.573 8488-8510/com.compressiontest.todo I/defold: INFO:GRAPHICS: Transcoding: /assets/rgb_medium/uvs_medium/boden5.texturec from 12 to 0 (TEXTURE_FORMAT_RGB_ETC1 -> cTFETC1_RGB)
2022-08-05 14:25:06.618 8488-8510/com.compressiontest.todo I/defold: INFO:GRAPHICS: Transcoding: /assets/rgb_medium/uvs_medium/boden4.texturec from 12 to 0 (TEXTURE_FORMAT_RGB_ETC1 -> cTFETC1_RGB)
2022-08-05 14:25:06.663 8488-8510/com.compressiontest.todo I/defold: INFO:GRAPHICS: Transcoding: /assets/rgb_medium/uvs_medium/boden3.texturec from 12 to 0 (TEXTURE_FORMAT_RGB_ETC1 -> cTFETC1_RGB)
-- next error for this and all other images that follow
2022-08-05 14:25:06.703 8488-8510/com.compressiontest.todo I/defold: INFO:GRAPHICS: Transcoding: /assets/rgb_medium/uvs_medium/boden1.texturec from 16 to 10 (TEXTURE_FORMAT_RGBA_ASTC_4x4 -> cTFASTC_4x4_RGBA)
2022-08-05 14:25:06.718 8488-8510/com.compressiontest.todo E/defold: ERROR:GRAPHICS: Transcoding failed on level 0 for /assets/rgb_medium/uvs_medium/boden1.texturec
2022-08-05 14:25:06.718 8488-8510/com.compressiontest.todo E/defold: ERROR:GAMESYS: Failed to transcode /assets/rgb_medium/uvs_medium/boden1.texturec
2022-08-05 14:25:06.718 8488-8510/com.compressiontest.todo E/defold: ERROR:GAMESYS: No matching texture format found for /assets/rgb_medium/uvs_medium/boden1.texturec. Using blank texture.

I changed the order of the profiles and this did make no difference.
Any other compression type works without problems.
Does anyone know what might be happening here or what I might have done wrong?

This isn’t a valid compression currently.
I thought we had removed that option from the editor @britzl ? :thinking:

If you choose UASTC, then the GPU on the device will dictate what formats are supported. Does this not work for you?

2 Likes

Ah - nope, still there as an option. You were misleading me :grin:

Oh, yes, works fine, I was just trying to find the smallest possible build size.
Thank you, Mathias, for your help.

Hard to say, I’d probably go with “normal” in general.
Look at some examples in the documentation.

Note that the names are poorly chosen (i.e… fast, high and best are ambiguous when in comes to different compression techniques), but instead look at them as “level 1-4”.

1 Like

Thank you Mathias! I did indeed study that page, but that was quite a while ago, and I think basis etc1s was mentioned there. Sorry!
And there it is in the up-to-date editor:
Screenshot 2022-08-05 at 16.18.02

1 Like

No, we removed it from Bob in an active PR. We also need to do the job in the editor. Let’s plan this for an upcoming release!

2 Likes

Regarding the ETC1S format (“Basis etc1s”).
I am still actively using it.
It’s a great format, works everywhere, even on older devices.
For example, in our game Dark Heroes it allowed to reduce the build size from 140MB to 110MB.

Some time ago the creators of Defold already deprived me of the wonderful ETC format, so I really ask them not to remove ETC1S!!!
This format is the last loophole for powerful compression of RGB backgrouds and textures without an alpha channel!

3 Likes

But, we don’t link with that, we only link with UASTC.
The reason was that the ETC1S was quite large (I don’t remember the code size).
That’s why I want to remove the option, since it’s confusing that we still use the name in our enums.

But sure, that current setting, we won’t remove. Possibly we’ll simply rename it to make it match expectations better.

We still have the intention to open up the texture compilation with a new api so that you can add your own encoder/decoder.
The biggest design issue there is to provide the texture profiles to that new api, but still I’d like to start with that soon as well.

5 Likes

Well, I finally ran into it. :frowning:
Using the format crashes on Galaxy S23. And it’s still unknown on new devices, we just haven’t tested it everywhere.
logcat.txt (138.8 KB)