Skip to main content
Glama

Create SDF field

create_sdf_field

Create a real-time SDF raymarcher in TouchDesigner as a self-contained GLSL TOP with CSG boolean operations, live controls, and direct preview.

Instructions

Build a programmable signed-distance-field (SDF) raymarcher in TouchDesigner as a self-contained GLSL TOP. Compose a CSG tree of sphere / box / torus primitives with union / intersect / subtract boolean ops and optional smooth blending. Exposes live CameraZ / Speed / StepCount / Intensity / Rotate / ColorA / ColorB / Background controls and previews the output.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
speedNoAnimation speed multiplier (drives uTime). Live 'Speed' control.
color_aNoNear colour hex (e.g. '#33ccff'). Live RGB swatch 'ColorA'.#33ccff
color_bNoFar colour hex (e.g. '#ff2266'). Live RGB swatch 'ColorB'.#ff2266
camera_zNoCamera distance from origin (uCameraZ). Live 'CameraZ' control.
intensityNoOutput brightness multiplier (uIntensity). Live 'Intensity' control.
backgroundNoBackground / miss colour hex. Live RGB swatch 'Background'.#06080c
primitivesNoCSG tree of SDF primitives (max 16). First prim is always union (root). Each subsequent prim is combined with the running fold via its op.
resolutionNoOutput resolution [width, height] of the GLSL TOP.
step_countNoRaymarch iterations (uSteps); SDF CSG benefits from more steps. Live 'StepCount'.
parent_pathNoParent COMP path the self-contained 'sdf_field' container is created inside./project1
rotate_sceneNoY-axis rotation speed (radians/s applied to SDF space via uRotate * uTime). Live 'Rotate'. Reads 0 when TD timeline is paused.
camera_targetNoLook-at point baked as GLSL constant (not a live control).
expose_controlsNoExpose live CameraZ/Speed/StepCount/Intensity/Rotate/ColorA/ColorB/Background controls.
light_directionNoLight direction normalised in shader — baked as GLSL constant.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly=false, openWorld=true, and destructive=false. The description adds meaningful behavioral context by mentioning 'Exposes live ... controls and previews the output,' which goes beyond annotation settings. However, it does not mention side effects like the container name or overwriting behavior, though the schema partially covers that.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each earning its place: the first gives the core purpose and output type, the second explains the CSG capabilities, and the third summarizes live controls and preview. No fluff or redundancy; it is front-loaded and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 14 parameters and a nested CSG array, the description covers the core workflow—composing primitives with boolean ops, blending, live controls, and preview—without repeating schema details. It does not explain return values or parent_path explicitly, but those are present in the well-described schema. Slightly short of a 5 because ordering semantics and creation path are only implicit.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description enhances the schema by grouping primitives (sphere/box/torus), boolean ops (union/intersect/subtract), smooth blending, and enumerating live controls (CameraZ/Speed/StepCount/Intensity/Rotate/ColorA/ColorB/Background). This helps the agent understand the CSG model and which params are interactive.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description starts with a specific verb and resource: 'Build a programmable signed-distance-field (SDF) raymarcher in TouchDesigner as a self-contained GLSL TOP.' It further details the CSG composition and live controls, which clearly differentiates it from siblings like create_raymarch_scene or create_glsl_shader.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use for self-contained SDF raymarchers with live controls, but it does not explicitly mention alternatives, exclusions, or when-not-to-use scenarios. The 'self-contained GLSL TOP' phrasing hints at a differentiator, but there is no direct comparison to raytk or other shader tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lucasmaher-hash/touch-designer-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server