How to output realtime rendering to other application?

Hello,

I would like to use Unreal Engine to implement a robot simulation for a research project where I feed the visual output of the “game” (simulation) into a neural network. A way I could think of doing this is by streaming the rendered images via a tcp socket. So my question is: What’s the best way to output the rendered images not only on the computer’s screen but also to another application. How can I do this?

Thanks in advance and
Best Regards

This can be done by so many ways, you can read what is possible in windows here:

But most straight forward and universal way is to simply use TCP/IP networking via sockets. Make a listen socket on UE4 game and connect to it to app (you can use loopback IP address 127.0.0.1 which will work even on hardware without network adapter). Then you just send data of you desire, you can use anything bytes, text whatever you like. Here tutorial on sockets on wiki, but wiki currently is bugged so code formating messed up, but you can loop it up in “View Source”

https://wiki.unrealengine.com/TCP_Socket_Listener,Receive_Binary_Data_From_an_IP/Port_Into_UE4,%28Full_Code_Sample%29

There also pipes mentioned in first link you can use anonymous pipes using FPlatfromProcess and CreatePipe and close with ClosePipe

Answer from Shadowriver in this post