Scene Capture 2d owner only see not working

Hey, I’m on UE 4.26 and found a way to do this, but it does require using C++.

You need to create a new C++ component which extends USceneCaptureComponent2D, and then override the ‘GetViewOwner’ method. This will allow you to use ‘Only Owner See’ and make sure that component you created returns the same owner as the primitives you wish to render.

eg : In UMyCustomSceneCaptureComponent2D.h :

virtual const AActor* GetViewOwner() const override { return GetOwner(); }

And then make sure that the owner for your primitives is the same as the scene, for my use case I was setting up a photobooth to render characters to textures to use in the UI. I have a single actor with which has all the primitive components alongside the scene capture, so setting the owner to itself was enough to have it all render properly. I did find a bug however with long-distance shadows being rendered in the main game from these primitives. For my use case I was able to disable Affect Dynamic Indirect Lighting / Distance Field Lighting and it works just fine.

You can reference the unreal implementation in SceneCaptureComponent.h, its comment is :

/** To leverage a component's bOwnerNoSee/bOnlyOwnerSee properties, the capture view requires an "owner". Override this to set a "ViewActor" for the scene. */
virtual const AActor* GetViewOwner() const { return nullptr; }
2 Likes