Roof Piece
A snap-together roof piece that caps one 2 m grid cell on top of the 3 m walls (place it at the wall top, y = 3): slope (a lean-to pitch rising 1 m from the eave at +Z to the -Z edge, a half ridge cap there so two slopes back to back make a gable roof over two cells), ridge (a small gable roof over one cell, eaves at +Z and -Z), flat (a deck with a parapet on the +Z edge: battlements, a railed sci-fi deck or a coped brick parapet) or gable (the triangular end wall under a slope; turn it -90 degrees about Y so its low end meets the eave). Styles shared with the Modular Level Kit: dungeon (slate and stone), scifi (standing-seam metal with a light strip at the eave) or house (clay tile courses, fascia and gutter).
- Size
- 2.0 × 1.4 × 2.4 m
- Triangles
- 620
Tune it
5 knobs: Style, Colourway, Piece, Eaves, Wear.
Specs
- Size
- 2.0 × 1.4 × 2.4 m width × height × depth
- Triangles
- 620 of 6,000
- Draw calls
- 1 one vertex-colour material
- Knobs
- 5 3 presets
- Night lights
- 1 light
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/roof-piece.mjs';
const roofPiece = createAsset();
scene.add(roofPiece); // rests on y = 0, front faces +Zimport { useMemo } from 'react';
import { createAsset } from 'https://gaitkit.com/cdn/roof-piece.mjs';
export function RoofPiece() {
const model = useMemo(() => createAsset(), []);
return <primitive object={model} />;
}# Import roof-piece.glb (download below). It is a static mesh, one material per colour.
add_child(preload("res://roof-piece.glb").instantiate())// Import roof-piece.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": "roof-piece", "want": "default look" })
then place the result.
# MCP endpoint
https://gaitkit.com/mcpKnobs
| Knob | Type | Values | Default | What it does |
|---|---|---|---|---|
style | choice | dungeon scifi house | dungeon | Shared by every Modular Level Kit piece: dungeon (coursed stone blocks, iron and oak), scifi (bolted panels, trims and glowing light strips), house (plaster over wood or brick wainscot, timber trim). Use one value across a level. |
colorway | choice | classic dark warm | classic | Palette within the style, shared across the kit: classic (dungeon grey granite, scifi light grey with orange, house cream plaster and brown wood), dark (basalt, gunmetal with yellow, white plaster with black timber), warm (sandstone, beige retro with teal, ochre plaster with honey wood and brick). |
piece | choice | slope ridge flat gable | slope | slope (lean-to, eave at +Z, high edge at -Z), ridge (gable roof over one cell), flat (roof deck with a +Z parapet), gable (triangular end wall under a slope, runs along X with its low end at +X). |
eaves | toggle | on / off | true | Slopes and ridges overhang the walls by 0.3 m with a fascia, gutter or light trim and a wall plate under them; on flat it raises the parapet; the gable follows the same roof line. Off: the roof stops flush at the wall line. |
wear | range | 0 to 1, step 0.1 | 0.2 | 0 = new; higher adds moss and slipped or missing slates and tiles, rust streaks on metal panels, stains. |
Presets: slate lean-to {"style":"dungeon","piece":"slope","wear":0.5} · hangar deck {"style":"scifi","piece":"flat","colorway":"dark"} · cottage gable {"style":"house","piece":"ridge","colorway":"warm"}
Files
| File | What |
|---|---|
| roof-piece.glb Pro | GLB, default look · 118 KB |
| roof-piece.mjs Pro | ES module, every knob live |
| roof-piece.obj Pro | OBJ, static; colours in the .mtl |
| roof-piece.mtl | OBJ colours; keep it next to the .obj |
| roof-piece-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.