Shrink a static mesh without a visible change
mesh_optimizeSimplify heavy static GLB meshes with meshoptimizer, validating silhouette and grayscale similarity from six angles before writing an optimized copy and downscaling oversized textures.
Instructions
Simplify a heavy static GLB with meshoptimizer under a rendered before/after gate: each error-ladder candidate must keep its silhouette (IoU >= 0.98) and mean grayscale difference (<= 2%) from six angles, or the original is kept and nothing is written. Resizes textures above maxTextureSize, never compresses the output, never overwrites the input, and refuses skinned or morph-target meshes.
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": {
"path": "<path>"
},
"name": "mesh_optimize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to a static GLB (no skin or morph targets). | |
| outputPath | No | Output .glb path. Defaults to <name>.optimized.glb next to the input; never the input itself. | |
| maxTextureSize | No | Longest texture side kept; larger textures are downscaled in their own format. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gate | Yes | ||
| kept | Yes | ||
| input | Yes | ||
| output | Yes | ||
| attempts | Yes | ||
| previews | Yes | ||
| maxTextureSize | Yes |