Search Unity

Resolved Best Compression Settings for Quest 2?

Discussion in 'VR' started by Xander-Davis, Apr 8, 2021.

  1. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    441
    Heyo,

    I'm wondering what are the best compression settings for the Quest 2? Also, preferably, what would make this most practical for ongoing development?


    Some Background:
    In Unity-Quest/2 tutorial videos that are slightly older (2019 and 2020), I've seen a lot of devs default to ASTC but some have warned this dramatically increases import times and makes life kind of hell while you're waiting forever. Instead, a tip was to use 'Don't Override' under Build Settings while developing and then switch to ASTC for release.

    Well this just bit me after a week of development on a particular prototype. I had loaded in a lot of environment pack assets to test and was amazed how performant they all were on the Quest 2. Just about zero issues. I was deliberately trying to find the limits for what can be done with OQ2 development (Lordy lord, don't have more than a couple realtime lights at any given time!). My builds were 1.7 - 3.5 GB. (I later learned Oculus has a 1 GB limit for uploading APKs to their App Store). Once it hit 3.5 GB deployed onto the hardware, OQ2 started glitching out with 'SystemUX Keeps Quitting' errors... failing to load the Apps menu / constantly crashing it if I had my build installed. Also giving me a heart attack making it think I just bricked my Quest 2. I stopped these errors by using Oculus Developer Hub on desktop to remove the build from the OQ2 device.

    My theory is the builds were just too enormous for OQ2's OS or its 6 GB RAM to handle... ? Or maybe something got corrupted in my project, tripling build size and creating the near-catastrophic SystemUX error on OQ2. Fortunately, I made a backup that morning before this started happening so I was able to use that again and the problem didn't resurface.

    Either way, I suddenly became aware of the need to pay attention to build sizes...

    So...

    I decided to make ASTC mandatory for myself but converting the entire prototype project with all of those environment packs in it at this point had Unity re-importing the assets with the progress bar just hanging on about 20% for a full day (though the file paths of textures it was working on would change if you stared at it long enough, confirming it was working its way through it all), before I Forced Quit the editor and restored a project backup.

    And here I am... wondering now what the heck I should do about this and which compression settings I should use that keeps development practical but also avoids potentially blowing up my Quest 2 hardware.

    I found articles like this but it seems a bit outdated by now (for example LZMA isn't available anymore and instead we have LZ4HC... ?):
    https://gamasutra.com/blogs/RubenTo...pression_Mode_for_Your_Addressable_Groups.php

    And then I see posts like this saying uncompressed was actually the best? WTF?
    https://forum.unity.com/threads/dif...w-compression-methods-in-build-window.487486/

    Any advice for OQ2 development today with Unity 2020 LTS? Much appreciated!
     
    Last edited: Apr 8, 2021
    luispedrofonseca likes this.
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    I just use ASTC. I have not experienced hellish import times.
     
    andreiagmu likes this.
  3. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    441
    After reimporting the entire project, which took days under ASTC compression, it ended up saving me about 20% on build size. I was hoping for more for as long as it took but ah well. 20% is pretty worthwhile.

    It was a pain to do but fortunately it only needed to be done once, unlike other tedious processes like baking lightmaps over and over.
     
  4. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    I don't think it's just about build size, though — I seem to recall reading that ASTC is better at runtime on Quest for other reasons, too.

    Glad you got through it!
     
    Xander-Davis likes this.
  5. Shanti_Baba

    Shanti_Baba

    Joined:
    Nov 13, 2018
    Posts:
    12
    hey guys
    any guides as how to do this properly?
    would love some help:eek:
     
  6. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,059
    Oculus' official guide still recommends ASTC, so unless you have found something major when using another compression, just use ASTC. Never had any issues with imports, except for the initial project import, which was expected
     
  7. korinVR

    korinVR

    Joined:
    Jul 7, 2012
    Posts:
    34
    ASTC is the best choice for Quest. If you want to get a higher compression rate, select a larger block size (8x8 to 12x12 ASTC) in the individual texture import settings.

    And note that Unity 2021.1 and 2021.2 are dramatically faster at importing ASTC than Unity 2020. So if you can update to Unity 2021.2, I highly recommend it. Additionally, Unity 2021.2 has a "Force Fast Compressor" option.

    Read this article and see the "BOTD switch to Android+ASTC" figure.
    https://blog.unity.com/technology/behind-the-scenes-speeding-up-unity-workflows

    Also, check out the "Parallel Import" option in Project Settings > Editor > Asset Pipeline.

    Importing ASTC textures is not a big pain in Unity 2021.2.
     
  8. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,059
    In 2021.2 make sure to disable depth and stencil for quest if you use vulkan btw
    Massive performance dip (hopefully fixed soon, already reported)
     
    glenneroo and ImpossibleRobert like this.
  9. Shanti-AnyVerse

    Shanti-AnyVerse

    Joined:
    Dec 26, 2021
    Posts:
    24
    hey, where do i find these settings to disable?
     
  10. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,059
    Urp assets
     
  11. mabulous

    mabulous

    Joined:
    Jan 4, 2013
    Posts:
    198
  12. mabulous

    mabulous

    Joined:
    Jan 4, 2013
    Posts:
    198

    ASTC is mainly the best option for GPU foot-print, not necessarily for application build size.
     
    DevDunk likes this.
  13. Chris_Payne_QS

    Chris_Payne_QS

    Joined:
    Jul 16, 2016
    Posts:
    84
    How could it be different? The textures are stored on disk with ASTC compression, so if that's smallest in RAM it's smallest on disk too.

    You do need to check the compression settings per texture by hand though. ASTC is extremely efficient but lossy, so you can get MASSIVE savings on grungy or plain textures where the loss is acceptable, but you must reduce the compression on textures with detail in them to preserve it. Leaving all assets on the same default settings will give you mediocre compression and mediocre texture quality.
     
    Beauque likes this.