Skip to main content
Glama

Create depth displacement

create_depth_displacement

Converts a flat plane into a 3D relief landscape by displacing a subdivided grid's vertices along Z using a depth map, creating true geometry that shifts with viewpoint.

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
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
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'.
subdivisionsNoGrid resolution (rows = cols). Higher = finer relief and smoother displacement, but more vertices to push. 100 gives a 100×100 plane.
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).
expose_controlsNoWhen true (default), expose live Depth (displacement amount) and Zoom (camera distance) knobs.
parent_pathNoParent network where the displacement container is created (default '/project1')./project1
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=true), the description discloses that it creates a baseCOMP with many nodes, may prompt a macOS camera permission dialog when using camera source, and exposes live Depth and Zoom knobs. It also notes the return value includes a summary and JSON block with preview image.

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

Conciseness4/5

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

The description is detailed but well-structured. The first sentence captures the essence and differentiation from a sibling. It then lists source types, key parameters, and outputs. Some redundancy exists (e.g., 'true geometry' repeated), but overall it is appropriately sized for the tool's complexity.

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, many siblings), the description is thorough. It covers all relevant aspects: purpose, source options with permissions, parameter effects, created nodes, exposed controls, and return format including inline preview. It leaves no major gaps.

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?

Although schema coverage is 100%, the description adds meaningful context beyond the schema: e.g., 'subdivisions' sets relief resolution and mentions vertex count effect; 'depth' explains that 0 is flat; 'invert' explains bright↔near mapping. It also explains the effect of 'expose_controls' and 'parent_path'. This enriches the parameter understanding beyond bare schema definitions.

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 pushes a flat plane into 3D relief using a depth/luminance map, and contrasts with the sibling 'create_depth_silhouette', which is a flat 2D mask. The verb 'create' and resource 'depth displacement' are specific and unambiguous.

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 explicitly tells when to use this tool vs. 'create_depth_silhouette', describes source options with context (e.g., synthetic for testing, camera may need permission), and explains that subdivisions affect detail. It provides clear guidance on selecting source type and other parameters.

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