Search Unity

what image format? psd? jpeg? pros cons

Discussion in 'Editor & General Support' started by giancamati, Jan 22, 2013.

  1. giancamati

    giancamati

    Joined:
    Aug 4, 2010
    Posts:
    518
    Hi Guys,

    after 2 years in developing with Unity3D (Bless you all!!) I still struggle in choosing the right file format for the apps. I mean, PSD files are super compatible and if I can manage the alpha channel even better. But They have a bigger size than a jpeg.
    So, not sure if there is an answer to my question, but what would be then the best practice (if there is any) in choosing image formats for apps in Unity? and if I always choose PSD, are they somehow optimized to reduce the impact of the final .exe file dimension?

    Many thanks for the advise.
    GC
     
    Last edited: Jan 22, 2013
  2. shaderop

    shaderop

    Joined:
    Nov 24, 2010
    Posts:
    942
    Someone correct me if I'm wrong, but I'm pretty sure that the format of the source images has no impact on the final size of the game. And I would never use JPEGs because of their lossy compression. If the image was made in Photoshop then I use PSDs, otherwise it's PNGs all the way.
     
  3. Pix10

    Pix10

    Joined:
    Jul 21, 2012
    Posts:
    850
    TGA and .PSD are the best formats to use.

    JPG is lossy, and different applications will give variable quality results. And if you're using textures with alpha, then you want to avoid PNG as source files, as the majority of applications (Photoshop included) won't save premultiplied alphas, raising the potential for matte fringing - when saving PNG, Photoshop gets the alpha from the layer stack's transparency, rather than the physical Alpha channel (channel 4 in the Channels tab in photoshop), whereas when Unity reads a PSD, it reads the Alpha channel (you probably already know this after 2 years, but it's important stuff to bear in mind).
     
    Last edited: Jan 22, 2013
  4. giancamati

    giancamati

    Joined:
    Aug 4, 2010
    Posts:
    518
    Hey Guys,

    thank you very much, so.... I understand that the bottom line is.. using PSD images (almost always). Right? it seems the best and kind of "universal" solution for everything.

    Best,
    GC
     
  5. Pix10

    Pix10

    Joined:
    Jul 21, 2012
    Posts:
    850
    I've not run afoul of them yet - many of my source files are WIP, many layers and up to 4k resolution, it doesn't seem to impact the speed Unity imports them, just the diskspace amount ...lots of 90MB files is a bit alarming, but if you're using SVN or Asset Server you may want to use flattened files ;)
     
  6. giancamati

    giancamati

    Joined:
    Aug 4, 2010
    Posts:
    518
    Thank you very much for all your suggestions very helpful! :)