PIE - RenderToTarget is the same for all the players

Hi,

If you are using a RenderToTarget to create dynamic texture, it will be shared accross the different players in PIE.

  1. Create a scene
  2. Setup a Camera that will Render to a Texture Asset
  3. Create a button on your hud that will spawn an actor with a mesh in the scene
  4. Setup an image in your Hud to display the RenderToTexture
  5. Launch a 2 player PIE in dedicated server mode, click the button on player 1 and you will that player 2 HUD will display also the Actor

UseCase: Let’s think of a mutliplayer HUD where you are selecting your Character. You want to see your selected “Mesh” on screen.

Thanks,

Hello Elvince,

I made a project that takes a capture from an object and then passes that to UMG. I then added a function to spawn the actor when pressing the " H " key. I was able to independently toggle the Image on and off during play. This did not affect the screen of the second player.

My test was in 4.10. If you update your project from 4.9 to 4.10 does this fix the issue.

Thanks for the feedback. When you said “toggle the Image on and off”, you mean the widget?
As of today, when you press “H” you should only see the object on the player where you press “H” and not the other. If this what you have, then something have been improved in 4.10 to manage this and I will test.

thanks,

Correct, toggled the widget on and off. I only see the object on the player where I press " H. " Let me know if this is fixed for you in 4.10.

ok this is not my issue.

What you are testing is “hiding” the widget on one client do not hide it on another.

What I’m trying to raise as an issue is that the image is the same on both client but it shouldn’t.
In fact, when you should spawn locally, only the player that spawn the actor should see it on the image and not the other player.

Could you reproduce this?

Ok, so you are saying that only one player should be seeing the UMG while the other is not. Do you have a test project or reproduction steps so that I may test this on my end?

The repro Steps are on my first post.

UMG is just showing a Texture that is the output of the render target.
So if you spawn an object in front of the RenderToTexture camera, you will see it on the UMG Image this is the normal behavior.

But in case of a multiplayer scenario in PIE, you should only see what the RenderToTarget can see in the “local scene” of the client. But this is not the case, you are seing the same environment.
Just because the asset texture is shared for the 2 players and not instanced by player.

So if you press you button and spawn a sphere and you see it on both client this is the issue that need some fix.

Thanks for your time

This is definitely a bug. The interesting thing is that I can turn visibility off for the widget itself and I can still see it in PIE.

I have entered a bug for this issue. The ticket number is UE-24971.

I do not have en ETA for when this issue will be looked into or when it will be fixed. Thank you for reporting this issue to us.

Any update on this?

Have this been tackled by 4.11?

Thanks,

Hi Elvince -

This issue came back as invalid We are unsure about how you have your texture targets setup; specifically are you creating a New Target Texture for each player. If you are not then this is expected behavior as multiple players in PIE are by default in the same process.

Let me know your specific setup and I can retest and hopefully find a solution or update our bugs.

Thank You

Eric Ketchum

Hi,

Yes the Texture Target is “shared” between the 2 player in PIE so I understand your feedback on the “Same Process”.

But this is also occuring in standalone. If you launch 2 session with “-game” flag, I have the same issue.
I suspect that the Texture asset that the render texture is updating is shared between the 2 sessions as in PIE.
So it’s not a question of process, but more of “asset file” that are common accross session (same content folder)

thanks,

Yes exactly, you will need to pre-create Render Target Textures for each Player in your game then run a check which sets the correct Texture based on the Player Controller being used.

Im having issues with this now… still not fixed?

Please read the above comments. This bug was entered as invalid as the handling of replication across the multiplayer was never provided. Multiple players in PIE are by default in the same process.