Search Unity

Alternatives to PVRTC on iOS

Discussion in 'Editor & General Support' started by dustinbahr, Jan 28, 2016.

  1. dustinbahr

    dustinbahr

    Joined:
    Sep 10, 2012
    Posts:
    57
    Most of our content is 2D graphics.

    PVRTC looks terrible most of the time.

    16 bit looks decent only sometimes, if there are no gradients.

    Truecolor (32 bit) is huge.

    Therefore, in the past we had used ETC2 on almost everything. We used it on both Android and iOS.

    ETC2 is NOT supported by hardware in iOS and various Android devices, and therefore was decompressed by the CPU at runtime.

    We completely understood this, but chose it anyway because it would decrease our file sizes a TON!

    Now Unity has decided to take this away from us. Since 5.2.2p2, in editor if you select ETC2 while on the iOS build platform, your compression choice is forced to PVRTC.

    What can we do?! PVRTC makes our graphics look terrible, yet without it, the app size is HUGE.

    I have filed bugs, started various threads, with NO answer from Unity. At least give us an alternative...
     
    mh114 likes this.
  2. mdrotar

    mdrotar

    Joined:
    Aug 26, 2013
    Posts:
    377
    I'm facing the same problem and there is no good news here.

    I'd tell you to toss a few votes up on this feedback item supporting other texture storage formats but it was asked for 5 years ago and already has decent support so there must be some bigger reason why they're not implementing it.
     
  3. joe.davis

    joe.davis

    Joined:
    Apr 17, 2012
    Posts:
    14
  4. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    A big problem is that unity only provides very limited options for PVRTC compression settings.
    I can compress a file for ios myself to PVRTC in the pvrtextool with much better results (but longer time needed):
    https://community.imgtec.com/developers/powervr/tools/pvrtextool/
    The problem is that if the game is for multible platform its a pain to handle.
    Normally i can do compression settings just a overwrite per platform, but with converting the files per hand unity sees it as an extra file and i can not assign the texture in the editor and test it..

    If unity would allow more / custom settings for PVRTC compression (even if its blowing the conversion times by 10x ) i could get much better results without breaking the unity workflow.

    Even if its a option to put a file into some unity folder with custom compression settings would be ok, just any way we can decide if we are ok with lower quality or can blow 5 minutes per image without any problem.
     
  5. mdrotar

    mdrotar

    Joined:
    Aug 26, 2013
    Posts:
    377
  6. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,038
    Unity needs some colour reduction tools built into the sprite packer, really. I use ImageAlpha to reduce things down to mobile-friendly levels and still maintain OK (sometimes even visually identical) quality on PVRTC.
     
    senkal_ likes this.
  7. dustinbahr

    dustinbahr

    Joined:
    Sep 10, 2012
    Posts:
    57
    The user guide is over my head.

    As mentioned in Unity PVRTC is either on or off, no extra settings. Do I need to prepare my graphics in a different way before importing to Unity?

    Should pretty much all cases of 2D graphics be able to take advantage of PVRTC without significant quality issues? Gradients, transparency, etc?
     
  8. dustinbahr

    dustinbahr

    Joined:
    Sep 10, 2012
    Posts:
    57
    In this example the content is made of of layer sprites (2D Toolkit). See how PVRTC messes up the gradient transparency?

    True Color:
    Jubitron_TrueColor.png

    ETC2:
    Jubitron_ETC2.png

    PVRTC:
    Jubitron_PVRTC.png
     
  9. dustinbahr

    dustinbahr

    Joined:
    Sep 10, 2012
    Posts:
    57
    That set was with premultiply turned ON in 2DToolkit. Here is a set with premultiply turned OFF. As you can see PVRTC does improve, however, there is still a terrible banding in the transparent gradient.

    TrueColor:
    Jubitron_TrueColor.png

    ETC2:
    Jubitron_ETC2.png

    PVRTC:
    Jubitron_PVRTC.png
     
  10. mianer520

    mianer520

    Joined:
    Jul 1, 2015
    Posts:
    1
    Hi dustinbahr,
    I just try to reproduce this issue in PVRTexTool, But I can not reproduce it. I got the result as attachment.
    Is that mean I can only reproduce it on device(and compress it in Unity)?

    Thanks,
    Kevin
     

    Attached Files:

  11. cl9-2

    cl9-2

    Joined:
    May 31, 2013
    Posts:
    417
    lifeisfunxyz likes this.
  12. mh114

    mh114

    Joined:
    Nov 17, 2013
    Posts:
    295
    I think ASTC also has hardware requirements (A8 and up), not only iOS 7+. It's kinda bummer that we only get PVRTC for iOS, as it often looks like S*** for (vector) sprite graphics. :( I had to use uncompressed for iOS, whereas on Android I can happily use ETC2 in all but UI sprites.
     
  13. dustinbahr

    dustinbahr

    Joined:
    Sep 10, 2012
    Posts:
    57
    Would appreciate an official response from Unity on this. Previous to 5.2.2p2 we could use ETC2 even though it had the downside of decompressing on load.

    To those talking about other tools for compressing:

    A) I don't see why we should have to add another tool to our workflow.
    B) The issues arise mostly with layered transparent PARTS of graphics, this is why you cannot reproduce my issues. Each character is made of layers parts.
    C) We use 2D Toolkit to dice our images.
     
    lifeisfunxyz likes this.
  14. lifeisfunxyz

    lifeisfunxyz

    Joined:
    Aug 9, 2017
    Posts:
    8
    Good for graphic, spend some load time.
    from 2s -> 7s