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. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

Compressed Texture Support

Discussion in 'Project Tiny' started by kognito1, Dec 6, 2018.

  1. kognito1

    kognito1

    Joined:
    Apr 7, 2015
    Posts:
    331
    Is there support (or planned support) for compressed textures (dxt, etc2, pvr) with Tiny?
     
  2. MBest_Unity

    MBest_Unity

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    18
    I'll note your interest in it. Love to know how important this is to your needs 2D vs 3D. Certainly when we hit 3D we will be doing looking to do something here, would love to understand if you have more urgent need?
     
  3. kognito1

    kognito1

    Joined:
    Apr 7, 2015
    Posts:
    331
    Currently most of our products are based off of the Unity WebGL platform and yes most of them (3D, non-trivial logic and scope) are nonstarters for Tiny. We are in the process of enabling our products on mobile browsers and outside of iOS not having robust wasm support, the lack of compressed texture support in Unity for etc2/pvr hurts the most.

    But as you pointed out, this is not what Tiny is targeting. So we'll cross that bridge when we get there right? However I still think there are valid use cases for compressed textures even in this stage. For example we have some simple content that's essentially a powerpoint that we still build with Unity WebGL [for various reasons]. Even with stripping the Unity engine is a bit "heavy" for this use case and I thought Tiny might be a good fit here. The problem is even though these "powerpoints" are simple logic wise they are still pretty asset heavy. Since all the textures are uncompressed, my Tiny builds quickly ballooned in size even in a quick prototype. Honestly I'm not sure it would be win over WebGL at this stage if we took it all the way. I think compressed textures could change the tide though.

    At any rate, not a big deal since we're happy with the status quo (WebGL), was just curious.
     
  4. sebastianm_unity

    sebastianm_unity

    Unity Technologies

    Joined:
    May 3, 2018
    Posts:
    21
    Image assets in tiny are compressed as png, jpg or webp for transport.
    Compressed textures like etc/pvrtc are for compression in gpu memory - at great quality loss, usually not suitable for 2D games - and do not provide enough compression for transport.
    Tiny defaults to not re-compressing at export time, but you can force jpeg or webp in project settings under "Default Texture Format".
     
  5. kognito1

    kognito1

    Joined:
    Apr 7, 2015
    Posts:
    331
    Yes just noticed the option to export with jpeg, that will be helpful but still not as ideal (no better than crunch compression with respect to size and quality but with the negative of the texture being uncompressed on the gpu).

    I'll be honest I completely disagree with your assessment. Sure there will always be sprites that have to be uncompressed due to quality reasons, but we've shipped hundreds of (2D) textures that were compressed (most were "super compressed" with crunch). The notion that compressed textures don't provide enough compression for transportation is kind of nonsensical. That's the whole point of crunching (jpeg like compression that can be transcoded to a compressed texture format on load)!

    It's okay though! Clearly my webgl needs are not currently the target. Tiny is just a bit more tiny than I thought it would be. :D We will reevaluate when things are a little further along. :)