I got a question:
How could it be possible to share a directx 11 texture, coming from unity, via a boygroup with 8 client pcs?
My Setup:
I got one master pc and 8 client/slaves pcs. Boygroups work fine. vvvv program files, packs, addons, plugins, modules and project files are “synchronized” (they exist on every of the pcs in the same directory). All PCs are connected via Gigabit Ethernet.
I’m able to get the render output of Unity into an DX11 renderer on my master. I just downloaded the Unity example project from here https://github.com/benkuper/Unity-Plugins/tree/master/SpoutPlugin/UnitySpoutDemo. I runned the “MultiSender” scene and a command prompt window came up (make sure the Debug Console bool in the Spout2Sender script component is true).The command line window popping up gave me the index/SendSharingHandle of Unity’s render output. I get the index e.g. “-2147477128” and use it with FromSharedTexture (DX11.Texture2d) by @vux. No big deal. Everything is working fine. I can see the Unity render output in vvvv, mirrored but anyways it works.
Now I’d like to share the texture with my clients/slaves in the boygroup.
I wonder how this could be possible.
I thought of converting the textures into Strings or RAW… but I didn’t found a solution to convert them from Strings or RAW to textures.
I got a look into this patch and modified it. Sending the RAW information via UDP looks better, it seems to be more constant and reliable.
But: Not all frames are being transferred. I can see a lot of flickering in the client render outputs as there are black frames in between the rest of the frames coming from the server.
EDIT: The flickering was caused by the format the DynamicTexture (EX9.Texture Raw) was using. I set it to “DXT5” and everything works fine now. So I can see my Unity rendering output on all of the slaves, transferred via UDP.
Another thing is: On the receiver side, the raw information go into the DynamicTexture (EX9.Texture Raw) node. I’d like to change this to a DX11 “Raw to texture” node. But it seems there is no node for this purpose. Or am I missing something?
re flickering:
should be caused by frames that are bigger than max transmition size. with dxt5 you get fixed size (as opposed to eg. jpg). still going bigger with the texture should cause troubles on udp but not on tcp.