Home Unity

iOS texture compression on unity

polycounter lvl 7
Offline / Send Message
Monteiro polycounter lvl 7
This may be kinda simple but i'm having some trouble here
I'm building for a large range of devices (starting with a iPhone 6 with A8) to most recent devices. And the last time i've made a build to iOS was like.. 2013, and i used ETC2 to compress my textures, wich don't exist anymore on unity.

Now i'm making a simple VR, with no interactions, just a camera travel with a few animations.
My main concern is about the size and performance to achiev the framerate i need and get rid of some ghosting.
already got rid of all the lighting information i could (using a single light source on each scene, and baking as much info as i can) and all the geometry i could dump (i don't know what would be a reasonable limit for geometry here but i barely reach 15k and i oclude the scene).
And now i need to know:

how do i compress my textures... i mean... i'm no expert, and i'm doing what i can to get this thing done...
i have PVRTC wich seems to me ugly as hell but better on performance, and ASTC wich seem a little better, but makes the textures twice the size...
also, i don't know if i leave normal maps with alphas (do they need the alpha chanel?).

please someone help me here...

Replies

  • cptSwing
    Options
    Offline / Send Message
    cptSwing polycounter lvl 11
    ASTC is supported since they released the A8 architecture, so you should probably give that a shot first, bigger size or not. It also helps to manually set compression of PVRTC textures in Unity to "Best", this doesn't affect resulting texture size. After baking your final lightmaps, do this for the lightmap textures as well (..setting gets wiped with each new bake, though - sigh).

    You could probably bang in some more tris as well, on Samsung Gear we've ran VR apps with ~90k tris quite successfully. But yeah - as few RT lights as possible.
  • RyanB
    Options
    Offline / Send Message
    My advice:
    Use PVRTC
    Don't include the alpha channel unless you need it (affects compression quality)
    Adding a bit of subtle noise can actually improve PVRTC
    Always use best compression option
    Turn off mip-mapping if object isn't moving towards/away from you, this will save 30% of memory
    Turn off the read/write flag on the texture will cut the memory used in half (do this when you have your art locked down)
    You can try https://community.imgtec.com/developers/powervr/tools/pvrtextool/  for compression but I honestly found no improvement over best option in Unity

    You can also turn off the read/write flag to cut the memory used on meshes in half (be aware that after turning it off requires a manual refresh to update each texture)

    You need to profile on device through XCode to get an accurate picture of what is causing your problems.

  • cptSwing
    Options
    Offline / Send Message
    cptSwing polycounter lvl 11
    ^ Great advice. Also, when using PVRTC, keep all your textures square. Yeah, really.
  • RyanB
    Options
    Offline / Send Message
    cptSwing said:
    ^ Great advice. Also, when using PVRTC, keep all your textures square. Yeah, really.
    Or pack them in sheets. 
  • Monteiro
    Options
    Offline / Send Message
    Monteiro polycounter lvl 7
    i have no idea if the client is gonna try to ship the app in some 5s iphones (i really hope he doesn't i told it's just not an option... but you never know). All the textures are square, and i'll go with the pvrtc thanks for all the advice, specially about the mip mapping on close objects that won't need them... (it's kinda obvious after someone point it out... lol)
    thanks !!
Sign In or Register to comment.