# How to capture rendered scene with transparent background and save it to PNG?

**URL:** <https://forums.unrealengine.com/t/how-to-capture-rendered-scene-with-transparent-background-and-save-it-to-png/400649>\
**Category:** Rendering\
**Tags:** scenecapture2d, Scene-Capture, png, unreal-engine, transparency, render-target, question\
**Created:** [July 25, 2017, 2:41pm UTC](https://forums.unrealengine.com/t/how-to-capture-rendered-scene-with-transparent-background-and-save-it-to-png/400649 "2017-07-25T14:41:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlekseyIlin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlekseyIlin](https://forums.unrealengine.com/u/AlekseyIlin)\
**Post date:** [July 25, 2017, 2:41pm UTC](https://forums.unrealengine.com/t/how-to-capture-rendered-scene-with-transparent-background-and-save-it-to-png/400649/1 "2017-07-25T14:41:16Z")

</div>

How to capture rendered scene with transparent background and then save it to PNG? By “transparent background” I mean some selected objects are in the foreground, and everything else is invisible and interpreted as transparency.

Something like this (house icons)

[http://i.imgur.com/Ui9VmsA.jpg](http://i.imgur.com/Ui9VmsA.jpg)

So far I can save captured scenes to PNG but with black background.

EDIT: forgot to mention this is supposed to be done entirely in-game (and even from many different angles at once)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8312749a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8312749a](https://forums.unrealengine.com/u/anonymous_user_8312749a)\
**Post date:** [July 25, 2017, 4:26pm UTC](https://forums.unrealengine.com/t/how-to-capture-rendered-scene-with-transparent-background-and-save-it-to-png/400649/2 "2017-07-25T16:26:19Z")

</div>

i assume you’re trying to do this from within UE4, as opposed to using another program. i’ve never tried to do something like that before but you could use a mask and set black to be the mask colour. as long as black is only found in the background this should work.

---

<div class="post-metadata">

**Author:** ![GhislainGir](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ghislaingir/32/478507_2.png) [@GhislainGir](https://forums.unrealengine.com/u/GhislainGir)\
**Post date:** [July 25, 2017, 5:50pm UTC](https://forums.unrealengine.com/t/how-to-capture-rendered-scene-with-transparent-background-and-save-it-to-png/400649/3 "2017-07-25T17:50:06Z")

</div>

hi,

my guess would be to use Hi-Res Screenshot tool along with custom depth mask and tag the objects using the “Render Custom Depth” feature in the details pannel.

This will allow you to only capture certain objects in the scene

> **[Taking Screenshots](https://docs.unrealengine.com/4.27/en-US/WorkingWithMedia/CapturingMedia/TakingScreenshots/)**
>
> Guide to taking in-game screenshots of environments and gameplay.

---

<div class="post-metadata">

**Author:** ![AlekseyIlin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlekseyIlin](https://forums.unrealengine.com/u/AlekseyIlin)\
**Post date:** [July 25, 2017, 5:58pm UTC](https://forums.unrealengine.com/t/how-to-capture-rendered-scene-with-transparent-background-and-save-it-to-png/400649/4 "2017-07-25T17:58:27Z")

</div>

Sorry, I forgot to mention this is supposed to be done entirely in-game (and even from many different angles at once). Is there an easy way to use whatever HighResScreenshot’s using for masking?

---

<div class="post-metadata">

**Author:** ![GhislainGir](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ghislaingir/32/478507_2.png) [@GhislainGir](https://forums.unrealengine.com/u/GhislainGir)\
**Post date:** [July 25, 2017, 7:55pm UTC](https://forums.unrealengine.com/t/how-to-capture-rendered-scene-with-transparent-background-and-save-it-to-png/400649/5 "2017-07-25T19:55:28Z")

</div>

ah… then I guess render targets are your best bet. I think you can set which objects are visible and what not using visibility lists or something like that. best luck

---

<div class="post-metadata">

**Author:** ![Vetos89](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vetos89](https://forums.unrealengine.com/u/Vetos89)\
**Post date:** [January 30, 2025, 3:14pm UTC](https://forums.unrealengine.com/t/how-to-capture-rendered-scene-with-transparent-background-and-save-it-to-png/400649/6 "2025-01-30T15:14:13Z")

</div>

Hello everyone, I’m raising the issue. After capturing a scene in RenderTarget, the alpha channel is filled with inverse values, so that you can use it in a material you need to change the alpha value to 1-alpha. Does anyone know how to invert this value in RenderTarget so that when you create a static texture it will be correct?
