Skip to main content
Glama

Create SDF field

create_sdf_field

Construct a programmable SDF raymarcher in TouchDesigner using a CSG tree of sphere, box, and torus primitives with boolean operations and live controls.

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

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

Annotations declare readOnlyHint=false and destructiveHint=false, indicating the tool modifies or creates but is non-destructive. The description adds context that it creates a self-contained GLSL TOP with live controls and preview, which aligns with annotations. However, it does not detail potential side effects (e.g., overwriting existing COMPs or node path creation). No contradiction with annotations.

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?

The description is two sentences, front-loading the core functionality and key features. Every sentence adds value, and no unnecessary details are included, making it efficient for an AI agent to parse.

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?

Given the tool's complexity (14 parameters, no output schema, openWorldHint), the description covers the essential purpose and controls. It could mention potential constraints like TouchDesigner environment requirements or limitations on primitive count, but it is largely complete for decision-making.

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

Parameters3/5

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

All 14 parameters are fully described in the input schema with defaults, types, and constraints. The description provides an overview of exposed controls but does not add significant meaning beyond what the schema already conveys, such as the purpose of each parameter or how they interact.

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 clearly states it builds a programmable signed-distance-field raymarcher in TouchDesigner as a self-contained GLSL TOP, specifying composition of CSG trees with primitives and exposure of live controls. This distinctly differentiates it from sibling tools like create_raymarch_scene by focusing on SDF and CSG operations.

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 usage for creating SDF raymarchers but does not explicitly state when to use this tool versus alternatives like create_raymarch_scene or create_glsl_shader. No guidance is provided for prerequisites, dependencies, or exclusion conditions.

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/Pantani/tdmcp'

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