Search Unity

PSD vs. PNG: drop shadow discrepancies

Discussion in 'Editor & General Support' started by Paintbrush, May 4, 2009.

  1. Paintbrush

    Paintbrush

    Joined:
    Apr 1, 2009
    Posts:
    23
    Hey all,

    I was pretty excited about unity's native support of photoshop files as textures, saving me the time and trouble of exporting flattened images to use as textures. I recently hit a problem that I attempted to fix by changing import settings to no avail. So I did a test by exporting a texture to PNG, which seemed to fix the problem.

    The problem specifically is the use of the drop-shadow filter to create... well, a drop shadow. I attached an example to demonstrate what's going on.

    In the attachment, the top screenshot shows a window with a PSD that has a box with a drop shadow plugin. The bottom screenshot shows a window with a PNG that was exported from photoshop from the PSD above, yet the drop shadows behave differently (the PNG is doing it right). Is there something I can do to fix the PSD's drop shadow, or is exporting to a flat PNG file the only solution to this?

    Thanks for any help folks!
    Jay
     

    Attached Files:

  2. NCarter

    NCarter

    Joined:
    Sep 3, 2005
    Posts:
    686
    Try using TIFF format instead. In the save dialog, make sure the Layers checkbox is enabled. Then, in the TIFF Options dialog, you can turn on the Save Transparency checkbox to make it respect layer transparency instead of needing an explicit alpha channel. This gives you a file which has the right transparency behaviour for Unity, but which still contains the original Photoshop layers.
     
  3. Paintbrush

    Paintbrush

    Joined:
    Apr 1, 2009
    Posts:
    23
    That works beautifully, thanks NCarter :)

    I'm curious, however... I've never actually used TIFF seriously before, just PSD to keep the source and PNG for exports if I want alpha-channel transparency. Are there any repercussions in using TIFF over PSD? I've always assumed using saving a file as anything other than PSD would cause it to lose some of its original data, like layer effects... which doesn't seem to be the case with TIFF as far as I can see when I tried your suggestion out.

    In general though, what's the asset workflow for you veteran Unity folks? Do you keep your image source files outside Unity's asset folders, and export PNG/TIFF into the asset folders, or do you just work on TIFFs directly in the asset folders?
     
  4. NCarter

    NCarter

    Joined:
    Sep 3, 2005
    Posts:
    686
    Photoshop's layered TIFF format is literally just a flat TIFF image with a PSD file embedded in it. When Photoshop opens this kind of file, it completely ignores the TIFF part and only opens the PSD part, so you shouldn't see any difference between the two formats when you open them in Photoshop. As you've seen with Unity, other apps may still see the files in different ways.

    And yes, I just save my layered TIFFs and other assets straight into the project.
     
  5. Paintbrush

    Paintbrush

    Joined:
    Apr 1, 2009
    Posts:
    23
    Well, I learn something new every day!

    Thanks much for the answers NCarter... really appreciate it :)