Skip to main content
Glama

Create NPR painterly filter

create_npr_filter

Create oil, pencil, or watercolor stylizations for any TouchDesigner TOP using a generalized Kuwahara filter. Exposes live radius, smoothness, and strength controls for real-time tweaking.

Instructions

Apply a non-photorealistic painterly filter to an existing TOP. A generalized Kuwahara (sector-based local variance smoothing) runs in a single GLSL TOP and branches into three looks selected by mode: oil (flat color regions, preserved edges), pencil (graphite sketch via luminance × edge magnitude), or watercolor (quantized chroma + low-frequency bleed). Creates a Select TOP → GLSL TOP → Null TOP chain under parent_path and exposes Radius / Smoothness / Strength as custom parent params bound by expression for live tweaking. Returns the GLSL TOP path, the bind-ready output null path, the fragment DAT path, exposed controls, and an glsl_compile_verified flag (always false offline — verify post-cook with get_td_node_errors).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoPainterly look. oil: full Kuwahara → flat color regions with preserved edges. pencil: luminance + edge-mag → graphite sketch. watercolor: quantize chroma + low-freq bleed.oil
nameNoBase name for the glslTOP (textDAT becomes `<name>_frag`, output becomes `<name>_out`, source select becomes `<name>_src`).npr1
radiusNoSampling radius in texels. Cost is O(radius² · sectors) — keep modest on 4K.
sectorsNoNumber of generalized-Kuwahara sectors. 8 = smoother painterly; 4 = classic Kuwahara (cheaper).8
strengthNoWet/dry mix between source (0) and filtered output (1). Live control.
resolutionNoOutput resolution: 'input' inherits from the source (default), or '720p' (1280x720), '1080p' (1920x1080), '4K' (3840x2160).input
smoothnessNoBlend between hard min-variance sector pick (0) and softmax-weighted average across sectors (1). Live control.
parent_pathNoParent COMP path to create the glslTOP + textDAT + nullTOP inside./project1
source_pathYesAbsolute path of an existing TOP to filter (e.g. '/project1/render1'). Pulled in via a Select TOP (no cross-COMP wire).
Behavior5/5

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

Beyond the annotations, the description discloses significant behavior: it creates a Select→GLSL→Null chain, exposes live-tweakable params, and explicitly warns that `glsl_compile_verified` is always false offline and to verify with `get_td_node_errors`. It also notes the cost model in the schema but the description adds the offline-compile caveat and return-value structure.

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 dense sentences front-load the core purpose and then systematically cover algorithm, node chain, exposed params, and return values. No filler or repetition.

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

Completeness5/5

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

For a tool with 9 params and no output schema, the description covers the algorithm, chain creation, exposed controls, and exact return values including the compile-verification caveat. This is complete for an agent to invoke and interpret results.

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?

Schema coverage is 100% with detailed parameter descriptions (modes, defaults, ranges, cost hints). The description adds no new parameter-level info beyond mentioning Radius/Smoothness/Strength as exposed parent controls, which is a behavioral detail rather than input semantics. Baseline 3 applies.

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 opening sentence uses a specific verb+resource ('Apply a non-photorealistic painterly filter to an existing TOP'), and the description elaborates with three distinct modes (oil, pencil, watercolor), clearly distinguishing it from sibling tools like create_glsl_shader or create_raytk_op.

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 focuses entirely on mechanics and does not explicitly state when to choose this over alternatives. Usage is implied (painterly NPR effect on a TOP), but there is no 'when-not' or comparison to sibling create_* tools, so guidance remains implicit.

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