UDP vvvvbeta to vvvv gamma

Hi,
I will try to send a vector3 from vvvvBeta to gamma. I use UDP network.
For one value, it works but I don’t find a solution to send 3 value (or more).
Can you explain me to send 3 value by udp ?

Thank you

I would suggest you to use AsRaw on the beta side in order to convert your Vector to a byteArray and then consume it on gamma side, as such you can pass Spreads or Spreads of Spreads (which is how the Vectors are defined on beta) and then decouple them on gamma.

*GetSpread Count pin in the Foreach loop is equal to the strides, 4 (Float32) and 3 (Vector3D) respectively.

yeah sorry for not sending it in the very beginning

udp_vector.vl (13.7 KB)

btw in the AsRaw node set the type to Single (it is Double by default)

1 Like

Great ! Thank you :)

It’s very cool like solution but not for a large spread.
When I send a large value of spread XYZ (±90.000 ), it’s not possible.
The maximum is 8192 spread, I can’t send more with the same UDP.
Do you have a solution to send large spread of value from UDP?

Thank you

here is a slightly simplified version of the patch by nissidis:
udp_vector_simplified.vl (11.0 KB)

but for 90.000x3 float values UDP is not the right protocol. it simply has a limit of what can be transferred in one go. for such amounts you better use TCP or ZMQ.

2 Likes

Thank you Joreg

Also keep in mind that the maximum bytes allowed is hardcoded to 65536 bytes:
VL.StandardLibs/DatagramReceiver.cs at main · vvvv/VL.StandardLibs · GitHub

61: args.SetBuffer(new byte[0x10000], 0, 0x10000);

It’s probably already a very sensible default for the protocol, but I lack a deep understanding of networking here. If it’s ok to raise it in some cases, maybe expose the buffer size on the node?

Btw, while peeking in the source, I spotted that the buffersize for sender and receiver is assymetrical, sender is double the size of the receiving buffer:

VL.StandardLibs/DatagramSender.cs at main · vvvv/VL.StandardLibs · GitHub

60: args.SetBuffer(new byte[0x20000], 0, 0x20000);

Is it possible to send 3dbuffer from vvvvBeta to vvvv gamma with UDP?

@visionnocturne this is quite different topic. I suppose that you may share it as a Resource or a Texture, but it is way more complicated. From what I have understand so far 3Dbuffers are living in your VRam so you have either to Read them Back or to send the data before you turn it to a 3DBuffer.

1 Like

Not as buffer, as spread of vector3 or as a shared texture

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.