Skip to main content
Glama

Create depth displacement

create_depth_displacement

Convert a 2D depth/luminance map into a 3D relief landscape by displacing a subdivided grid along the Z-axis, with controls for depth, zoom, and inversion.

Instructions

Push a flat plane into real 3D relief by a depth/luminance map: a subdivided grid whose vertices are offset along Z by a GLSL displacement material sampling the source's brightness, rendered with a camera + light so it reads as depth that shifts with the view. Unlike create_depth_silhouette (a flat 2D mask), this is true geometry — a 2.5D landscape. Source can be the live camera (may prompt for macOS permission), a movie file, an animated synthetic pattern (testable without a camera), or an existing TOP (e.g. a real depth map). subdivisions sets the relief resolution, depth the push amount, invert flips bright↔near. Creates a new baseCOMP under parent_path holding the source, height map, Geometry COMP + GLSL displacement MAT, Camera, Light, Render TOP, and a Null output. Exposes Depth and Zoom knobs — bind Depth to a tempo ramp or an audio feature to make the surface heave. Returns a summary plus a JSON block with the container path, created node paths, the output path, exposed controls, any node errors, warnings, and an inline preview image.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
depthNoDisplacement amount along Z: how far bright (or dark, if inverted) pixels push the surface out of the plane. 0 = flat.
invertNoFlip the height mapping. false = bright pixels push toward the camera (bright = near); true = dark pixels push toward the camera (dark = near).
sourceNoDepth/luminance source that drives the relief. 'camera' = live webcam/capture device (creating it may pop a one-time macOS camera-permission dialog — click Allow). 'file' = a movie file. 'synthetic' = an animated noise pattern, so the relief moves and the chain is testable without any device permission (the default). 'existing_top' = displace by a TOP you already have (e.g. a real depth map).synthetic
parent_pathNoParent network where the displacement container is created (default '/project1')./project1
subdivisionsNoGrid resolution (rows = cols). Higher = finer relief and smoother displacement, but more vertices to push. 100 gives a 100×100 plane.
expose_controlsNoWhen true (default), expose live Depth (displacement amount) and Zoom (camera distance) knobs.
movie_file_pathNoPath to a movie file to play as the source; used only when source='file'.
existing_top_pathNoPath of an existing TOP to sample as the height map; used only when source='existing_top'.
Behavior5/5

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

With annotations only indicating readOnlyHint=false and destructiveHint=false, the description carries the behavioral burden and does so thoroughly. It discloses that the tool creates a new baseCOMP under parent_path, lists the exact node graph built, warns about the macOS camera-permission dialog, and states the return format including node errors and warnings. This goes well beyond the annotations and gives the agent a clear model of side effects and output.

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?

Although the description is long, it is dense and every sentence adds operational value: purpose, differentiation, source options, parameter behavior, node hierarchy, exposed controls, and return payload. The information is front-loaded with the core concept and then flows logically through setup, behavior, and output. No filler or redundancy is present.

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?

Given the tool's complexity (8 parameters, no output schema, network-building side effects), the description is exceptionally complete. It covers what gets created, where, which sources are allowed, permission caveats, parameter meanings, exposed controls, and the full return structure including preview image. This is more than sufficient for an agent to select and invoke the tool.

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?

The schema covers 100% of parameters, so the baseline is 3, but the description adds meaningful context beyond the raw schema. It explains the conceptual role of subdivisions ('sets the relief resolution'), depth ('the push amount'), and invert ('flips bright↔near'), and adds source-specific caveats like the macOS permission and the fact that synthetic is testable without a camera. It also mentions exposed Depth and Zoom knobs, which helps the agent understand the practical effect of expose_controls.

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 opens with a specific verb and resource: 'Push a flat plane into real 3D relief by a depth/luminance map' and immediately clarifies this is 'true geometry — a 2.5D landscape.' It explicitly distinguishes itself from the sibling tool create_depth_silhouette, which is described as a flat 2D mask, making the tool's unique purpose unmistakable.

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

Usage Guidelines5/5

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

The description provides explicit when-to-use guidance by contrasting with create_depth_silhouette and enumerating valid source types with use-case context: 'live camera (may prompt for macOS permission)', 'movie file', 'animated synthetic pattern (testable without a camera)', or 'existing TOP (e.g. a real depth map)'. It also suggests an application ('bind Depth to a tempo ramp or an audio feature to make the surface heave'), which helps an agent decide if this tool fits a requested visual effect.

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