Castle Keep
A generator for the central keep of a castle: a 8 to 12 m square great tower on a 4 m grid, 2 to 5 floors (3.5 m each over a 4 m undercroft), built of coursed ashlar on a battered plinth with quoins, string courses at every floor and pilaster buttresses; arched hall windows in dressed frames, small barred chamber windows and undercroft loopholes; an outside stone stair to an iron-bound first-floor door with torches; a corbel table carrying a parapet of chamfered merlons; corner turrets or a stair tower, and a flat fighting top, a hipped roof of slate courses or spires. The seed reshapes the footprint, side or back wings, which floor holds the hall and the banner colour. Windows glow at night.
- Size
- 12.1 × 18.7 × 18.5 m
- Triangles
- 4,580
- Kit
- Castle
Tune it
5 knobs: Floors, Turrets, Roof, Stone, Seed.
Specs
- Size
- 12.1 × 18.7 × 18.5 m width × height × depth
- Triangles
- 4,580 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 { useGLTF } from '@react-three/drei';
// castle-keep.glb from the Download button (it carries the knobs you set), saved in /public
export function CastleKeep() {
const { scene } = useGLTF('/castle-keep.glb');
return <primitive object={scene} />;
}
// Live knobs or terrain-following feet: copy castle-keep.mjs and runtime/ into your project and use the three.js tab.# 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 roof of slate courses inside the parapet), spires (hipped roof plus tall coursed 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 floor holds the hall with the big windows, stone 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 Pro | GLB, default look · 432 KB |
| castle-keep.mjs Pro | ES module, every knob live |
| castle-keep.obj Pro | OBJ, static; colours in the .mtl |
| castle-keep.mtl | OBJ colours; keep it next to the .obj |
| 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.