Replicate Textures from Host to Client

In many multiplayer games, such as CounterStrike, Overwatch, Team Fortress 2, etc, players have the ability to display a spray image that all players can see. This is basic replication. I am trying to achieve a similar effect for a multiplayer game, but I am running into a problem. For what I am trying to accomplish, the texture is not packaged and could be anything, as the texture data is generated from a Scene Capture Component and saved to a Texture Render Target 2D (TRT2D). This TRT2D is then used in a dynamic material instance. I am using UE4.13.1.

The issue occurs when a Host generates a spray and then a player - who was not in the session - joins the Host. If the Client is joining after the “spray” has been created, the TRT2D is blank for the spray. If the Client was already in the level, there is no issue of accomplishing this because the Host can send the Client the exact location of the spray and the Client can generate the same texture that the host is using in that location by saving whatever the Scene Capture Component is looking at into his own version of his spray.

I can accomplish sending Text from the Host to a new Client when he joins the session (Host sends a string to the server through a blueprint custom event that then sends the string to all Clients (also a BP custom event)), but when I try to send the TRT2D using the exact same method, the TRT2D is always Valid for the Host but is Invalid for the Client. I found a LogNetPackageMap:Warning that said that sending a TRT2D is not supported, so I made a temporary engine mod to ignore this and I was still unable to complete this task. I made an function that would continually check for the validity of the texture, but it would never become valid, thus it is my belief that the texture was never sent over properly to the Client.

Because of this, I decided to pursue a Web server idea which was how another dev accomplished this task: sharing pictures between clients at runtime ? - C++ Programming - Unreal Engine Forums.

I just feel like there has to be a better and more natural way to send over texture images to Clients and avoid a Web server implementation in this awesome Unreal Engine. Any advice is appreciated. :slight_smile: