Search Unity

POT of images for compression when mipmaps are enabled.

Discussion in '2D' started by omatase, Nov 23, 2015.

  1. omatase

    omatase

    Joined:
    Jul 31, 2014
    Posts:
    159
    I have a background image in one of my scenes that just needs to scale on the horizontal (keeping aspect ratio) to always fill the background. When I look at this image I see this error: "only POT textures can be compressed if mip-maps are enabled". At first I didn't know what mip-maps or POT images were but I have since educated myself. My question is, is it in my best interest to convert this image to a POT image? Does it help on the Unity package size or memory footprint size or both? Are mip maps enabled by default? When do I want to enable those?

    I also found an article online saying an image only has to be power of two in one dimension. For instance 1920x1024 or 2048x1080 instead of 2048x1024.

    "In other words any image that is "8", "16", "32", "64", "128", "256", "512", "1024", "2048" (or higher for more modern games) pixels in one or more width/height direction, is considered valid and properlyoptimised for quick loading into a game and processing into memory"

    However this POT message in Unity does not go away unless both dimensions are POT. Which is correct?

    Appreciate any help!
     
  2. funshark

    funshark

    Joined:
    Mar 24, 2009
    Posts:
    225
    Never seen anything like POT on one side only; seems weird.

    MIP MAPs are there to
    1. retrieve some memory on the CG if the texture is far away and doesn't need to be loaded at full res
    2. help to erase weird aliasing or moiré for far away textures and we can also use MIPMAPs to add cheap distance effects ( if you edit them )

    I'm not sure about how the last hardware handle POT textures today, but if you have choice, always try to have a POT one; especially if you plan to build for multiple devices.
     
  3. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Agreed, sounds odd. Game engines will often modify a texture's dimensions depending on target platform though? As far as I know for older mobiles you need square pot or nothing.
     
  4. omatase

    omatase

    Joined:
    Jul 31, 2014
    Posts:
    159
    So, to sum up, try to use power of two for all of my images? Or just large images? And it has to be power of two in both directions.
     
  5. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Only for mobile compressed formats afaik. Unity will force you to. Otherwise just don't bother, because you're not making anything faster or better doing this. Let Unity handle it.
     
  6. omatase

    omatase

    Joined:
    Jul 31, 2014
    Posts:
    159
    Oh OK, good to know. So if I plan on someday in the future eventually making a mobile version would you advise getting my power of twos in order now, or is that part of what I should do when making the port?