apply_procedural_texture
Apply multicolor procedural textures to 3D models for AMS/MMU printing, then preview the result in an interactive 3D stage.
Instructions
Apply a multicolor procedural texture (requires AMS/MMU for multi-material printing). Opens Kiln's interactive inline 3D stage on the result (orbit/zoom panel in MCP Apps hosts; hosted sessions add a browser stage link).
Free accounts get 3 textures a month; Pro has no monthly limit.
INLINE 3D STAGE: on success this tool opens Kiln's interactive 3D stage — an inline viewer panel the user can orbit, zoom, and turn over — in hosts that render MCP Apps panels (Kiln's hosted connection attaches a browser stage link for hosts that don't). Oversized meshes are decimated automatically for the stage; the PNG preview is the floor, not the whole experience.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"input_path": "<input_path>",
"texture": "<texture>"
},
"name": "apply_procedural_texture"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Random seed for reproducible results (default 0). Default: 0. | |
| scale | No | Texture scale multiplier. Larger = coarser pattern, smaller = finer detail. Default 1.0. Default: 1.0. | |
| preset | No | Optional name of one of the texture's curated colourways, as ``list_procedural_textures`` lists them. Used when neither ``color_palette`` nor ``color_overrides`` is given; an unknown name is refused with the available presets. | |
| surface | No | Which faces to texture. "all" textures every face (default). "outside" skips interior faces. "walls" only textures vertical/curved faces. "caps" only textures flat/horizontal faces. Filtered-out faces are placed in zone 0 (base color). Default: "all". | |
| texture | Yes | Which color pattern: "camo", "tiger_stripe", "digital_camo", "ocean", "tie_dye", "marble", "lava", "galaxy", or "custom" (your own image via ``image_path``). ``list_procedural_textures`` describes each. | |
| image_path | No | Your own pattern image as the texture — only with ``texture="custom"``. The image's tones posterize into ``num_colors`` zones (2 colors on a black/white pattern reproduces it exactly); works with any palette. One-shot: no sizing input needed (see ``image_tile_mm``). | |
| input_path | Yes | Path to an STL file. | |
| mark_scale | No | Mark box as a fraction of the face (default 0.45); contain-fit, aspect kept. Default: 0.45. | |
| mark_style | No | ``"stencil"`` (default, logos), ``"coin"``, ``"photo"``, ``"medallion"``, ``"portrait"``, ``"default"``. Default: "stencil". | |
| num_colors | No | Number of color zones / AMS slots (default 4). Default: 4. | |
| printer_id | No | Optional printer to check this palette against its loaded filament. When given, the result carries an ``ams_advisory`` saying whether the design prints true on what's loaded right now -- advice only, never a block. Read only from that exact printer (or reported as unknown); on the hosted API, where there is no printer, it is always unknown. | |
| color_palette | No | Optional list of hex colors (overrides all). **Keeping a custom look:** when this is the user's own colors (not a curated preset) and they seem happy with the result, offer to save it with ``save_custom_palette`` -- that's what makes it available to ``push_palettes_to_cloud`` later, the same way the web app's explicit "save to library" works. Ask, don't save automatically; a quick experiment doesn't need to be kept. The result carries a ``save_this_palette`` hint with ready-to-use call args when this applies. | |
| image_tile_mm | No | Physical repeat size for a custom image pattern. Default (None) measures the motif period from the image and sizes the repeat so motifs print at a size the material can show, like the curated presets; the response carries ``auto_tile_mm`` + a warning naming the choice. Pass a value to override. | |
| mark_depth_mm | No | Mark carve depth in mm (default 1.2). | |
| mark_placement | No | ``"center"`` (default), ``"top"``, ``"bottom"``, ``"top-rim"``, or ``"bottom-rim"``. Default: "center". | |
| relief_texture | No | Optional geometric texture (``"alligator"``, ``"wood"``, ...) to carve as physical relief UNDER the color split -- the stacked finish. One compile: the relief debosses first, then the color zones split over the carved surface, so the recess walls carry the zones straight through (the same proven carve-then-split path the lava relief and user marks use). A mark can ride along too; its clear panel composes into the same carve. | |
| color_overrides | No | Optional dict mapping semantic role names to hex colors. Only specified roles are changed; the rest keep defaults. Example: ``{"foam": "#87CEEB", "deep": "#000033"}``. Use ``list_procedural_textures`` to see available roles. | |
| mark_image_path | No | Optional PNG/JPG of a logo or photo to carve into the finish (see **Layered finish** above). | |
| relief_depth_mm | No | Carve depth for ``relief_texture`` in mm; unset uses that texture's own catalog depth (what ``apply_geometric_texture`` would cut). | |
| save_to_library | No | If True, save the texture result to the decoration library for reuse. The decoration will have ``content_type="procedural_texture"`` and store all parameters needed to reproduce it. Default: false. | |
| mark_offset_x_mm | No | Continuous placement offset from the face centre, along the face's own width axis (image right), in mm. Adds on top of ``mark_placement``. Default: 0.0. | |
| mark_offset_y_mm | No | Same, along the face's height axis (image up). The mark's clear panel is clamped to stay on the face after offsets. Default: 0.0. | |
| custom_palette_name | No | Optional name of a palette saved with ``save_custom_palette``. Used when no explicit colours or preset are given; an unknown name is refused with the saved names. |