Style books

Implementation notes: what the game built, and where it left this portfolio

2026-10-01. Branch flora-lift of eventyrland (not merged when this was written). The engine detail is in the game's docs/flora.md; this file lists only what differs from README.md here, and why. Stills: a local file (before/, after/, sheets/), all from headless Chromium on the server (SwiftShader, WebGL2): good for looks, not for frame times. Nothing was measured on a GPU; the Mac was offline.

Claims about the code that did not hold

The portfolio saidWhat the code showedWhat was built
The design is triangle-neutral: 145 000–159 000 triangles against 154 000 (4.1, 4.9)That count is over the whole pool. In view (chunks against the view's side planes, replayed in scripts/perf/flora-counts.mjs) today's grass is about 61 000 triangles a frame on medium, and the 39-vertex tuft with near chunks to 24 m is 87 000: + 43 %, + 39 % vertex invocations. The near chunks are the ones in view; the far ones' saving is small either wayA tuft with one stalk and head instead of two (31 vertices, 18 triangles near), near chunks to 22 m (20 m outside): 59 500 triangles inside the wall (− 3 %) and 65 100 outside (+ 6 %), vertex invocations − 2 % and + 4 %; with the cards' saving the grass and flowers together are at or under before. The worst frame (four near chunks in view) is 8 % over the old worst inside, 24 % outside
"The bake's meadow colour per region becomes the body" (4.2)The bake has no one meadow colour: grassColor runs a palette from deep to sunny green by a noiseThe palette is pulled 70 % toward the zone's body, keeping part of a texel's own light and dark (zonePull); zones blend over 160 m past their bounds (zoneBody), since the bake would otherwise show a straight line at a region's border
Tussocks: smoothstep(0.35, 0.6, noise2(…)) (4.3)noise2 is about ± 0.7, so that threshold leaves a tussock on a few per cent of the ground and thins the grass to c0 everywhere elseThe noise is brought to 0..1 first (thresholds 0.42–0.6): tussocks on about half the ground. Candidates are 6.6 a m² so the buffers (4.4) fill
gust.png/wash.png as the reference bytesmake_textures.py draws its lattices from Python's randomThe game builds both at boot from its own hash; same construction, not the same bytes. The wash's channels are stretched to use their range (value noise bunches round its middle)
The wash's hue: cool (0.94, 1, 1.05), warm (1.07, 1, 0.88)Over a field that is 3.3° of hue inside the wall at K = 0.6, under the portfolio's own measure (≥ 6°)Cool (0.87, 1, 1.12), warm (1.15, 1, 0.75): 6° inside (5–95 % of a 128 m field), the value still within ± 0.06 display luma
The wash on all groundRock, snow, sand, paths and heather would wander in hue and go yellow in the dry patchesA weight from the map's own colour (grassy): only grass takes the hue and the dry tint, the rest the value alone. The shader and the JS share it
"A blade's foot is the ground's colour to the byte"The fill read the map's nearest texel; the ground's sampler reads fourThe fill reads the map bilinearly, as the sampler does; the match is to the eye, not to the byte (the fill's bytes are 8-bit linear, the lighting differs by the normal's two bytes)
windGust keeps its direction's axesThe axes turn with the wandering wind (± 23°), and far from the origin the whole field would swing sideways at up to 20 m/s (the sines did too, unseen)The field's axes are fixed (the base direction); what leans follows the wandering direction
RG8 texture for the gustRGBA8 (128 KB more), with mips for the ground and the water far off; a vertex reads level 0
Alpha sharpened by its derivative in the card shader (4.5)three's node material already does that when alphaToCoverage is onNot repeated
Mips that keep the base level's coverage, built by build.mjs (4.5)The KTX2 encoder builds its own mipsThe card's alpha is lifted 25 % a mip level in the shader instead (the level from two derivatives)
Seven vertex buffers: position, aT+aPart as one vec2A head's rim needs its place on the headaT is a vec4 (t, part, rim x, rim y): still seven buffers
A tuft's lean (section 5) has no home in the instance tablePacked with the dab's size in aBloom.a (four bits each)
drawRange on an indexed InstancedBufferGeometry (to verify)three 0.186 RenderObject.getDrawParameters honours it for indexed draws; the far chunks draw three blades in the stillsUsed as proposed
Region rows "eased across a border by the look value and the drift of the bake's colour"A chunk reads the row at its four corners and eases between; the look mixes Hjemdalen's row with the region's at each tuft

Choices

  • Zone greens follow eventyrland/zones.json where it names one, as asked: Hjemdalen #7DBB45 (the table here said #6DB33F), Nordalen #6F9A55 (#5E7A43), Fjellfoten #4F7A3A with tips #86A84A (#547246, #7E9060), Sørmarka's dry grass #B8873C (#C09A4C), marram #9AA66A (#8EA078), Alvheim #1F4A50 (#33605A). Tips, gust and dry colours keep their shift from the body. Fjellfoten's moss is then 83 % of Hjemdalen's saturation, over the 55–70 % this portfolio asks of outside. Alvheim's baked ground keeps its own moss from the game's De-slop 15; its row sets the tufts' tips, wind and width only.
  • Outside meadows are fuller than the table (the orchestrator's review of the first after-stills: sparse pale wires on a dark, bare-looking ground; the targets show a brushed body of grass with the ground hidden near her). Densities 6.0 a m² in Nordalen, Sørmarka and Blomsterenga, 5.0 in Sørvika, 4.5 in Fjellfoten, 2.4 on Fjellet (4.0, 4.4, –, 3.0, 3.2, 1.6 here); the buffers hold 6.0; a chunk outside is drawn whole only to 10 m and thins to a quarter at 26 m (inside as before: whole to 22 m, 40 % at 40 m), which keeps the triangles in view where they were (65 100 outside against 61 600 before, mean; 94 900 against 76 700 at worst). Tussocks keep 0.45 of the candidates between them on both sides of the wall (0.2 outside here).
  • Tufts are wider than the table: 1.25–1.75 inside (0.9–1.3 here) and 1.4–1.9 outside (0.7–1.1 here). At the table's widths a tuft was a spray of wires, and at level 2 the paint pass's smear left nothing of the blades (iter/round1/nordalen--13-cam-paint.png). Outside a blade is then up to 5.9 cm at half height: over section 4.3's rule (3.5 cm, "too thin for ink" beyond 3.9 m) within about 6.5 m. Not checked with ?look=paint after the widening: if ink shows on near blades, the rule and this width cannot both stand.
  • Tips outside stay near the ground's colour: 40 % of the way to the zone's tip (75 % here and inside), the foot × 0.9 (0.78 here), no shade on the ground under the blades outside (inside half of the foot's shade; all of it here). At 75 % and 0.78 the tufts were straw on dark green. The dry patches, the seed grass and a gust's band still turn the tips.
  • The bake never darkens the field: the pull toward a zone's body keeps a texel's own luma as a floor (a muted body is greyer, not dimmer). Fjellfoten's deep moss #4F7A3A is therefore its hue, not its value.
  • Blomsterenga has grass of its own (6.0 a m², 0.35–0.55 m) and its drift seed puts a drift at the waystone.
  • Dab flowers: one head a tuft, on up to 45 % of a drift's tufts (two heads on 30–35 % here); 8 % in open grass inside (6 % here). The head is an uneven four-point blot turned by the tuft's own number, since four even points read as a diamond icon; only daisies, anemones, avens and forget-me-nots have the warm eye (on every dab it made them small tiles); none on the moor, where the heather's cards carpet the ground. The small blades and the dab shrink away between 12 and 18 m, before their chunk goes to the far range, so the change of range does not pop; dabs therefore end at 18 m, not at 24 m.
  • Drifts in the bake: the tint is 16 % (18 % here) and the speckles 12 % (55 % in the game before). The colour map's texels are about half a metre, so a speckle is a blot a metre across under the sampler: at 55 % and even at 30 % a forget-me-not drift was blue puddles at her feet. The tint carries the far patch.
  • Blomsterenga at 70 % of cells with drifts of 6–14 m is flowers on 46 % of the field; R7 says a third. Built at 5–11.5 m: 33 %.
  • Speckle and dab colours come from the painted cards (build.mjs writes them), not from the list in section 6.
  • Not built: ?flora=0 and ?flora=ab (before and after come from two builds; keeping the old grass alive beside the new one was most of a second system). "No gust tint on the moor" (the gust colour is the zone's, a uniform). Cotton grass round Speilvatnet's wet shore (the reeds stand there). Rings of elf flowers round Alvheim's old trees (the ring round the moonwell and the ribbons along the ways are in). The dandelion clock's white seeds as their own burst (a puff takes the drift's colour, so a white drift gives white). Slot 3 of the pushers has a setter and no caller yet.
  • Open question 3 (violet and rose as accents in the paint pass) was not touched: paint.ts is unchanged.

The cards

All 32 are new sprays. Five are this portfolio's own samples (card-in-lupin-v2, card-in-daisy-v2, card-out-globe-v2, card-out-harebell-v2, card-out-cotton-v2), 27 were painted for the game with the blocks in prompt-blocks.md (gpt-image-2.5 sunburst through Venice, 1024², seed 8101, one image each: 27 of the 40 allowed). Cut-outs: the mask from zap's BiRefNet-lite (rembg, a local file), the unmix and bleed in the game's pipeline/flora/cut-zap.mjs. The elf bell was painted again without its halo. None was run on Krea 2.

What the paintings show against section 6's rules: stems are 10–16 px at 1024 (2.5–4 px in a cell: at or just under rule 2's 4 px); the inside set kept two or three small leaves low on the stems (inside the tinted 42 %); the outside heather came out as spires of bells, close to the foxglove.

The stills, and what they show

before/ is main at a364902 (74 stills), after/ the branch (65), sheets/ the pairs side by side (65) with measures.md. Only nordalen--13-* and blomsterenga--13-* (cam and eye) were shot after the outside tuning; every other outside still (seam, far, gust, fjellet, alvheim, hay, the dusk ones) shows the thinner, paler tufts of the round before it. Not shot for the branch as it stands: the paint-look set but nordalen--13-cam-paint (blomsterenga, hay, gust, far, and nordalen eye, with ?look=paint), ring (the grass round her feet from above), a pinned gust. hay is not the same place before and after and should be left out.

Against the rules, from the stills: R1 holds outside (the luma inside a 64 px window of meadow is 48–55 % of before's in Nordalen and Blomsterenga) and is not shown by that measure inside (the meadow spot is in a tree's shade, with chunky tufts: 0.033 against 0.023); R2 holds by construction; R3 holds (hue spreads 13–22° over the outside fields, the value within the band); R7 and R8 hold where a drift is in view (one kind to a drift, cards in threes, dabs beyond them, a soft patch in the ground far off); R10 holds in far (the wash and the dry patches carry the field, faint drift patches); R12 shows in seam; R13's dusk stills keep their green (the darkest grass pixel is 0.19–0.20 where it was 0.07–0.12). Not shown in a still: R6 (a gust's front: gust shows a pale band, not a pinned front), the pushers (push shows her running on short grass; the ring is not visible there), R5.

Owed

  • GPU time on the Mac and the iPad (the game's docs/flora.md, "Cost, and what is owed after the flora lift").
  • The measures of section 7 that need a GPU or a pinned gust; the ones taken from the SwiftShader stills are in a local file.