# DepthToPoints

> Turns the depth layer into 3D through the camera (cam input or focal knobs): a displaced, textured card mesh (ScanlineRender can re-render it from new views) or a coloured point cloud.

| Node | DepthToPoints |
|---|---|
| Menu | 3D › DepthToPoints |
| **Names in each format** | |
| .oink comp (JSON) | `"type": "OC_N_depthtopoints"` |
| .nk script | none: written as an Oink node |
| Python | `nuke.createNode("OC_N_depthtopoints")` |
| Assistant (MCP) | `create_node(type="DepthToPoints")` |
| Tab search | `depthtopoints`, or its initials `dtp` |

![DepthToPoints properties](/shots/nodes/depthtopoints@2x.webp)

## Inputs and outputs

| Port | Name | Type |
|---|---|---|
| input 0 | Image | image |
| input 1 | cam | scene |
| output 0 | scene | scene |

## Knobs

Panel tab **Depthtopoints**, in panel order.

| Knob | Label | Type | Default | Range / values | .nk knob | Description |
|---|---|---|---|---|---|---|
| `mode` | output | menu | `mesh` | mesh (displaced card), points (point cloud) |  |  |
| `step` | step (px) | float | `8` | 1 to 256 (integer) |  | Sample every N pixels |
| `edge_threshold` | edge threshold | float | `0.1` | 0 to 10 |  | Drop mesh triangles whose depths differ by more than this fraction |
| `point_size` | point size | float | `0` | 0 to 1 |  | Octahedron radius for renderers (0 = 1/3 of the sample spacing) |
| `depth_layer` | depth layer | text | `depth` |  |  |  |
| `depth_convention` | depth is | menu | `inv` | inv (1/Z), z (Z) |  |  |
| `focal` | focal | float | `50` | 1 to 2000 |  |  |
| `haperture` | horiz aperture | float | `24.576` | 0.1 to 100 |  |  |

### Other knobs (Python, .nk and the assistant; not on the panel)

| Knob | Label | Type | Default | Range / values | .nk knob | Description |
|---|---|---|---|---|---|---|
| `gl_color` | Viewer Controls Color | float ×3 | `0, 0, 0` | 0 to 1 |  |  |
| `postage_stamp_frame` | Static Frame | int | `1` | -2147483648 to 2147483647 |  |  |
| `lifetimeStart` | Lifetime Start | int | `0` | -2147483648 to 2147483647 |  |  |
| `lifetimeEnd` | Lifetime End | int | `100` | -2147483648 to 2147483647 |  |  |
| `useLifetime` | Use Lifetime | boolean | `false` |  |  |  |
| `cached` | Cached | boolean | `false` |  |  |  |
| `bookmark` | Bookmark | boolean | `false` |  |  |  |
| `dope_sheet` | Dope Sheet | boolean | `false` |  |  |  |
| `clone_group` | Clone Group | string |  |  |  |  |
| `link_source` | Link Source | string |  |  |  |  |
| `link_overrides` | Link Overrides | string |  |  |  |  |
| `split_views` | Split Views | string |  |  |  |  |


---
Sources: opencomp_core/nodes/three_d/depth_points.py, opencomp_electron/src/components/properties/knobSchema.ts, opencomp_core/nodes/help/depthtopoints.md
