Jagged edges on scene depth mask used to render 3D in UMG

Hi all,

I am trying to render 3D objects in my HUD. I have an UMG that gets drawn to the HUD. This UMG includes two images, one for a gray background and another for the material that has my object’s RGB and the mask.

The 3D object is in my scene with a camera and two SceneCaptureComponent2Ds pointing at it. One for color one for masking.

I placed a scenecapture2D and made a post process material for it following some tutorials.
Here is the material

This gives me the mask I use for the opacity channel.
For the color channel, I used a 2nd capture, not set to depth but set to RGB.

Here is where I use one for the opacity and one for the color:

Here is my problem, note the edges:

All my RenderTextureTargets are 1024 and are drawn as 1024 images in my UMG. I also tried 2k and other options to no avail.

All help appreciated,
Thanks in advance.

Make background of the object - black.

It is the clouds color what is leaking through border of the mask.

Thank you! I deleted everything that gave any kind of color to my sky, now that it has a black background, nothing is leaking in.


hello, serulas.I have the same need as you. can you tell me what tutorial you are watching, thanks.