Build a 3D model from code
godot_model_buildBuild a clean .glb from a ready-made kind or model spec, write it to a chosen path, lint it, and optionally add Godot collision shapes and a contract file.
Instructions
Build a clean .glb (UVs, tangents, one node per part, same bytes every time) from a ready-made kind or a model spec, write it to out, and lint it. Pass collision so Godot adds collision shapes when it imports the file (most models need one; nobody remembers to add it by hand). If the spec has an "archetype" (or the kind has one), the result is also checked against what that thing should be. Give kind (with optional params), spec or spec_file; contract_out also writes a model.contract.json that godot_model_lint can hold later versions to. out is replaced if it exists. Returns the size, triangle and node count, then the lint report (detail full lists every finding with its fix); an error result when the lint finds errors, though the file is still written. Call godot_model_identify first and godot_model_spec for the format. To check a .glb you did not build here, use godot_model_lint.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| out | Yes | where to write the .glb, inside the project, e.g. models/car.glb | |
| kind | No | a ready-made kind: house, terrain, sea, airliner, apartment, barn, barrel, bicycle, boat, bridge, bus, bush, campfire, car, castle, chair, church, conifer, crate, dragon, drone, fence, fighter, flower, grass, helicopter, horse, humanoid, jet-engine, light-aircraft, motorcycle, palm, piston-engine, power-pylon, railway-track, road, rocket, rowing-boat, sailboat, satellite, ship, shipping-container, spaceship, street-lamp, table, tank, tower, tractor, train, tree, truck, wind-turbine, windmill | |
| spec | No | a full model spec as a JSON object | |
| detail | No | brief: short output with capped lists; full: everything (default for this premium profile: full). | |
| params | No | parameter values, e.g. { width: 9, roof: 'hip' } | |
| collision | No | collision for Godot: convex (a hull per mesh on import, for props and vehicles), trimesh (exact triangles on import, for buildings), or heightmap (terrain tiles: writes <name>.heightmap.tres and <name>.tscn with a StaticBody3D, faster than trimesh) | |
| spec_file | No | or a path to a spec JSON file inside the project | |
| contract_out | No | also write a model.contract.json here (inside the project) |