Castle Keep
A generator for the central keep of a castle: a 8 to 12 m square stone great tower on a 4 m grid, 2 to 5 floors (3.5 m each over a 4 m undercroft), pilaster buttresses, an outside stair to a first-floor door, corner turrets or a stair tower, and a crenellated top, a hipped roof or spires. The seed reshapes the footprint, side or back wings, windows and banner colour. Windows glow at night.
- Size
- 11.9 × 19.1 × 18.3 m
- Triangles
- 3,640
- Kit
- Castle
Tune it
5 knobs: Floors, Turrets, Roof, Stone, Seed.
Specs
- Size
- 11.9 × 19.1 × 18.3 m width × height × depth
- Triangles
- 3,640 of 6,000
- Draw calls
- 1 one vertex-colour material
- Knobs
- 5 3 presets
- Night lights
- 2 window, torch
Passed the validator: real scale, rests on y = 0, front faces +Z, deterministic.
Use it
Code for the specimen as it is set up above; it follows your knobs.
import { createAsset } from 'https://gaitkit.com/cdn/castle-keep.mjs';
const castleKeep = createAsset();
scene.add(castleKeep); // rests on y = 0, front faces +Zimport { useMemo } from 'react';
import { createAsset } from 'https://gaitkit.com/cdn/castle-keep.mjs';
export function CastleKeep() {
const model = useMemo(() => createAsset(), []);
return <primitive object={model} />;
}# Import castle-keep.glb (download below). It is a static mesh, one material per colour.
add_child(preload("res://castle-keep.glb").instantiate())// Import castle-keep.glb with glTFast (com.unity.cloud.gltfast).
// Drop it in the scene: 1 unit = 1 metre, +Z is its front.Use the gaitkit MCP server: get_variant({ "id": "castle-keep", "want": "default look" })
then place the result.
# MCP endpoint
https://gaitkit.com/mcpKnobs
| Knob | Type | Values | Default | What it does |
|---|---|---|---|---|
floors | range | 2 to 5, step 1 | 3 | Storeys above the 4 m undercroft, 3.5 m each: 2 is a squat hall keep about 11 m to the walk, 5 a great tower about 21.5 m. |
turrets | choice | four corners front pair stair tower none | four corners | four corners (round turrets rising past the roofline at every corner), front pair (only the two front corners), stair tower (one tall round tower in the middle of the back face), none (a plain block). |
roof | choice | battlements hipped spires | battlements | battlements (flat fighting top behind crenellations, turrets crenellated too), hipped (a tall slate roof inside the parapet), spires (hipped roof plus tall cone spires on every turret, fairy-tale look). |
stone | choice | limestone granite sandstone slate redstone | limestone | Stone for the whole kit: limestone (pale warm grey, classic), granite (neutral grey), sandstone (warm tan, desert fort), slate (dark blue-grey, grim northern hold), redstone (red-brown). Use the same value on every Castle piece so they match. |
seed | range | 1 to 60, step 1 | 3 | Reshapes the keep: footprint (8 or 12 m each way), wings (none, a lower back wing or twin side wings), which floors get large windows, block shading and banner colour. Same seed, same keep. |
Presets: norman great tower {"floors":4,"turrets":"four corners","roof":"battlements","stone":"limestone","seed":3} · fairy-tale palace {"floors":3,"turrets":"four corners","roof":"spires","stone":"limestone","seed":14} · border tower house {"floors":4,"turrets":"stair tower","roof":"hipped","stone":"slate","seed":8}
Files
| File | What |
|---|---|
| castle-keep.glb | GLB, default look · 573 KB |
| castle-keep.mjs | ES module, every knob live |
| castle-keep.obj | OBJ, static, no colour |
| castle-keep-params.json | knob schema, presets, night zones |
Licence
Use it in games, apps, renders and client work, commercially and without credit. Do not resell it as an asset or train a 3D generator on it. The full licence.