> 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/point-cloud-interaction/point-cloud-pop.md).

# Point Cloud POP

Configure sphere and point output, incoming sizes and colors, ID labels, and network reception with the SPNet Point Cloud POP.

The SPNet Point Cloud POP receives point data from Grid Studio and generates geometry for use in TouchDesigner.

It can represent incoming points as sphere meshes or point primitives. Point sizes, colors, and ID labels can be enabled independently.

The operator receives SPNet directly over the network and requires no wired input.

### Points page

| Parameter   | Default   | Description                                                                            |
| ----------- | --------- | -------------------------------------------------------------------------------------- |
| Output Mode | `Spheres` | Selects whether incoming points generate sphere meshes or point primitives.            |
| Use Size    | `On`      | Uses the received XYZ dimensions. When disabled, the size values are set to `1, 1, 1`. |
| Use Color   | `On`      | Uses the received RGBA colors. When disabled, the output color is white.               |

#### Output Mode

**Spheres**

Creates a sphere mesh at each received point position.

The incoming XYZ size determines the sphere's dimensions. Different values on each axis produce an ellipsoid.

| Size XYZ           | Result                                                                 |
| ------------------ | ---------------------------------------------------------------------- |
| `1, 1, 1`          | Sphere with a diameter of one meter.                                   |
| `0.25, 0.25, 0.25` | Sphere with a diameter of 25 centimeters.                              |
| `1, 2, 1`          | Ellipsoid measuring one meter across X and Z, and two meters across Y. |

Use this mode to visualize incoming points directly.

**Points**

Outputs one point primitive at each received position.

Size, color, and ID values remain available as point attributes for further processing. The visible size of a rendered point depends on the rendering setup.

Use this mode when building your own POP processing workflow or working with larger point counts.

{% hint style="info" %}
For one output point per received SPNet point, select Points and disable Draw IDs. Sphere meshes and ID labels add geometry to the output.
{% endhint %}

#### Use Size

When enabled, the operator uses the XYZ dimensions supplied by Grid Studio.

In Spheres mode, these dimensions directly control the generated geometry.

When disabled, every sphere has dimensions of `1 × 1 × 1` meters.

#### Use Color

When enabled, incoming colors are written to the output's color attributes.

When disabled, the output uses white RGBA values.

To display incoming colors in a rendered scene, assign a material that uses point colors. For example, use a white Constant MAT with **Apply Point Color** enabled.

### Labels page

| Parameter     | Default | Description                                                  |
| ------------- | ------- | ------------------------------------------------------------ |
| Draw IDs      | `Off`   | Adds line-geometry labels displaying the received point IDs. |
| ID Label Size | `0.25`  | Controls the scale of the generated labels in scene units.   |

#### Draw IDs

Labels are available in both Points and Spheres modes.

Each label follows its associated point and uses the point's color when Use Color is enabled. With Use Color disabled, labels are white.

Labels are included in the POP's output geometry and pass through the same material and rendering setup as the points or spheres.

The labels are oriented parallel to the POP's XY plane. Their readability depends on the camera angle.

#### ID Label Size

Increase this value to make the labels larger or decrease it for smaller labels.

The supported range is `0.01` to `10`.

This controls geometry size in the scene rather than a fixed text size in pixels.

### Connection page

| Parameter         | Default        | Description                                                                                                             |
| ----------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------- |
| Port              | `37373`        | UDP destination port used by the SPNet sender.                                                                          |
| Bind Address      | `0.0.0.0`      | Local address to listen on. The default listens on all local interfaces.                                                |
| Multicast Group   | `237.37.37.37` | Multicast group to join. Leave empty for a unicast-only connection.                                                     |
| Interface Address | `0.0.0.0`      | Local network adapter address used for multicast reception. The default uses the operating system's selected interface. |

#### Multicast

Configure Grid Studio and TouchDesigner to use the same multicast group and port.

On computers with multiple network adapters, set Interface Address to the receiving adapter's local IPv4 address.

#### Unicast

Configure the Grid Studio sender to target the TouchDesigner computer's IPv4 address.

Clear Multicast Group on the POP and use the same destination port as the sender.

{% hint style="info" %}
SPNet operators with identical Connection settings share one native receiver.
{% endhint %}

### Coordinates and units

Positions are expressed in meters.

The integration converts Grid Studio positions into TouchDesigner's coordinate system automatically.

The Global or Relative coordinate setting in Grid Studio determines the coordinate space of the transmitted points.

To preserve their received placement, keep the containing Geometry COMP's position and rotation at zero and its scale at one.

### Output attributes

The POP exposes attributes for use in downstream processing.

| Attribute        | Description                                                  |
| ---------------- | ------------------------------------------------------------ |
| `P`              | Output point positions in TouchDesigner coordinates.         |
| `N`              | Normals supplied when sphere or label geometry is generated. |
| `Color`, `Cd`    | RGBA color attributes containing the same color values.      |
| `size`, `scale`  | XYZ size attributes.                                         |
| `sx`, `sy`, `sz` | Individual components of the XYZ size.                       |
| `pscale`         | Scalar scale attribute.                                      |
| `id`, `spnet_id` | Point ID stored as an unsigned 32-bit integer.               |

Use Size and Use Color affect the corresponding output attributes as well as the generated appearance.

In Spheres mode, the source point's attributes are repeated across its sphere mesh vertices. ID labels add their own vertices and size values while retaining the associated point ID.

### Preview and rendering

The POP viewer provides a geometry preview.

To produce an image, place the POP inside a Geometry COMP and render it using a Camera COMP and Render TOP.

Enable the required Display and Render flags, assign a material, and include the Geometry COMP in the render's geometry selection.

{% hint style="info" %}
The point count shown in TouchDesigner's node information describes output geometry vertices. In Spheres mode or with ID labels enabled, this is larger than the number of received SPNet points.
{% endhint %}
