Skip to main content
Glama

Paint a gray blockout level or environment (spends the user's OpenRouter key)

texture_project_paint

Paint a gray blockout level by generating camera-view textures, projecting them into the UV atlas, and writing a baked GLB under assets/.

Instructions

SPENDS PROVIDER CREDITS. Texture a gray blockout level or environment: plan camera views, ask an OpenRouter image model (FLUX 3 Klein by default) to paint each view from the clay render, project the images into the level's UV atlas, and write the baked GLB atomically under the project's assets/. Every prompt keeps the clay image's edges, openings and silhouette and forbids invented doors, windows, arches and volumes; a view that invents geometry, or whose surface is almost all grazing, is rejected and left to the fill pass. You judge the views yourself: inspect returns the contact sheet, and any view that invents an arch, doorway, passage, opening, slab, coping or decorative floor is rejected with {"resumeRunId": ..., "rejectViews": [..]}, which buys no image and re-bakes from the stored ones. An embedded vision check is an opt-in (verify: true) that costs one chat request per view; it is off by default. Fails closed and stops spending: TEXTURE_PROJECT_STRUCTURE_REJECTED once the first three painted views all invent geometry, TEXTURE_PROJECT_NO_COVERAGE when no view reaches the atlas. Requires OPENROUTER_API_KEY when an image actually has to be bought; a resume that only reuses stored images needs none. Reusing resumeRunId re-judges every stored generation and requests only views that have none, so a view is never paid for twice; viewsPainted counts what reached the atlas, bought or reused. promptTestView buys exactly one image. fill: "debug" paints never-painted texels hot pink (#FF69B4) so a capture can count bake gaps; use it for verification, never ship it. The atlas stays opaque RGB with the fill's own colour, so it keeps its UASTC cook; "a view painted this texel" ships as its own file, .painted.png beside the GLB: an 8-bit grayscale PNG at a quarter of the atlas' side, 255 where an accepted view painted, 0 where the fill made the colour up, feathered and bled into the UV gutters, named by the GLB's extras.threenative.textureProjection.paintedMask and returned as paintedMask. A game samples it as a linear data texture at the atlas' uv and swaps the atlas for the paint's swatch exactly where no view painted. It also cuts true-scale, tileable material swatches from the stored paint — one wall and one floor patch, rectified onto their own planes and written beside the GLB as .swatch_wall.png, .swatch_floor.png and .swatches.json — because the atlas is macro variation and at arm's length its texels read as blotches: a game tiles these in world space for close-range detail.

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": {
      "levelPath": "<levelPath>",
      "outputPath": "<outputPath>"
    },
    "name": "texture_project_paint"
  }
}

Input Schema

NameRequiredDescriptionDefault
fillNoWhat the exported atlas writes in a texel no accepted view painted: "detail" (default) continues the material around the gap; "debug" writes it hot pink (#FF69B4) so a capture can count the bake gaps. Use "debug" for verification, never ship it.
atlasNoAtlas size in pixels, or "auto" (default) for the smallest power of two that matches what the planned views resolve.auto
holesNoExtra views over the largest unpainted texels players can see, painted until visible coverage reaches 95% (default 12).
modelNoImage model alias: "or-klein" (default), "flux-3", "qwen-2.1-turbo", "qwen-2.1-pro", "muse-image", "or-seedream-lite" or "or:<model id>".or-klein
roofsNoClose roof passes painted with the roof prompt (default 0).
styleNoMaterial style for the level, e.g. its architecture and wear.
viewsNoMaximum number of camera views to plan (default 36).
aerialNoAerial ring cameras around the level (default 0).
verifyNoOpt-in vision check: one OpenRouter chat call per painted view, priced separately in the quote (default false). A rejected view is repainted once, then left to the fill pass. You review inspect's contact sheet instead.
lightingNoLight the clay render is painted under; "overcast" (default) keeps albedo free of baked sun.overcast
viewSizeNoPixels per view image sent to the model (default 1024).
fillModelNoModel alias for fill and hole views (defaults to model); the first views always use model.
levelPathYesGray blockout level or environment GLB, project-relative; it must carry TEXCOORD_0 (unwrapped).
atlasPagesNoMulti-page UV atlas count (1-4), or "auto" (default) to split large levels across up to 4 atlases for higher texel density.auto
outputPathYesPainted GLB to write, project-relative and under the project's assets/ directory (atomically replaced).
rejectViewsNoViews you judged wrong in inspect's contact sheet: each is stored as rejected by the caller, projected nowhere, and buys no image. Requires resumeRunId and indices the run stores.
resumeRunIdNoContinue a stored run: its paid views are replayed and only the missing ones are requested.
verifyModelNoOpenRouter chat model id with image input for the opt-in vision check (default google/gemini-2.5-flash-lite).
promptTestViewNoPaint only this planned view, for one image: a prompt test that leaves the run incomplete.
styleImagePathNoReference image whose materials and palette ride along, project-relative.

Output Schema

NameRequiredDescriptionDefault
atlasYes
runIdYes
swatchesYesTrue-scale, tileable material swatches cut from the stored paint: a game tiles them in world space for close range and keeps the atlas for macro variation. Null for a prompt test; a class no accepted view could give a patch for is null and named in warnings.
warningsYesWhat the run wants read before the bake is used (a visible-coverage shortfall).
atlasPagesYes
outputPathYes
paintedMaskYesThe painted-coverage mask written beside the GLB: an 8-bit grayscale PNG at a quarter of the atlas' side, 255 where an accepted view painted the texel and 0 where the fill made the colour up, feathered and bled into the UV gutters. A game samples it as a linear data texture at the atlas' uv to swap the atlas for the paint's swatch exactly where no view painted. The atlas itself stays opaque RGB with the fill's own colour, so it cooks UASTC. Null for the debug fill, which writes no mask.
verifyModelYes
viewsBandedYesViews whose vision check listed an edge band (a coping, a plinth): projected, and recorded in run.json.
estimatedUsdYes
viewsPaintedYes
viewsRejectedYes
cookConfigHintYes
texelsPerMetreNo
viewsRepaintedYes
coveragePercentYes
blurredTexelPercentYes
visibleCoveragePercentYesShare of the texels player-height cameras see that the bake painted (B).
magnificationSkippedPercentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.2

TDQS

A4.5/5.0
Behavior5/5

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

Far exceeds what the annotations carry: it flags that provider credits are spent, states OPENROUTER_API_KEY is only needed when an image is actually bought, defines fail-closed error codes (TEXTURE_PROJECT_STRUCTURE_REJECTED, TEXTURE_PROJECT_NO_COVERAGE), and guarantees no view is paid twice across resumes. It also discloses the side artifacts written (painted-mask PNG, swatch PNGs/JSON) and that the GLB is atomically replaced.

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

Conciseness3/5

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

The cost warning and core pipeline are correctly front-loaded, and every block is topically relevant, but the body is one enormous paragraph that buries the resume/reject workflow mid-text. The long tail on painted-mask encoding and swatch tiling reads more like documentation than tool-selection guidance.

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 20-parameter, credit-spending, multi-pass tool this covers cost, auth, failure modes, resumability, and written artifacts, and an output schema exists so return values need no explanation. An agent has enough to call it correctly and safely on the first attempt.

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?

Schema coverage is 100%, so the baseline is 3; the description still adds meaning the schema alone does not — that rejectViews requires resumeRunId and buys no image, that promptTestView buys exactly one image, and that viewsPainted counts reused views. It adds less for the size/config parameters (atlas, views, holes, roofs), which are left to their schema descriptions.

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?

Names a specific verb and resource — texture a gray blockout level by planning camera views, painting them with an OpenRouter image model, projecting into the UV atlas, and writing a baked GLB. It also marks itself apart from the inspection path ("inspect returns the contact sheet") and the prompt test path, so an agent can tell what this tool does and does not cover without opening the schema.

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

Usage Guidelines4/5

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

Gives concrete when-to-use context: run it to texture a blockout, use resumeRunId + rejectViews after judging inspect's contact sheet, use promptTestView for a single-image prompt check, and use fill:"debug" only for verification and never to ship. What is missing is explicit ordering guidance toward the quote step — the quote is only mentioned in passing as the pricing location.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.