Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Bug High quality RGBM texture compression with ASTC

Discussion in '2019.3 Beta' started by JesOb, Jan 16, 2020.

  1. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,109
    hippocoder and AlejUb like this.
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
  3. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,109
    it is not

    I Have Unity 2019.3.0f5 and it dont work

    I have compile tool from blog and apply it to texture Texture from Blog
    Results:

    RawImage: ASTC 6x6
    upload_2020-1-16_17-25-46.png

    Processed Image ASTC8x8:
    upload_2020-1-16_17-26-5.png

    So it definitely not work :)
     
    hippocoder likes this.
  4. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,109
    And even ASTC 12x12:
    upload_2020-1-16_17-31-50.png
     
    hippocoder and AlejMC like this.
  5. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,109
    created bug report

    (Case 1212017)
     
    hippocoder, AlejUb and LeonhardP like this.
  6. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    479
    We did not integrate ARM's solution for RGBM encoded ASTC textures yet.

    The bugfix above disables RGBM encoding for ASTC LDR compressed HDR cubemaps. With this fix you should get the same results as in older Unity version such as 2018.4.

    We have plans to integrate the improved ASTC specific RGBM encoder into a future Unity version, but I don't have a specific version yet.

    For now if you want RGBM encoded HDR cubemaps on mobile then please use ETC2 RGBA.
     
    AlejMC and LeonhardP like this.
  7. AlejMC

    AlejMC

    Joined:
    Oct 15, 2013
    Posts:
    149
    What's impressive is that even ASTC12x12 looks great.
    Would this cube map ASTC compression processing trickle down to lightmaps too? currently light maps on iOS platform are by default PVRTC for low quality and ETC2 for medium quality but seems like there would be great storage benefits by having the option to select ASTC and which block size in there too.
     
    hippocoder and JesOb like this.
  8. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    479
    The ASTC/RGBM compression method of the original ARM blog post generates different kind of artifacts when linear filtering is used to sample those textures.
    This means that at this point our effort to integrate the original algorithm is on hold.
     
  9. fendercodes

    fendercodes

    Joined:
    Feb 4, 2019
    Posts:
    192
    @florianpenzkofer I'm finding it difficult to figure out which settings to use for lightmaps targeting mobile devices. I'd like to target more modern devices, so should I set Lightmap Encoding to "Normal Quality" and use the ASTC format? (e.g. RGB(A) Compressed ASTC 6x6 block). I gather that would be ASTC/RGBM which is why I am commenting here.
     
  10. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    479
    I would recommend to use ETC2 RGBA for the "_light" texture of lightmaps when Lightmap Encoding is "Normal Quality". But it depends on the dynamic range of the lightmap whether ASTC/RGBM artifacts are visible.
     
  11. dan3dd

    dan3dd

    Joined:
    Apr 12, 2021
    Posts:
    3
    Any news? 2020.3.8f1 Bug still there(
     
  12. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    479
    In 2020.3.13 the upgrade of the astc compressor was backported. It includes special handling for RGBM.
     
    dan3dd and JesOb like this.
  13. dan3dd

    dan3dd

    Joined:
    Apr 12, 2021
    Posts:
    3
    2020.3.14 There are still some artifacts

    ASTC6x6
    upload_2021-7-27_12-45-57.png

    ASTC4x4
    upload_2021-7-27_12-47-39.png

    ETC2
    upload_2021-7-27_12-48-7.png
     
    JesOb likes this.
  14. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    479
    Do you know if the same scene looks good with ASTC in Unity 2021.2 beta?
    I'm not sure if these are this is still a general problem or if something is wrong or missing in the backport.
    Main reason why the ASTC changes were backported was to improve compression speed.
     
  15. dan3dd

    dan3dd

    Joined:
    Apr 12, 2021
    Posts:
    3
    Sorry for the delay. 2021.2.0b4.3123
    upload_2021-7-28_20-13-30.png
     
  16. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    479
    Can you please report a bug so that we can have a look?
     
  17. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    479
    Please post the bug number here when you have one.
     
  18. sschoellhammer

    sschoellhammer

    Joined:
    Feb 15, 2013
    Posts:
    46
    @florianpenzkofer

    Sorry to hijack this thread but no matter what I do I can't seem to get this encoding with cubemaps? At least in Unity 2020.3.16f1

    Is there a reason? If I set to a normal 2d texture it uses RGBM but cubes are becoming dLDR

    Thanks for pointers!
     
  19. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    479
    There is a special case for cubemaps on mobile platforms and the related change was not backported to 2020.3.
    There ASTC is still treated as "not suitable for RGBM".
    I believe you should get RGBM also for cubemaps if the Lightmap Encoding (PlayerSettings) is set to Normal Quality.
    I can backport that missing change if needed.