three_live_bake_textures
Generates AI textures requested by a Three.js scene through an OpenAI-compatible Images endpoint and saves them into a reusable texture pack, returning a preset-vs-AI comparison and bake report.
Instructions
Generate the AI textures a scene asks for (mesh.userData.xr = { material: { preset, prompt, size: 256 | 512 | 1024, seed } }) through an OpenAI-compatible Images endpoint and save them in a texture pack. Use it last, after geometry and presets look right: it needs a configured image endpoint and costs money per texture. Returns a preset-vs-AI comparison image and the bake report. Pass the pack to three_live_render / three_live_convert (texturePack / texturePackPath) and ship it with the scene (<three-live texture-pack=...>).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "three_live_bake_textures"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Inline Three.js scene script. Provide either `code` or `inputPath`. | |
| only | No | Optional node names; only their textures are generated. | |
| force | No | Regenerate textures the pack already has (bump `seed` instead to keep the old one). | |
| inputPath | No | Path to a .js scene script when `code` is not provided. | |
| outputPath | No | Recommended: where to write the pack JSON. Without it the pack is returned inline. | |
| texturePack | No | Optional existing pack to extend (entries it already has are reused). | |
| aiImageModel | No | Optional image model (defaults to `THREE_LIVE_AI_IMAGE_MODEL`). | |
| aiImageEndpoint | No | Optional Images endpoint URL (defaults to `THREE_LIVE_AI_IMAGE_ENDPOINT`). | |
| texturePackPath | No | Optional path to an existing pack JSON file to extend. |