Trying stuff and failing to do the stuff. (UDP info)

Okay so this week I had a couple of tasks

I was part of a team that was in charge of making sure we knew how to connect the capacitive sensors that are gonna be connected to the wearable. 

Since I had already made sure that UDP communication (the one being sent from the adafruit connected to the capacitive table) worked in TouchDesigner the idea was that it wouldn't take that much effort to apply the same programming logic into Unreal.

OKAY so we found a couple of solutions. If we need to produce communication through an Arduino board there is this Unreal plugin that allows users to create a Serial Com to directly receive the information. We would need to code the output into Unreal, but in theory its a pretty stable (if resource consumming) solution. On the other hand, Unreal has an MQTT plugin that allows Machine to Machine communication, the problem here is that according to Emil "Requires more setup, and introduces latency. MQTT is great for other stuff with sensor networks for IoT for example. But for performance and wearable design, it is really not ideal. Latency can be annoying. MQTT uses TCP. TCP uses a handshake that ensures that every message is not only sent but also received. This is useful in many situations but again.. it slows down stuff and needs more work that doesn’t really pay off. Also MQTT uses more battery power, which might not be an issue right now but definitely something to consider when stage wearables are designed for performance."

Gotta admit, don't completely follow all of it but since we already in theory have code made to succesfully communicate the UDP messaging to a computer and knowing that we should only need to use the same net, being able to read the information, same as we did on TouchDesigner, would be ideal. On that same logic, Emil recommended the UDP-Unreal plugin developed by getnamo. Following the plugins tutorials it's necessary to copy the contents of the repository (according to the Unreal version you are following 5.1 for the Mocap room.)

We need to make sure to add the UDP component to whatever actor we are using in the scene.


As for information receiving, we have to make sure to open the receive socket (as shown on the bottom screenshot) although if I understand correctly this is only necessary when the "Auto Open Receive" function is not selected.


Finally, to receive information we need the "On Received Bytes (UDP)" event, from which we can extract the information being sent as a String.


Hopefully we get it working by next meeting.

Comments

Popular Posts