Search Unity

Resources folder | PSD TEX2D size and memory use

Discussion in 'iOS and tvOS' started by iEarthHero1, Jul 17, 2010.

  1. iEarthHero1

    iEarthHero1

    Joined:
    Jul 28, 2009
    Posts:
    301
    I would like to have all my TEX2D PSD files be 512x512 pixels and place them in an ASSETS/RESOURCES folder.

    If I am assigning them in the player using the GUI features and the script indicates 32x32 pixels, on the iPhone does this consume 32x32 pixels of memory or 512x512 pixels of memory?

    In other words, iPhone memory wise is it ok to always have PSD files 512x512 or should they be as close to the real resolution of 32x32 as possible?

    I guess I am wondering if Unity realizes they are being dropped to 32x32 and takes cares of this before dumping them on the iPhone.

    Thanks.
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    psd when used in the game are equal to all other non-pvr textures in size.
    it will only remain a psd in the editor

    if the texture is 512x512, then it will use the 512x512 actually independent of the size you use it. the difference is just that your rendering iwll potentially run on a lower mipmap level but mip level 0+ still needs to keep it in memory.

    if you know it will never appear larger than xxx x xxx, then alter the import settings to that as max size
     
  3. iEarthHero1

    iEarthHero1

    Joined:
    Jul 28, 2009
    Posts:
    301
    So what you are saying is if I have a 512x512 PSD and the game only uses a 32x32... I should shrink the PSD to 32x32 for Unity to use?

    I am aware that I should go with square power 2 textures when I can.

    Thanks.
     
  4. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    you can shrink the psd but you can also change it in the import settings so unity resizes the imported incarnation of the file (there is a drop down for the allowed max size, which is for exactly this kind of stuff)
     
  5. iEarthHero1

    iEarthHero1

    Joined:
    Jul 28, 2009
    Posts:
    301
    Understood.

    Thanks for the tips and the fast responses.

    Thanks.