I’m attempting to make something like a multiplayer selfie system with a listen server model. Players have a scene capture component on their character, and they can see the render target material when opening a phone like widget (I.e. they see the phone’s camera looking back at them). What I’m running into is that the render target material always shows the view from only one of the two scene capture components to both players. If I run PIE in, the client always sees the server’s camera. If I host a session from a menu, and have the client join it, the material will always be from the view of the client’s scene capture component.
Hi there,
So when you make a SceneCapture create a render target and assign eventually in multiplayer everybody will see the same render target , in order to bypass that you can create render targets in runtime. Since without that whoever sees shared render target , they will overwrite and you will always end up seeing the last writer.
// Create A New Render Target Top
UTextureRenderTarget2D* LARenderTargetTop = UKismetRenderingLibrary::CreateRenderTarget2D(this, 16, 16, RTF_RGBA8);
sceneCaptureComponentTop->TextureTarget = LARenderTargetTop;
Also would like to mention that this is not a networking problem. RenderTarget shouldn’t be replicated at all. If this is a selfie system you don’t need that. The above runtime unshared render targets would be enough to achieve what you want since all clients will have their own unshared runtime render targets.
If you want to send selfies to other players or realtime view another player’s POV (BodyCam, SecurityCam etc) BF6 style than it is a networking problem.
That time
RemoteClient->RenderTarget->ReadPixels->Compress(LowRes, JPG)->RPC(byte arrays)->Client
that is something quite costly anyway, in BF6 its quite tiny, low res facelifted by post process body cam and noise glitch effects.
Let us know.
PS: Also if you are making manual capture it’s good practice not to run capture on server for no reason additional cost, however if you have server owned camera can be.



