Create depth-driven POP field
create_depth_pop_fieldCreates a depth-driven GPU POP scatter field in TouchDesigner, sampling a depth/mask TOP to displace or scatter particles; auto-spins up a depth source when none is specified.
Instructions
Build a depth-driven GPU POP scatter field: consumes a depth/mask TOP and uses lookup_texture_pop to sample depth for displacement/scatter proxies (and optionally color). When depth_top_path is omitted, auto-spins-up a setup_segmentation MediaPipe chain inside the container and uses its mask Null TOP as the depth source. Scatter modes: 'displace' applies a uniform depth-scale proxy, 'emit' adds an emission-like jitter scatter proxy, 'both' does both. Forward-compatible: pass create_depth_from_2d (Depth Anything, W4) output as depth_top_path. NOTE: POPs are Experimental — op types and par names are fail-forward, probe on a live TD. Returns a JSON block with container path, depth source info, controls, warnings, and unverified probe record.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "create_depth_pop_field"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Name for the self-contained container created under parent_path. | depth_pop_field |
| spin | No | Y-rotation of the field in deg/sec, animated via transformPOP ry expression. Exposed as Spin knob. | |
| point_size | No | Render TOP point size, exposed as PointSize knob. | |
| resolution | No | Render TOP resolution [width, height]. | |
| depth_scale | No | Multiplier on the depth-driven displacement amount along +Z for displace/both scatter modes. Exposed as DepthScale knob when that displacement proxy is active. | |
| parent_path | No | Parent COMP path where the depth-pop-field container is created. | /project1 |
| invert_depth | No | Treat dark as near instead of bright. Implemented via Level TOP invert on a proxy feed. | |
| scatter_mode | No | 'displace' = uniform depth-scale proxy on the point cloud; 'emit' = emission-like scatter jitter around the sampled depth field; 'both' = depth-scale proxy + scatter jitter. True depth-weighted birth is unverified. | displace |
| color_by_depth | No | When true, copies sampled RGBA into POP Color attribute via a second lookup_texture_pop (near = bright / far = dark). | |
| depth_top_path | No | Absolute path of an existing depth/mask TOP (luminance = depth, bright = near by default). When omitted, the tool auto-spins-up a setup_segmentation chain inside the container and uses its mask Null TOP as the depth source. Future W4: pass create_depth_from_2d output here. | |
| expose_controls | No | Build the live artist knobs panel for the active depth field controls. | |
| particle_density | No | Approximate point count fed to pointgeneratorPOP.numpoints (100–500 000). |