Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

new texture compression option?

Discussion in 'Android' started by luniac, Sep 9, 2015.

  1. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    598
    Can someone explain this:
    Compress using ETC1 (split alpha channel)

    Does it save space overall? My sprites with alpha always used ETC2

    how do i see the new atlas sizes in unity?? so i can compare.... there are no updated docs for this stuff...

    Also why does it take so long to compress using this new method??
     
    Last edited: Sep 9, 2015
    sonee likes this.
  2. sonee

    sonee

    Joined:
    Sep 2, 2012
    Posts:
    18
    I've checked it several times that the unity creates etc1 atlas and alpha atlas, because it seems to require modifying shader code to combine the 2 textures in pipeline, but unity always create etc2 even though the option was checked.
    In the standard asset, there is a shader for sprite. The file contains a variable for the option (alphasplit), but the shader code looks temporarilly written because it uses if statement that causes low performance (I don't know how it converted while compiling). I couldn't trust my eyes to the shader code that Unity wrote.
    So it seems that the feature is a kind of experimental feature yet.
     
    Last edited: Oct 20, 2015
  3. Kiyokazu_Takahashi

    Kiyokazu_Takahashi

    Joined:
    Jun 29, 2015
    Posts:
    1
    I asked Unity company about this issue.
    They made an answer that it is not working at current version(5.2).
     
    sonee and MrEsquire like this.
  4. zzajac

    zzajac

    Joined:
    Feb 20, 2015
    Posts:
    22
    Do you know in which version this option will work?
     
  5. PixelSquad

    PixelSquad

    Joined:
    Sep 4, 2014
    Posts:
    114
    Bump. I was just looking into this. Anyone has answers?

    I enabled it and was beginning to wonder if it was working. If it is doing some magic under the hood and it's working, I'd like to know if there's a way of disabling mip maps with this option.
     
  6. sandboxed

    sandboxed

    Unity Technologies

    Joined:
    Apr 6, 2015
    Posts:
    95
    This feature is working in 5.2.
    Some bugs related to preview UI were identified and fixed soon after.

    The requirements for ETC1 compression to be enabled with alpha textures
    * Textures must be put on an atlas (via packing tags)
    * Textures must have the "Compress using ETC1" flag checked
    * Built target must be android (since the feature doesn't make sense for other platforms).

    You can use the SpritePacker window to see the packed atlas. Those compressed with ETC1 / Alpha will not have any transparency.
     
    PixelSquad likes this.
  7. PixelSquad

    PixelSquad

    Joined:
    Sep 4, 2014
    Posts:
    114
    Thanks for the answer sandboxed. Can I make a little request. Why not to make it available to any texture, and lifting the requirement of it being in an atlas? All the best.
     
  8. sandboxed

    sandboxed

    Unity Technologies

    Joined:
    Apr 6, 2015
    Posts:
    95
    We would like to know more on the use case for this request.

    As far as I understand, ETC1 with Alpha has a very narrow audience.
    ETC1 doesn't support alpha under its specifications, and anyone wanting to use ETC1 will have that in mind.
    This feature is a kind of wrapper to what was considered a work-around for the ETC1 compressions and alpha textures.
    Also ETC1 is kinda limited to Android, and Tizen platforms (that too older ones).

    One reason for sticking to atlases is the tradeoff of the complexity of asset management if this feature is enabled on a per texture level vs the audience it would service.
     
  9. nmad

    nmad

    Joined:
    Jul 28, 2013
    Posts:
    8
    Hi.
    For Unity, there is any plan to support ETC compression for textures using alpha channel?
    Because, according to this "http://hwstats.unity3d.com/mobile/gpu-android.html", there are many devices that only supports Open GL 2.0.

    ARM ES2.0: 32.1%
    PowerVR ES2.0: 8.5%
    Qualcomm ES2.0: 4.4%
    Vivante ES2.0: 2.8%
    Broadcom ES2.0: 2.8%
    NVIDIA ES2.0: 0.9%

    Total: 51.5%

    Thanks in advance.
     
  10. sandboxed

    sandboxed

    Unity Technologies

    Joined:
    Apr 6, 2015
    Posts:
    95
    Currently platforms eligible for ETC1 / Alpha include Andorid and Tizen (and the feature is available as of 5.2).
    Other platforms have native compression formats that support textures with alpha.
     
  11. wasedaigo

    wasedaigo

    Joined:
    Apr 14, 2013
    Posts:
    7
    Hi, I want to confirm the following points:

    According to nmad's post, this does not seem to be correct.
    I would not call 51.5% as "narrow".

    This feature is only available for Texture Atlas generated by Unity, correct?
     
  12. sandboxed

    sandboxed

    Unity Technologies

    Joined:
    Apr 6, 2015
    Posts:
    95
    @wasedaigo
    I stand corrected on the audience it would service. This is one of the benefits of talking to the community.
    We are looking into the workflow for the feature and what can be done to make it more usable, efficient.

    >> This feature is only available for Texture Atlas generated by Unity, correct?

    Yes, in the current state, ETC1/Alpha split will kick in only if the three pre-requisites are met
    1) Build platform is Android
    2) Texture is on an atlas (via packing tags)
    3) Textures have been marked for opt in for an alpha split "Compress using ETC1 (split alpha)"
     
  13. wasedaigo

    wasedaigo

    Joined:
    Apr 14, 2013
    Posts:
    7