Cannot change a Render Target's Chroma Key color

I’m trying to use the new chroma key feature in 4.8 on a render target whose source is a scene capture 2d component. No matter what values I change for the color and threshold, it always makes everything transparent except for bright blue.

Hey ChrisO,

So what are you attempting to do?

Do you want to have the capture displayed on another mesh?

If so then I would follow this youtube tutorial.

No sound but it goes through all of the steps to create a Capture 2D component and then display it on another object.

Thanks,

There is a new feature in 4.8 that adds an option to perform a chroma key operation on a render target. I’m simply trying to use this feature and not having success with changing the color or the threshold.

I was unable to locate an documentation on this feature besides the announcement in the 4.8 release notes. The video you linked was from a previous version of Unreal and therefore did not contain this feature.

Hey Chris,

I did a little digging and set up a test project of my own. What I have concluded is the Scene Capture 2D is overriding anything within the Render Target.

This makes since because you are trying to capture and image and then display it somewhere else. The work around for this is to add an emissive mask over the image being projected inside of your material.

This is a screen shot of the material and texture set up.

If you set the P parameter that plugs into the Vector Length node to 10 it overrides the Scene2D completely.

Thanks,

Is it possible to turn this processed material back into a render target?

I don’t believe so.

I think once it’s made it’s made. You could simply create another render target but I don’t think that’s the work around you guys are looking for.

Thanks,

If I made a new render target, could I pipe my material into it?

Also, the image you linked to only changes the color of the chroma key; it doesn’t make it transparent. And, since I’m using a post-process material as a blendable on the scene capture 2d, I don’t have the option to set the opacity on that material.

Hey ChrisO,

Yes, it is entirely possible using Custom Depth.

Here are the recreation steps.

1.) Set up a scene for 2D capture. Exactly the same way don’t worry about these settings.
2.) Create a new Material
3.) Set this to Post Process
4.) I will link a screenshot for this material.
5.) Create another material and call it " insert text here"
6.) Set it to Unlit and then plug your TextureRenderTarget2D sample into the Emissive Color
7.) Create a cube in your level or whatever you want to apply the TextureRenderTarget2D material to.
8.) Add the material that you added your TextureRenderTarget2D Texture to, to that static Mesh you just created.
9.) Add a post process node to your scene. Set it to Unbound
10.) In your Camera Actor created by your scene capture go to post process > Blendables and add the material that DOES NOT have your TextureRenderTarget2D texture.
11.) Add a couple of objects to the scene.
12.) Apply the Material WITHOUT the TextureRenderTarget2DTexture and apply it to an object.

In a nutshell, there are two different separate passes in the engine. The main pass that calculates everything and a custom pass that we added. This essentially removed from the main viewport but would be visible inside of where you have applied your 2D Scene Capture Material.

Now, if you are attempting something for say a movie, and you are attempting to replace the texture with say the capture you will need to do this in After Affects/Premier or some other movie editing software. All of this is done with Post Process. It is the last component to be calculated when returning a value.

As I do not know your end goal and where you are headed with your project I am not sure if there is an easier way to go about this. You have started to add steps and specifications.

If you require any further assistance then please go through where you are headed with this project.

Thanks,