--- name: minimax-mesh description: > Generate a 3D mesh (.blend, .stl, .obj, .glb) from a natural-language description via the MiniMax LLM + headless Blender 4.0. Use when the user wants a 3D model, a low-poly asset, a weapon, a piece of furniture, a vehicle, or any game-ready prop. Trigger on phrases like "3D model", "low-poly", "Blender", "make a sword", "generate a barrel", "model a chest". allowed-tools: Bash(minimax-gen mesh *), Bash(minimax-gen --help), Bash(blender --background *), Bash(mkdir *), Bash(ls *), Bash(test *), Bash(file *), Read --- # /minimax-mesh — 3D Mesh Generation Generate a 3D asset from a description. The MiniMax LLM writes Blender Python (`bpy`), the script is hardened, and headless Blender saves a `.blend` file (or exports to `stl`/`obj`/`glb`). ## CLI ```bash # Native Blender file (full editability) minimax-gen mesh "a small wooden treasure chest with brass fittings" \ --out /tmp/chest.blend # Game-ready export minimax-gen mesh "a wooden barrel with metal hoops" \ --format glb --out /tmp/barrel.glb # Pick a thinking depth and token budget minimax-gen mesh "a simple wooden shield" \ --effort medium --max-tokens 8192 \ --out /tmp/shield.blend ``` The CLI is at `~/dev/claude/gamedev/minimax-gen/bin/minimax-gen`. ## Output formats | Format | Use | |---|---| | `blend` (default) | full editable Blender file | | `glb` | game engines (Godot, Three.js, Unity) | | `obj` | traditional 3D tools | | `stl` | 3D printing | When `--format` is not `blend`, the script also writes the `.blend` next to the export so the user can edit it later. ## Pick a model Default is `MiniMax-M3.1-Flash-Preview` at `--effort low`. It always thinks, so effort is what keeps the token budget for code (live check 2026-10-13: low used ~100 reasoning tokens, max ~240, on a trivial prompt). Raise `--effort` for complex scenes; bump `--max-tokens` with it because thinking counts against it. | Model | Use | |---|---| | `MiniMax-M3.1-Flash-Preview` (default) | `--effort low\|medium\|high\|xhigh\|max` | | `MiniMax-M2.5-highspeed` | previous default, fast, clean code, no effort control | | `MiniMax-M2.5` / `M2.7(-highspeed)` | older gens | | `MiniMax-M3` | rarely usable here | ## Bump max-tokens when the LLM truncates A simple scene is ~2–4 KB of Python. Default `--max-tokens 6144` is enough for most; bump to 8192 or higher if a complex prompt gets cut off mid-script. ## What you get - The `.blend` (or other format) at the requested path. - A sidecar `.gen.py` with the LLM-generated Python code. **Always point the user at this file** — it's reviewable, editable, and re-runnable. ## After the call 1. Show the path written, the script path, and the wall-clock seconds. 2. Suggest reasonable next steps (preview in Blender, edit the `.gen.py`, rerun with a different prompt). 3. Do NOT run any post-processing that requires user confirmation without asking — the LLM may have generated something unexpected. ## Normalization (default 1×1×1 unit box) Every output is post-processed so the combined mesh fits inside a unit cube with the longest axis = 1.0 and the other two scaled proportionally (≤ 1.0). The geometry is also centred on the origin. This applies to the `.blend` *and* to any export (`.glb`, `.obj`, `.stl`) derived from it. This is what the game-engine side expects: ask for a "6m player ship" and scale the imported `player_ship.glb` by 6 in the engine — don't ask the LLM for absolute sizes (it can't honour them reliably). Relative proportions (long vs wide vs tall) are still useful in the prompt; the absolute scale is taken care of here. Pass `--no-normalize` to keep the LLM-generated raw size (only do this if you specifically want the LLM's dimensions — e.g. when asking for "a 2m cube" and you literally want a 2m cube). ## Never do - Never echo, log, or commit the contents of `~/.claude-secrets/minimax-auth-token`. - Never auto-render high-res images or animations without asking — those cost real credits. ## Reference Full option list: `minimax-gen mesh --help`