How do I Import Alpha Textures... with GIMP.

Hi Folks,

Can anyone teach me how to do the steps involved in the FAQ "How do I Import Alpha Textures?" ( but with GIMP or directly exporting PNGs from Inkscape?

Thanks everybody! Fred

Forget it!

I just found that, using GIMP, there is no need to create an explicit alpha channel. Simply open the problematic "white around edges" PNG and re-save it unchecking the option "save color values from transparent pixels".

When you import it into Unity and apply it in a material with shader "Transparent/Diffuse" it works perfectly.

I also think that this solution is much simpler and more practical than the solution with Photoshop. Since GIMP is a free multiplatform tool, I recommend it to everyone who has this problem.

Best wishes!

I had some issues getting this to work, but I eventually found a solution. Hopefully, this will clear up a bit of confusion for others with creating alpha map textures with GIMP for Unity.

To do this in GIMP, you need to

  1. make three copies of your image layer.
  2. Then, on the middle layer, right click on the layer and remove the alpha channel, then add it back in, making sure your background color (in the color picker) is white.
  3. On this layer, use the “Generic → Erode” filter on it numerous times, 10-20 times should do it. If any areas of your image are still white, paint them with a neutral tone from your image.
  4. Hide the bottom layer, which should still be the same as the original image with alpha and everything.
  5. Merge visible layers
  6. Right click the hidden layer and select “alpha to selection”
  7. Return to the layer you eroded, invert selection, then delete
  8. Delete the bottom layer so there is only one layer (this is very important because otherwise GIMP won’t save the transparent pixels properly)
  9. Save you PNG file with “save colors from transparent pixels” checked and “save background color” unchecked

This will create perfectly seamless PNG textures with GIMP, with no graphical artifacts even when mipmaps are drawn (which is how Unity optimizes distance drawing of textures).

Hopefully this will make your grass, plants, icons, etc look great and most of all professional in Unity!