# Scene Capture 2D transparent background

**URL:** <https://forums.unrealengine.com/t/scene-capture-2d-transparent-background/451085>\
**Category:** Rendering\
**Tags:** Scene-Capture, unreal-engine, transparency, question, UMG\
**Created:** [June 21, 2019, 8:22pm UTC](https://forums.unrealengine.com/t/scene-capture-2d-transparent-background/451085 "2019-06-21T20:22:12Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![mistercokes](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mistercokes](https://forums.unrealengine.com/u/mistercokes)\
**Post date:** [June 21, 2019, 8:22pm UTC](https://forums.unrealengine.com/t/scene-capture-2d-transparent-background/451085/1 "2019-06-21T20:22:12Z")

</div>

Hi all,

I am trying to have a mesh displayed inside of my UMG widget, rendered as it currently looks like in the game.  
So far, I was able to set up Scene Capturing for a character:

![280435-full-render.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/b/0/db0bfb2646a0ddc2d20d4ff3b958dc34cedef2d7.png)

The next step would be to only enable the charactor actor to be captured, with transparent or self-defined background like the house mesh in the following image (image stolen from [this question][2]):

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/2/2/02295ecbfe48f130ef3f00183f1eca679d098a7d.jpeg) ](https://i.imgur.com/Ui9VmsA.jpg)

Using “Show Only Actor Components” for the Scene, nothing should be rendered except for my actor. However, some kind of standard background seems to be set. It seems to me as if the landscape and sky box are somehow rendered even though in a very blurry, untextured way. Is there any way to render this to fully transparent?

Since the character is moving, I don’t think masking / chroma keying in the material can do the trick in the current state.

![280436-tmp-untransparent.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/5/d/a5d0231e519ea823e881d002742498f8f0f6e4ba.png)

---

<div class="post-metadata">

**Author:** ![AreWeGaming](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arewegaming/32/1174860_2.png) [@AreWeGaming](https://forums.unrealengine.com/u/AreWeGaming)\
**Post date:** [June 21, 2019, 9:54pm UTC](https://forums.unrealengine.com/t/scene-capture-2d-transparent-background/451085/2 "2019-06-21T21:54:18Z")

</div>

This might Help

> **[Scene Capture: 'Show Only Actor Components' - how to remove?](https://forums.unrealengine.com/questions/482698/scene-capture-show-only-actor-components-how-to-re.html)**
>
> In 4.13 we can define which actors it should render with ‘'Show Only Actor Components’ node. But how to remove any assigned actors from this? I’ve tried getting ‘ShowOnlyActors’ array from my scene capture, but its length is always 0, even if I add...

---

<div class="post-metadata">

**Author:** ![mistercokes](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mistercokes](https://forums.unrealengine.com/u/mistercokes)\
**Post date:** [June 22, 2019, 8:36am UTC](https://forums.unrealengine.com/t/scene-capture-2d-transparent-background/451085/3 "2019-06-22T08:36:28Z")

</div>

The same issue still appears when adding it directly to the array. I also tried to assign the component directly and clear everything I found clearable but was not able to fix it (The last boolean was set for testing, no difference in having it active or inactive):

 ![280476-settingscode.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/2/c/82ce7103213f428af722b47f217fe0d9bafeb6d9.png)

---

<div class="post-metadata">

**Author:** ![MrWish](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MrWish](https://forums.unrealengine.com/u/MrWish)\
**Post date:** [November 3, 2020, 2:32am UTC](https://forums.unrealengine.com/t/scene-capture-2d-transparent-background/451085/4 "2020-11-03T02:32:20Z")

</div>

![320943-unknown.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/1/f/a1fd35769151e190e2e8cb01797edb689bbba3a0.png)

I came upon this issue in my own project, and this was my solution.

First, the “standard background” here can be hidden by disabling the “Atmosphere” [ShowFlag][2] on your scene capture component. This can be found in the details pane for your scene capture component, hidden under “General Show Flags” in the Advanced section, or in C++ using `SceneCaptureComponent->ShowFlags.Atmosphere = 0;`

![320945-unknown.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/e/6/1e61d3d897e8b2e17df9a83436a8da160d64cbf4.png)

However, this leaves you with a simple black background instead of the atmosphere, which is more reasonable but still not where we want to be. To solve this I created a new material that looks like this,

 ![320951-unknown.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/8/7/c876a9f944423870d470b824751ca50625c26fd5.png)

Note that the leftmost “Texture” node has been converted to a parameter. Finally, in my drawing code, I am creating a dynamic instance of my material, passing the capture component’s texture target to the Texture parameter that I defined, and at last calling DrawMaterial:

```
UMaterialInstanceDynamic* matInst = UMaterialInstanceDynamic::Create(MyCustomMaterial, this);
matInst->SetTextureParameterValue("Texture", SceneCaptureComponent->TextureTarget);
DrawMaterial(matInst, 20, 20, 256, 256, 0, 0, 1, 1);

```

And presto:

![320944-unknown2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/f/8/cf8e805a5d6eced70daee878111fe19c6ab64047.png)

Still needs some cleanup but we’ve done what we wanted!

---

<div class="post-metadata">

**Author:** ![mistercokes](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mistercokes](https://forums.unrealengine.com/u/mistercokes)\
**Post date:** [November 3, 2020, 9:49pm UTC](https://forums.unrealengine.com/t/scene-capture-2d-transparent-background/451085/5 "2020-11-03T21:49:32Z")

</div>

You, sir, are a genious. Thanks a lot!

---

<div class="post-metadata">

**Author:** ![k23jm](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@k23jm](https://forums.unrealengine.com/u/k23jm)\
**Post date:** [November 20, 2020, 8:15pm UTC](https://forums.unrealengine.com/t/scene-capture-2d-transparent-background/451085/6 "2020-11-20T20:15:36Z")

</div>

I’m struggling to achieve this, searshing everywhere for help, but still nothing, please help me, I’ll show my set-up trying to do this if one of you have some time, please help :"(

Is the render target on first image correct? The area at bottom left are sort of “reflecting” is ta ok? that area is really transparent?

In game the “transparent” area are shown “blank” above the rest of the map.

 ![322613-captura-de-tela-361.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/1/9/519633a8eb991fc1b2486ddb55753130406b02cc.png)

---

<div class="post-metadata">

**Author:** ![mistercokes](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mistercokes](https://forums.unrealengine.com/u/mistercokes)\
**Post date:** [November 22, 2020, 4:37pm UTC](https://forums.unrealengine.com/t/scene-capture-2d-transparent-background/451085/7 "2020-11-22T16:37:31Z")

</div>

Not sure what you are trying to achieve. From what I can see, your material is not parametrized. If you want to capture the scene rendering in runtime, you need some kind of input parameter for your material, as the answerer showed. I attached the blueprints from my project below for reference (material graph and setting up my UI image with the scene render).

 ![322760-material-scene-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/2/a/32a618eec3a2a3dc929d3e2a83b0ce2b1f1e1f52.png)

 ![322771-scene-capture-setup.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/9/1/6919171e690af8288963d2216a3a3b5af5655624.png)

---

<div class="post-metadata">

**Author:** ![k23jm](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@k23jm](https://forums.unrealengine.com/u/k23jm)\
**Post date:** [November 22, 2020, 5:01pm UTC](https://forums.unrealengine.com/t/scene-capture-2d-transparent-background/451085/8 "2020-11-22T17:01:07Z")

</div>

I will follow your steps and reply as soon as I get home, thak you for the help!!

---

<div class="post-metadata">

**Author:** ![k23jm](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@k23jm](https://forums.unrealengine.com/u/k23jm)\
**Post date:** [November 22, 2020, 9:11pm UTC](https://forums.unrealengine.com/t/scene-capture-2d-transparent-background/451085/9 "2020-11-22T21:11:12Z")

</div>

Man you saved my life, I wasn’t using parameters cause I have 1 material and 1 target render created manually for every scene capture on my level (about 6), not only the transparent background worked but you save me from a lot of working, and everything works fine by now. I’m using that system to make a Portal like game, thank you!!

---

<div class="post-metadata">

**Author:** ![mobil\_disko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mobil\_disko](https://forums.unrealengine.com/u/mobil_disko)\
**Post date:** [March 11, 2021, 9:30am UTC](https://forums.unrealengine.com/t/scene-capture-2d-transparent-background/451085/10 "2021-03-11T09:30:51Z")

</div>

Can you show me with a video, I do not understand

---

<div class="post-metadata">

**Author:** ![lulalalulalalula](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lulalalulalalula](https://forums.unrealengine.com/u/lulalalulalalula)\
**Post date:** [September 30, 2023, 11:38pm UTC](https://forums.unrealengine.com/t/scene-capture-2d-transparent-background/451085/12 "2023-09-30T23:38:57Z")

</div>

Thanks you so much, it just worked! But I don’t quite understand, can you explain it in detail?

---

<div class="post-metadata">

**Author:** ![HashemShepard](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hashemshepard/32/1201564_2.png) [@HashemShepard](https://forums.unrealengine.com/u/HashemShepard)\
**Post date:** [June 7, 2026, 7:46pm UTC](https://forums.unrealengine.com/t/scene-capture-2d-transparent-background/451085/13 "2026-06-07T19:46:32Z")

</div>

here is also how to render transparent png / video in umg [https://www.fab.com/listings/7cbb0f73-718e-4697-bfaf-3b41e3e24bc1](https://www.fab.com/listings/7cbb0f73-718e-4697-bfaf-3b41e3e24bc1)
