# Wrong alpha channel when exporting render target as PNG.

**URL:** <https://forums.unrealengine.com/t/wrong-alpha-channel-when-exporting-render-target-as-png/448627>\
**Category:** Rendering\
**Tags:** Render, image-plate, unreal-engine, question, Blueprint\
**Created:** [May 8, 2019, 2:55pm UTC](https://forums.unrealengine.com/t/wrong-alpha-channel-when-exporting-render-target-as-png/448627 "2019-05-08T14:55:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pandapus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pandapus](https://forums.unrealengine.com/u/Pandapus)\
**Post date:** [May 8, 2019, 2:55pm UTC](https://forums.unrealengine.com/t/wrong-alpha-channel-when-exporting-render-target-as-png/448627/1 "2019-05-08T14:55:00Z")

</div>

Hi everyone!

I’m having a problem in my VR game which will use a camera that exports photos as PNG, but the resulting images looks washed out. When trying to open it in an image editor, it seems that only half of the image is rendered, as there’s transparancy everywhere. This is what it looks like ingame before exporting (correct):

 ![276310-camera.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/7/9/a798b591908426f47b414a4fca0a34f8f2e0f2bc.jpeg)

This is what happens when previewing the render target:

 ![276341-rendertarget.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/4/b/a4b515f7aa9dc6810ecd5b0d171a4ede83fd414e.jpeg)

Does anyone of you know what’s going on, or know a fix that might help?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Dogu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dogu](https://forums.unrealengine.com/u/Dogu)\
**Post date:** [June 10, 2019, 5:32pm UTC](https://forums.unrealengine.com/t/wrong-alpha-channel-when-exporting-render-target-as-png/448627/2 "2019-06-10T17:32:53Z")

</div>

I am also having this problem. It definitely has something to do with VR. For now I’m using Rama’s Victory Plugin. Using Capture Component save 2D image. You have to go in and comment out one line of code to get it to work FYI.

Its not as functional as saving from a render target though, and I really wish they would fix this.

---

<div class="post-metadata">

**Author:** ![cavesrd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@cavesrd](https://forums.unrealengine.com/u/cavesrd)\
**Post date:** [August 7, 2019, 4:24pm UTC](https://forums.unrealengine.com/t/wrong-alpha-channel-when-exporting-render-target-as-png/448627/3 "2019-08-07T16:24:37Z")

</div>

Hey, as there’s still no other workaround for exporting render targets i’m also trying to use this method with rama’s plugin. I don’t have much experience with code but can you explain how to comment out this line so I can get the bp node working? thanks

---

<div class="post-metadata">

**Author:** ![Dogu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dogu](https://forums.unrealengine.com/u/Dogu)\
**Post date:** [August 7, 2019, 8:43pm UTC](https://forums.unrealengine.com/t/wrong-alpha-channel-when-exporting-render-target-as-png/448627/4 "2019-08-07T20:43:23Z")

</div>

I’m traveling and away from my PC for a few weeks otherwise I’d do a step by step for you. I also just spent an hour googling and could not find the solution again. Sorry But maybe I can put you on the right track. I’m assuming you can at least download and instal Rama’s plugin and generate the Visual Studio code.  
Download here: [https://github.com/EverNewJoy/VictoryPlugin](https://github.com/EverNewJoy/VictoryPlugin)  
You need to open up the source code in Visual Studio. You can also do this by adding the capture save image node in a Blueprint, and double clicking it, and it should open up Visual Studio directly to the relevant code. Otherwise, there is a search function, use it to look for capturecomponent2D (or something like that). There is a one line of code that is a test to see if its the right format, comment that out.  
You will have to rebuild the code. Then open project again.  
note: in Unreal, in the render target you use, the only supported format for this function is B8G8R8A8

Let me know if you still have problems and I’ll fill you in when I get back. Cheers and sorry I can’t fix this for you right away.

---

<div class="post-metadata">

**Author:** ![Dogu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dogu](https://forums.unrealengine.com/u/Dogu)\
**Post date:** [October 10, 2019, 12:31am UTC](https://forums.unrealengine.com/t/wrong-alpha-channel-when-exporting-render-target-as-png/448627/5 "2019-10-10T00:31:55Z")

</div>

sorry for the late reply but I just back to my PC  
use the capture component 2d save image node from Rama’s plugin  
double click it to open up visual studio  
comment out the lines as I did in the image.  
Let me know if you need any more help

![289691-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/b/f/6bf93754d3e57b8bedce1875097003f1f890effe.png)
