You probably know the ones I’m talking about. These small little white-ish lines randomly showing up on my photoshop-made PNG files.
I’ve tried 2 methods both listed on this website to get rid of them, both methods seem to basically make your image opaque while at the same time creating an alpha channel;
However, once I bring those PNG’s into Unity, my alpha channel is ignored and I’m left with an Opaque texture.
I’m working with the free copy of Unity, does it not support alpha channels? Any tips or help you can send my way would be much appreciated!
PNGs always were troublesome for me as they don’t seem to contain a proper alpha channel, instead they store transparency. At least that’s how Photoshop opens them.
I’ve had much better luck bringing PSDs into Unity.
I know of two different types of artefact which could match your description, and the above solutions aren’t referring the the one I suspect you’re having.
If you’re getting lines near the edge of the image, it’s most likely that you’re actually picking up some pixel data from the opposite side of the image due to wrapped downsampling. Make sure that there’s either a transparent border larger than a pixel at your lowest desired mipmap level, or that your texture is set to clamp rather than wrap, or both.
I found that the technique I listed works perfectly for PSD files, however I thought I read somewhere that iOS games only like PNG format. Which is why I’m pushing to get these in the engine as .png’s? If that’s not the case, then I’ll just move forward with PSD extensions.
This happens when you use straight alpha and not pre-multiplied alpha. Has nothing to with the file format.
With straight alpha, when you have one visible pixel next to a transparent pixel (which is usually white) you get a 50% visible whiteish border because of the interpolation between values.
This issue doesn’t exist with pre-multiplied because it multiplies all the pixels in the image by the alpha value (so transparent white just becomes black), and then they are drawn by using additive blending. There are no artifacts this way, and you can have nice smooth falloffs.
I’m not sure how Unity handles pre-multimied alpha because I don’t have it in front of me right now. But if it handles PSDs right, perhaps it will handle a PNG that has been processed to be pre-multiplied properly.
Simple solution: Don’t export to png, follow the steps from your first link and save your psd to the assets directly. I don’t get why people sometimes don’t use this killer feature of the import pipeline.
if anyone is encountering this issue when importing a png from figma then the solution is to uncheck “Alpha as Transparency” in the Texture 2d import settings for the image.
theres an option called “remove psd matte” or something, thats what I use now it removes it fine.
Also if you want pixel perfect images mark it as point filtered: none in the importer.
edit: damn dude this thread is older than most of my mates kids