Unity being able to read PSD files is great! But not so much if you’re using transparency, since then all files end up as Premultiplied with White, yet they are treated as Straight RGB by Unity…
Look at the first row here:
Broken… Here’s 2 ways to fix this:
- Create your own straight RGB + alpha channel. The simplest (slightly hackish) way to do this is the following:
- Flatten everything (make sure you have no background layer), Select Pixels (Cmd+LMB on the layer thumb), switch to Channels, create New Channel, fill with black, deselect, invert.
- switch back to the layers palette, duplicate your layer about 50 times until pretty much every pixel that’s not black in the alpha is opaque here. fill the background in any color you like, it won’t matter… (unless this is for a texture that will be mipmapped… in that case choose the color wisely or use something like the (free) Flaming Pear Solidify A Filter in Photoshop to fill the gaps…)
- Save for Web and Devices as PNG – this will save it Straight, will look right in Unity
2 Comments
cool post, I’ve been experimenting with textures from photoshop as well.
One quick comment: in your steps you say “flatten everything”. If you use Photoshop’s Flatten, it will create a background with no transparency. I believe you want the “merge visible” command, which is in the Layers open menu.
true, thanks for the clarification! I just do Cmd+Alt+A to select all layers and Cmd+E to flatten ..ah.. merge them…