Skip to main content
Glama

bake_maps

Destructive

Bakes a mesh's material into PNG texture maps on its UVs, letting glTF exports carry procedural or layered materials.

Instructions

Bake the material of one mesh into PNG maps on its UV, so glTF can carry a procedural or layered material. Uses Cycles on the CPU. maps: base_color (sRGB), normal (tangent space), roughness, metallic, ao, orm (one image: R occlusion, G roughness, B metallic). Empty means base_color, normal, roughness, ao. For a metal ask for base_color, normal, orm. Files are _.png in out_dir (the work folder, bakes/, when empty). size is pixels, a power of two: 512-1024 for props, 2048 for a hero asset. margin is the pixel padding around UV islands. samples: 16 is enough for colour and normal, raise it for a clean ao. bevel_radius (metres, about 0.2-0.5% of the object size) rounds hard edges in the normal map only; it needs a material without an image normal map. The mesh needs a UV map without overlaps (check_mesh reports the UV); without one it is unwrapped with smart project. uv_layer picks another layer. A material without bump gives a flat normal map and the answer says so. replace_material=true builds the Principled material <object>_baked from the images and puts it on the mesh, so export_glb writes the textures. ao alone stays a file; inside orm it becomes occlusionTexture. One call bakes one object. Background job, one map per step (a 2048 px map takes 20-60 s): after wait seconds the answer is a job id for job_status (cancel=true stops it). Do not edit the object while it runs.

Input Schema

NameRequiredDescriptionDefault
mapsNo
sizeNo
waitNo
marginNo
objectYes
out_dirNo
samplesNo
uv_layerNo
bevel_radiusNo
replace_materialNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false; the description adds substantial behavioral context: Cycles CPU, background job with one map per step, 20–60 s timing, job_status polling, cancel behavior, and the warning not to edit the object while running. No contradictions.

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?

Long but justified by 10 undocumented parameters and a multi-step job workflow. The first sentence front-loads purpose, and every following sentence supplies needed operational or parameter detail without redundancy.

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?

Complete for a destructive, background-job baking tool with no output schema: it covers prerequisites (UV map), job return via job_status, material replacement effects on export_glb, and edge cases like flat normal maps. Nothing essential is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must carry parameter meaning. It explains all ten parameters, including map choices and defaults, output naming and out_dir fallback, size recommendations, margin, samples, bevel_radius constraints, UV layer selection, and replace_material behavior.

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?

States a specific verb (bake) and resource (material of one mesh into PNG maps on its UV), and ties the purpose to glTF carrying procedural or layered materials. It distinguishes itself from material-creation siblings by being the baking step.

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?

Provides clear context, including that export_glb writes the textures when replace_material is true, and gives map-selection guidance for metals and occlusion. However, it does not explicitly name when to choose it over siblings like procedural_material or set_material, nor when not to use it.

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