The TUIO protocol provides a general and versatile communication interface between controller interfaces and applications. The TUIO In DAT can receive TUIO messages from other applications on the network. The protocol is encoded using the OSC format which also allows TouchDesigner to communicate with the specification using the OSC In CHOP or OSC In DAT.
Details about the TUIO specification can be found at www.tuio.org
The TUIO specification includes profiles for 2D, 3D, and custom interactive surfaces. The example component below will parse 2Dcur (2D cursor) messages out of TUIO data sent to TouchDesigner (via OSC).
This component can be used with any TUIO application that sends 2Dcur messages, such as the iPhone/iPod app OSCemote or Nuigroup's Community Core Vision (CCV) vision-based tracking software. There is a list of other TUIO software implementations here.
The format of the 2Dcur message is:
/tuio/2Dcur set s x y X Y m
s- session ID (temporary object ID)
x y- position
X Y- velocity vector
m- motion acceleration
Notes on the network
The component receives TUIO data through an OSC In DAT. Make sure the port settings of this DAT correspond to the ports settings of the application sending the TUIO data to TouchDesigner.
The messages are broken into "
alive", and "
fseq" message classes using 3 Select DATs. The "
set" messages are then output from the component and available to external networks.
To enable messages other than 2Dcur, edit the Selected Row Values parameter in the DAT called 2Dcur. You may want to branch the network by copying it from that point onward to keep the message types separate.