Is there a way to exclude items to be rendered on a TextureRenderTarget2d?

I want to render only one or two selected meshes on a TextureRenderTarget2d.
Those items are part of a larger scene.

Is there a way to exclude items to be rendered? Perhaps with layers or tags or whatever?

I would also be interested in something like this.

We exposed this feature to C++ and Blueprints and submitted the changes to UE4’s repository. The feature has been pulled by Epic and should be available for everyone to use in 4.3 :slight_smile: .

This said there’s one missing feature that you’ll need to implement yourself; whitelisting. At this moment you can only blacklist meshes. The difference is that if you need to continuously blacklist all items from your scene it’s going to eat performance (especially on large scenes).

On the forum Someone from Epic told me there was a feature used to freeze the rendered selection to debug the culling. With that in mind you blacklist everything except your desired mesh an then you freeze the culling selection effectively only rendering in an optimized way only one object at all times on your render texture.

Take care

Yeah I saw the code on GitHub, but I was interested in drawing only some specific meshes. Thank for the additional information, I will see what I can do on my own side then ! :slight_smile:

I’ve edited the text while you where answering with some additional info.

Thanks for the notification. Could I ask for the link to the forum post if you have it ?

Here you go: Hiding certain objects from being drawn on a camera or SceneCapture2D object - Cinematics & Media - Unreal Engine Forums

Don’t hesitate to commit your changes if you add a real whitelist feature :wink:

I will try ! Thanks ! :wink: