Home Unity

Reducing Final Build File Size

Naticus
polycounter lvl 4
Offline / Send Message
Naticus polycounter lvl 4

I am currently in the optimization stage of my project and I am looking to reduce the final build file size.  My question is regarding compressing texture files.  I'm baking the majority of the world as static objects at a 40 textel resolution.  For the static objects with baked lightmaps, is there any point to compressing the original texture maps that make up the materials on the static object?  Do both the baked lightmap and material texture map files end up in the final build?  

I have a handful of non-static objects that won't be baked so I definitely plan to compress the textures on those but if I can also save a ton on total file size by compressing the textures of the baked objects then I will do that too.  Thanks for any guidance!

Replies

  • Eric Chadwick
    Yes, you definitely should compress the baked objects' textures. The lightmap does not remove those textures; they are used together. 
  • RyanB
    Some things I look for and change:
    - Turn off the read/write flag for your FBX imports.  This will cut the amount of memory required in game for the mesh in half .  Be aware that turning it off requires you to manually refresh the FBX so do this at a later stage of your project.
    - Turn off mipmapping for anything that isn't changing size or distance from camera (UI is a good example).  This will reduce the memory required in-game by 30%.
    - Your UI textures may not be power of two and therefore may not compress.  Pack them into sprite sheets so you can have the option of using compression on your non power of two textures.
    - On mobile I use the most aggressive compression I can (2 bit) and then selectively change it on textures where I can see glitches.  The glitches usually show up on the edges of objects.

Sign In or Register to comment.