> For the complete documentation index, see [llms.txt](https://stage-precision.gitbook.io/grid/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stage-precision.gitbook.io/grid/touch-designer-integration/tracking-data/send-tracking-data-from-grid-studio.md).

# Send tracking data from Grid Studio

Configure a Tracker and SPNet Sender in Grid Studio, choose a tracking output format, and send object data to TouchDesigner.

Tracking data is sent from a spatial object through an SPNet Map Output.

For this setup, a Tracker supplies the values, while an SPNet Object provides the network connection. The output format determines which properties are transmitted and how the object is identified in TouchDesigner.

### 1. Add a Tracker

Add a **Tracker Object** to the Project Tree.

For the first test, keep its position and rotation at zero. You can change these values manually in its Coordinates section to test the connection.

For a live tracking setup, use a Map Input to connect the tracking source to the Tracker.

### 2. Create the SPNet Sender

1. Add an **SPNet Object** to the Project Tree.
2. Configure it as a **Sender**.
3. Use these connection settings:

| Setting     | Value          |
| ----------- | -------------- |
| Destination | `237.37.37.37` |
| UDP port    | `37373`        |

You can reuse an existing SPNet Sender configured for this destination.

### 3. Add the SPNet Map Output

Select the Tracker:

1. Open its **Maps** section.
2. Add an **SPNet Map Output**.
3. Assign the SPNet Sender.
4. Select the required SPNet output type.
5. Configure the outgoing object ID.

For the following cube example, use:

| Setting            | Value     |
| ------------------ | --------- |
| SPNet output type  | `Movable` |
| Outgoing object ID | `1`       |

The complete setup is:

```
Tracker
    → SPNet Map Output
    → SPNet Sender
    → TouchDesigner
```

{% hint style="info" %}
The Tracker is the source object in Grid Studio. The SPNet output type determines the data format received by TouchDesigner.
{% endhint %}

### Choose the output type

#### Trackable

Sends a tracked point's 3D position.

Use this format when a graphic should follow a position and you only need positional tracking.

In the SPNet Data CHOP, select **Object Type → Tracked Point**.

#### Movable

Sends:

* Position.
* Rotation.
* Size.

Use this format to control a visual object's position, orientation, and dimensions.

This is the format used by the following cube example.

In the SPNet Data CHOP, select **Object Type → Movable**.

#### RigidBody

Sends a rigid body's position and orientation.

Use this format when the tracking data represents a rigid body with a defined set of associated points.

In the SPNet Data CHOP, select **Object Type → Rigid Body** to access the body's tracking values.

### Match the type in TouchDesigner

All three formats belong to **Data Type → Tracking** in the SPNet Data CHOP.

For Single Object mode, select:

| Grid Studio output | TouchDesigner Object Type |
| ------------------ | ------------------------- |
| Trackable          | `Tracked Point`           |
| Movable            | `Movable`                 |
| RigidBody          | `Rigid Body`              |

Set **Object ID** to the outgoing ID configured in the Map Output.

Different SPNet object types can use the same numeric ID. Selecting the type and ID together identifies the intended object.

### Test the output

Start the SPNet Sender.

Change the Tracker's position in Grid Studio and check that the received position channels update in TouchDesigner.

With Movable or RigidBody output, also change the Tracker's rotation to check the orientation channels.

For the cube example, continue with:

| SPNet Data CHOP parameter | Value           |
| ------------------------- | --------------- |
| Data Type                 | `Tracking`      |
| Output Mode               | `Single Object` |
| Object Type               | `Movable`       |
| Object ID                 | `1`             |
| Port                      | `37373`         |
| Multicast Group           | `237.37.37.37`  |
