# Importing any PNG with alpha channel messes up the image

**URL:** <https://forums.unrealengine.com/t/importing-any-png-with-alpha-channel-messes-up-the-image/8221>\
**Category:** Rendering\
**Tags:** unreal-engine\
**Created:** [July 25, 2014, 9:12am UTC](https://forums.unrealengine.com/t/importing-any-png-with-alpha-channel-messes-up-the-image/8221 "2014-07-25T09:12:28Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blue669](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Blue669](https://forums.unrealengine.com/u/Blue669)\
**Post date:** [July 25, 2014, 9:12am UTC](https://forums.unrealengine.com/t/importing-any-png-with-alpha-channel-messes-up-the-image/8221/1 "2014-07-25T09:12:28Z")

</div>

Whenever I try and import a PNG with alpha channel, it messes up the alpha parts of the image and the whole texture is unusable in the editor (stretches all over the place and distorts).  
I’ve already tried different versions of PNG compression etc. and different files alltogether, it’s all the same problem. Even PNG files I downloaded from a UE4 tutorial (image below) don’t import properly.  
I’m using UE4.3

---

<div class="post-metadata">

**Author:** ![zeOrb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@zeOrb](https://forums.unrealengine.com/u/zeOrb)\
**Post date:** [July 25, 2014, 9:29am UTC](https://forums.unrealengine.com/t/importing-any-png-with-alpha-channel-messes-up-the-image/8221/2 "2014-07-25T09:29:39Z")

</div>

> **[PNG with Alpha: How do you get them to work?](https://forums.unrealengine.com/showthread.php?15102-PNG-with-Alpha-How-do-you-get-them-to-work)**
>
> This is a totally basic question that has me banging my head against the wall. I am not a noob when it comes to image channels and all…which is probably the source of the issue. I have a bunch of wonderfully small png files that I want to use as...

TL DR:  
Don’t use png. Use .TGA with alpha channel or .PSD

---

<div class="post-metadata">

**Author:** ![Blue669](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Blue669](https://forums.unrealengine.com/u/Blue669)\
**Post date:** [July 25, 2014, 9:50am UTC](https://forums.unrealengine.com/t/importing-any-png-with-alpha-channel-messes-up-the-image/8221/3 "2014-07-25T09:50:32Z")

</div>

When I import as psd = same problem  
When I import as TGA = equally horrible problem  
Save file with SuperPNG = same problem  
Use layer mask as alpha = same problem

\*Edit  
Okay now it works. The material editor doesn’t show the transparency, but in game it shows up.  
I think it has to do with creating a seperate alpha layer and then importing as psd file, but I have to get into this a bit more.

Thanks for the help!

---

<div class="post-metadata">

**Author:** ![zeOrb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@zeOrb](https://forums.unrealengine.com/u/zeOrb)\
**Post date:** [July 25, 2014, 10:03am UTC](https://forums.unrealengine.com/t/importing-any-png-with-alpha-channel-messes-up-the-image/8221/4 "2014-07-25T10:03:01Z")

</div>

> [@Blue669;104161](#):
>
> When I import as psd = same problem  
> When I import as TGA = equally horrible problem  
> Save file with SuperPNG = same problem  
> Use layer mask as alpha = same problem

What compression settings do you use?  
TC\_Grayscale use only one channel, not four.

---

<div class="post-metadata">

**Author:** ![Blue669](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Blue669](https://forums.unrealengine.com/u/Blue669)\
**Post date:** [July 25, 2014, 10:11am UTC](https://forums.unrealengine.com/t/importing-any-png-with-alpha-channel-messes-up-the-image/8221/5 "2014-07-25T10:11:08Z")

</div>

It works now.  
If anyone else has the same problem, here is the solution:  
Go to Photoshop \> Layer \> Layer Mask \> From Transparency  
Go to UE4, import the psd file and it works.  
_edit_well now I have another problem

---

<div class="post-metadata">

**Author:** ![Blue669](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Blue669](https://forums.unrealengine.com/u/Blue669)\
**Post date:** [July 25, 2014, 10:42am UTC](https://forums.unrealengine.com/t/importing-any-png-with-alpha-channel-messes-up-the-image/8221/6 "2014-07-25T10:42:06Z")

</div>

Well, turns out I have the next problem.  
When I import a psd that uses this method, the alpha still gets messed up in the engine.  
Now it looks like the engine only understands the alpha channel if fully opaque or fully translucent and everything in between is drawn as white.

---

<div class="post-metadata">

**Author:** ![RhythmScript](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RhythmScript](https://forums.unrealengine.com/u/RhythmScript)\
**Post date:** [July 26, 2014, 1:01am UTC](https://forums.unrealengine.com/t/importing-any-png-with-alpha-channel-messes-up-the-image/8221/7 "2014-07-26T01:01:47Z")

</div>

Are you actually USING the alpha channel? By default it isn’t used. In your material editor you need to connect it (the bottom pin of your 4Vector) to the opacity mask, translucency, etc.

If connected to opacity mask, it has a cutoff point (opaque above, invisible below) you can set. Other modes work differently but you must set the material up to be translucent/etc.

---

<div class="post-metadata">

**Author:** ![Blue669](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Blue669](https://forums.unrealengine.com/u/Blue669)\
**Post date:** [July 26, 2014, 11:24am UTC](https://forums.unrealengine.com/t/importing-any-png-with-alpha-channel-messes-up-the-image/8221/8 "2014-07-26T11:24:43Z")

</div>

Yes, the alpha channel is connected to the opacy.  
The texture editor even shows the same white border where there is no white in the entire image. Only black and translucent background.

Uploaded an image to show exactly what I mean.  
Photoshop file = no white pixel color information  
After importing to UE4 = white border where transparency should be

---

<div class="post-metadata">

**Author:** ![zeOrb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@zeOrb](https://forums.unrealengine.com/u/zeOrb)\
**Post date:** [July 26, 2014, 3:17pm UTC](https://forums.unrealengine.com/t/importing-any-png-with-alpha-channel-messes-up-the-image/8221/9 "2014-07-26T15:17:13Z")

</div>

Your problem is very weird, could you share source image you use and your shader screenshot?

---

<div class="post-metadata">

**Author:** ![Blue669](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Blue669](https://forums.unrealengine.com/u/Blue669)\
**Post date:** [July 26, 2014, 4:48pm UTC](https://forums.unrealengine.com/t/importing-any-png-with-alpha-channel-messes-up-the-image/8221/10 "2014-07-26T16:48:06Z")

</div>

Really I didn’t do anything out of the ordinary. I’ve worked with Photoshop over ten years+ and never had any issue like this before.  
Here’s what you do to recreate the problem.  
Open Photoshop (I use CS6)  
Draw a circle with transparent edges  
Background transparent (doesn’t make a difference if you use layered mask for alpha channel)  
Save image, import the psd in UE4  
Look at the texture import window, enable alpha channel and you see a white border around the circle.

---

<div class="post-metadata">

**Author:** ![zeOrb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@zeOrb](https://forums.unrealengine.com/u/zeOrb)\
**Post date:** [July 26, 2014, 9:11pm UTC](https://forums.unrealengine.com/t/importing-any-png-with-alpha-channel-messes-up-the-image/8221/11 "2014-07-26T21:11:04Z")

</div>

> [@Blue669;105062](#):
>
> Really I didn’t do anything out of the ordinary. I’ve worked with Photoshop over ten years+ and never had any issue like this before.  
> Here’s what you do to recreate the problem.  
> Open Photoshop (I use CS6)  
> Draw a circle with transparent edges  
> Background transparent (doesn’t make a difference if you use layered mask for alpha channel)  
> Save image, import the psd in UE4  
> Look at the texture import window, enable alpha channel and you see a white border around the circle.

I’ve made fast basic video, maybe you will spot something!

[![]( " - YouTube") ](https://www.youtube.com/watch?v=vXBHgAKpl54)

---

<div class="post-metadata">

**Author:** ![Blue669](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Blue669](https://forums.unrealengine.com/u/Blue669)\
**Post date:** [July 26, 2014, 11:13pm UTC](https://forums.unrealengine.com/t/importing-any-png-with-alpha-channel-messes-up-the-image/8221/12 "2014-07-26T23:13:32Z")

</div>

Thank you so very much!  
I didn’t understand that you have to EITHER have transparency in the image OR have the alpha channel.  
Bless you my friend 😃

---

<div class="post-metadata">

**Author:** ![totallysane](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@totallysane](https://forums.unrealengine.com/u/totallysane)\
**Post date:** [January 29, 2018, 8:33am UTC](https://forums.unrealengine.com/t/importing-any-png-with-alpha-channel-messes-up-the-image/8221/13 "2018-01-29T08:33:13Z")

</div>

> [@zeOrb](#):
>
> I’ve made fast basic video, maybe you will spot something!  
> [https://youtube.com/watch?v=vXBHgAKpl54](https://youtube.com/watch?v=vXBHgAKpl54)

Holy crap that helped me so much. Solved a nasty black lines problem i was having thank you thank you.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_76ec2960](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_76ec2960](https://forums.unrealengine.com/u/anonymous_user_76ec2960)\
**Post date:** [December 20, 2018, 6:05pm UTC](https://forums.unrealengine.com/t/importing-any-png-with-alpha-channel-messes-up-the-image/8221/14 "2018-12-20T18:05:17Z")

</div>

Please help me I need Grass\_N PNG file but I don’t know how to get it
