Setting SceneCapture2D Background Color for Chroma Key

I’m trying to capture a 3D object using a SceneCaptureComponent2D and rendering it as part of the HUD. But, I would like to capture just the object, and not the background. I understand that the scene capture component doesn’t write an alpha channel, so my idea is to use the background color and extract that out (like a chroma key). But, black is not a good color to use as a chroma key. Is there any way to change the background color on the scene capture? I’ve played around with all of the properties of the object and haven’t found a way. Here’s an example of what my capture would look like:

Could you use atmospheric Fog and change the color to green. Just Moe it full density?

HI!

I think this tutorial about how to render 3D objects in UMG Widget/HUD, should help you.

For those who find it after UE 4.13, there’s an option in the SceneCapture2D to capture with alpha channel: HDR Color in RGB, Inv Opacity in A.

As the name implies, it captures inverted alpha. So, in your shader use the Alpha channel of the texture connected to a OneMinus node to invert it.

Also, for chroma keying, there’s also a functin node for it now: Chroma_Key_Alpha.

Not so good idea, because SceneColor ignore all post process effects.
We must use FinalColor, but in final color no alpha available. :frowning: