cntrl/docs/ENV_ENHANCEMENT.md

475 lines
31 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# FBC: NIGHT SHIFT — Environment Enhancement Slices
Working plan for turning the Blender concept diorama (and later the in-game
presenter) into a full Oldest House environment. `docs/ART_DIRECTION.md` is the
source of truth for *the look*; this file tracks *what's next*, slice by slice,
with acceptance criteria.
Legend: **[B]** Blender scene (`tools/blender/build_scene.py`) · **[G]** game
(`render/presenter.cpp`, M5) · **[R]** render/post only (`render_shots.py`).
## Slice overview
| # | Slice | Adds | Status |
|---|---|---|---|
| S0 | Light, surface & post pass | bevels, floor gloss variation, dead/flickering strips, teal Polaris alcove, threshold-door light spill, dust motes, vignette + chromatic aberration | **DONE** [B][R] |
| S1 | Identity props | Objects of Power (Hotline, Benicoff TV, Service Weapon pedestal, Rubber Duck), security desk, filing cabinets, scattered redacted papers, puddles | **DONE** [B] |
| S2 | Corruption decay layer | glyph particles, chanting-glyph signage, sparks on dead strips, red mist pockets, wall stains/leaks, more floating debris | **DONE** [B] |
| S3 | Standee art v2 | paper grain + halftone, sleeve sheen, new archetypes (Hiss Elevated, Cluster, Taken, Mold Host), boss standee, elite affix rim variants | superseded by S6 (3D actors replaced standees) |
| S4 | Breadth: floors | Oceanview Motel shop diorama (yellow doors, teal carpet), Maintenance/mold variant (green palette) | planned [B] |
| S5 | Game integration (M5 kickoff) | sprite PNGs into `presenter.cpp`, diorama scene dressing, corruption-keyed post shaders, HUD-overlay concept frames | **partial** [G] |
| S6 | Actors in 3D (replaces S3 standees) | Blender GLB actors + lit shader in the game, backdrop/environment polish | **DONE** [B][G] |
| S7 | One concrete material | seamless 2K PBR maps from Blender shared by floor/walls/pillars, triplanar in-engine, merged static mesh | **DONE** [B][G] |
| S8 | Corruption wave FX | SDF billboard aura on Hiss units + reusable fading ground emitter for events/bosses; saved Blender reference scene | **DONE** [B][G] |
| S9 | Stylised look-dev | Blender-generated lighting ramp LUT, gradient-map diffuse + two-tone faction rim + haze in the actor/concrete shaders, procedural Hiss jitter, guard ink outline | **DONE** [B][G] |
| S10 | Sculpted actors v2 | `actor_kit.py` loft/sweep/blob/crystal helpers replace the cube kit; guard 5.7k tris, Hiss Staff 1.9k, Mold 1.4k, Brute 2.9k, point crystal 60 (redesigned 2026-11-23); painted AO, asserted budgets | **DONE** [B][G] |
| S11 | Props / OoP kit | Seven sculpted set pieces (Hotline, Benicoff TV, Service Weapon pedestal, Rubber Duck, cabinet, crate, floating debris) at 0.3–0.9k tris, dressed into the in-game arena | **DONE** [B][G] |
| S12 | Hiss rot, not rings | Removed baked red base rings and the detached SDF/3D aura blobs; black rot with red fissures is baked into the human Resonant models and animated by the actor shader | **DONE** [B][G] |
| S13 | Post, framing, dressing | Half-res bright-pass + separable bloom, teal-shadow/warm-highlight grade, wide tactical camera, bigger attached rot, denser centre dressing | **DONE** [G][B] |
| S14 | Actor animation & sparks | Shader-side rigs (walk + stagger, blob squash, crystal shimmer) for guard, Hiss units, Mold and shards; idle motion for OoP props; pooled camera-facing sparks | **DONE** [G] |
| S15 | Polish pass | Desaturated Mold, outlined Hiss units, clamped camera + dressed outer service band, dimmed glare, crisp HUD, floor decals, carpet seams, gentle contrast grade | **DONE** [G][B] |
## S0 — Light, surface & post pass [B][R]
Goal: kill the "starter render" tells — hard edges, even lighting, clean frame.
- [x] **Bevel pass** on all box kit (walls, pillars, beams, door, props) —
chamfers catch light. *Accept: no un-beveled box edge > 9 cm thick in the
ENV collection; thin decals excluded.*
- [x] **Floor gloss variation** — noise-driven roughness (0.08–0.30) so
reflections break up like sealed concrete. *Accept: strip reflections
visibly widen/narrow across the slab.*
- [x] **Dead / flickering strips** — one wall strip and one beam strip dark
(sector failing per the art doc), one strip hanging loose.
*Accept: at least 3 non-lit or misaligned fixtures visible.*
- [x] **Teal Polaris alcove** — 4th palette entry (`#4ec9b0`) on the left wall:
dark recess + teal glow panel + teal light. *Accept: teal present in hero
frame without stealing focus from red.*
- [x] **Threshold-door light spill** — red glow decal + red area light washing
the carpet out of the doorway. *Accept: carpet reads red→black gradient
toward camera from the door.*
- [x] **Dust motes** — ~70 seeded emissive micro-voxels in the air.
*Accept: visible sparkle in light pools, deterministic per seed.*
- [x] **Post pass on renders** — compositor: bloom (done), chromatic
aberration (lens dispersion), vignette. *Accept: corners ≥ 25% darker
than center mean; aberration subtle at edges only.*
## S1 — Identity props [B]
Goal: the frame must say *Oldest House*, not "brutalist lobby".
- [x] **Hotline** — red phone on a side table, faint red glow (left, near far wall).
- [x] **Benicoff TV** — boxy TV on a stand, dark emissive screen (right of the door).
- [x] **Service Weapon pedestal** — concrete plinth, angular dark weapon form,
white inlay glow (left of the carpet cross).
- [x] **Rubber Duck under glass** — plinth + duck + transparent case (right of
the carpet cross) — the joke that sells the tone.
- [x] **Security desk** — desk + monitor + papers + chair (front-left, the
guard's post).
- [x] **Filing cabinets** — row along the right wall with drawer seams.
- [x] **Scattered redacted papers** — ~24 seeded scraps on floor/desk.
- [x] **Puddles** — 3 dark glossy discs near walls for reflection interest.
*Accept (group): hero frame contains ≥ 6 recognizable prop silhouettes;
nothing clips the carpet runners or standee sightlines.*
## S2 — Corruption decay layer [B]
Goal: the House decaying in real time — the art doc's "best part", previously
~10% realized (red slabs + red strips only).
- [x] **Hiss glyph particles** — floating red glyph quads (tiny bar clusters)
drifting up near corrupted areas. Three seeded rune sprites, 174 quads in
six clusters (door, Hiss pools, dead strip, far-wall posters), keyframed to
drift 1.1–1.9 m over frames 1–120; scene parked at frame 45.
- [x] **Chanting-glyph signage** — one wall sign half-converted: redaction bars
tilted/replaced by red glyph bars. Left far-wall poster + the main FBC sign
above the threshold carry tilted emissive glyph bars and rune decals.
- [x] **Sparks on dead strips** — small warm emissive bursts under the dead
fixture + a red-tinted pool below it. Under the dead ceiling strip (y=-6)
and the dead far-wall strip (x=-8.5), each with a red floor spill.
- [x] **Red mist pockets** — 2–3 low-density red volume boxes near walls/door:
doorway, right wall and left wall (moved off the centre lane so standees
stay readable); low emission so they glow without flattening the frame.
- [x] **Wall stains & leaks** — dark grime decals under strips and at wall
bases, a drip stain under the ceiling beams, plus four red seepage drips.
Grime uses a noise-driven alpha so the patches break up instead of reading
as rectangles.
- [x] **More floating debris** — 6 extra slabs at floor level (not just
ceiling), one intersecting the pillar at (15, -15); two use the bright
Hiss material and sit near the door cluster.
- *Accept: decay clusters around the door, dead fixtures and Hiss pools while
carpet lanes and standees stay readable; no clipping and no uniform "Christmas"
scatter. A/B at matched low-res settings: strict red-dominant 28.3% → 37.2%,
p95 0.382 → 0.515, clipping 0%.*
## S3 — Standee art v2 [B]→[G]
- [ ] **Card treatment** — paper grain + halftone dots + sleeve specular
streak; slight card bend (2-segment warped quad).
- [ ] **New archetypes** — Hiss Elevated (mid-teleport afterimage), Hiss
Cluster (stationary spitter), Taken (near-black + white rim — the
crossover), Mold Host (tanky), Threshold Creature.
- [ ] **Boss standee** — 2–3× screen height (Former hand or Hiss-Marshall),
per the art doc.
- [ ] **Elite affix rims** — Resonant (ring), Phasing (afterimage), Volatile
(flicker), Shielded (shell), Mending (green halo) as sprite variants.
- *Accept: ≥ 8 distinct silhouettes readable at hero distance; boss reads from
the far wall.*
## S4 — Breadth: floors [B]
- [ ] **Oceanview Motel shop diorama** — yellow doors, teal carpet, dim
bedside lamps: the reroll shop, iconic and cheap.
- [ ] **Maintenance/mold variant** — tight corridor, pipes, green mold blooms,
sickly green light (exercises the mold palette).
- *Accept: each variant is a named collection the camera set can be pointed at;
palette per art doc stays consistent.*
## S5 — Game integration — M5 kickoff [G]
- [x] Wire `assets/sprites/*.png` into `render/presenter.cpp` (sprite standees
via `DrawBillboardRec`, per-archetype textures, hit-flash tint; missing
art degrades to the soft-disc standee; manual back-to-front sort + blob
shadows kept).
- [x] Diorama scene dressing in the presenter: polished-concrete palette, red
carpet runners, pillar red bands + bases, threshold door with Hiss glow +
hazard stripes, EXIT signs, curb light strip, painted walkway lines.
- [x] Corruption-keyed post shaders (`assets/shaders/post_fx.fs`): VHS scanlines
+ noise, chromatic aberration, red Hiss tint, vignette, damage flash —
all scaling with `game.corruption.value()`; frame renders to a
`RenderTexture` in `main.cpp`.
- [ ] World-anchored damage numbers/health bars styled as form fields (needs
the OFL fonts — lands with the fonts milestone).
- [ ] HUD-overlay concept frame: containment gauge + HP/XP form fields
composited over a Blender render — the "UI as bureaucracy" money shot.
- *Accept: 60 s `--bot` run looks like the concept frames at gameplay scale —
met for scene + standees + post; UI styling pending fonts.*
## S6 — Actors in 3D [B][G] *(replaces S3)*
Goal: retire the 2D standee cards; every unit is a low-poly but detailed puppet
that lives in the diorama's depth buffer.
- [x] **Actor library** — `tools/blender/build_enemies.py` builds the guard, Hiss
Corrupted Staff (reaching arm + crystal growths + floating shards), Mold
Spore (lobed caps, tendrils, drifting spores), Hiss Brute (pauldrons, core,
spines, gauntlet) and Resonance Shard. 136–1392 triangles each; origins at
the feet, facing +Z in engine. *Accept: five distinct silhouettes in the
`enemy_lineup.png` turnaround.*
- [x] **Export pipeline** — GLB per actor into `assets/models/`, source scene in
`assets/blender/fbc_enemies.blend`, concept frames in `docs/concept/`.
- [x] **In-engine lighting** — `assets/shaders/actor.{vs,fs}`: facet key/fill,
fluorescent rim, emissive-resin treatment for the saturated Hiss/Board/
Polaris palette, corruption bleed in shadows, per-actor hit flash.
- [x] **Presenter integration** — `ModelBank` draws 3D actors for player and all
enemies, spins XP shards, keeps blob shadows and camera-facing glows for
projectiles only. Missing GLBs degrade to primitive shapes, never cards.
- [x] **Framing / set dressing** — fovy 45 at 14m height, curb-height fluorescent
strips (a real ceiling occluded the tactical camera), Hiss light pools,
pillar signage, grime patches, tightened carpet runners, gentler chromatic
aberration.
- *Accept: `--bot --no-damage --screenshot` shows readable lit actors at gameplay
scale with the red/paper/navy palette intact.*
## S7 — One concrete material [B][G]
Goal: replace flat grey boxes with a believable, reused surface — without
multiplying draw calls.
- [x] **Maps** — `tools/blender/build_materials.py` generates seamless 2K
albedo / normal / roughness maps from periodic fBm + noise-warped Voronoi
pores: mottled `#2b2b2f` base, fine aggregate grit, uneven sealer gloss.
Saved to `assets/textures/concrete/`, source library `fbc_concrete.blend`.
- [x] **One material everywhere** — `build_scene.py` imports `apply_concrete()`
so walls, pillars, beams and the polished floor of the diorama use those
same maps. In-engine `ConcreteMaterial` draws floor, curbs, pillars, pillar
bases and the door frame from a single merged static mesh with one shader.
- [x] **Triplanar shader** — `assets/shaders/concrete.{vs,fs}` samples all three
maps in world space with normal-weighted blending (no stretched UVs on
differently sized boxes), tangent-detail perturbation, sealed-floor
specular sheen (vertex alpha carries the polish factor) and corruption
bleed in the shadows.
- *Accept: `--bot --no-damage --screenshot` shows visible grain/roughness on
floor and pillars with the palette intact; 22 concrete boxes cost one draw
call; missing maps fall back to the old flat colours.*
## S8 — Corruption wave FX [B][G]
- [x] **No more orbiting shards** — the six/seven static red octahedra around
Hiss Staff and Brute are gone; attached crystal growths and the darkened
base rings remain. Actors dropped to 866 / 1252 triangles.
- [x] **Unit aura** — `assets/shaders/aura.{vs,fs}` is a pure SDF (radial body,
breathing ring front, ragged silhouette) on one camera-facing quad per
Hiss unit. Near-black to dark-crimson, keyed to corruption. Fixed a
row/column transpose in the billboard transform that had been dropping
the quads onto the floor.
- [x] **Reusable scene wave** — `CorruptionAura::spawn_ground(pos, radius, life,
phase)` pushes a flat, fading XZ decal using the same material/draw call
path. Tier-ups emit one at the player; the API is ready for boss entrances
and other events. Up to 16 concurrent waves.
- [x] **Saved for reuse** — `tools/blender/build_wave.py` saves an animated node
material mirroring the SDF in `assets/blender/fbc_corruption_wave.blend`
with a preview in `docs/concept/corruption_wave.png`.
- *Accept: enemies carry a subtle dark-crimson aura without floating shards;
ground waves fade smoothly and can be spawned from any event.*
## S9 — Stylised look-dev [B][G]
Goal: Risk of Rain 2's graphic shading language in Control's graphite palette,
without adding draw calls or giving up the deterministic Blender pipeline.
- [x] **Lighting ramp LUT** — `tools/blender/build_lut.py` generates a 256×4
gradient map (`assets/textures/actor/actor_ramp.png`): cool blue-grey
shadows → warm pale highlights with a gentle shoulder. *Accept: generated
from Blender, byte-exact reproducible, sampled by the in-engine shader.*
- [x] **Actor shading** — `actor.{vs,fs}` now use half-Lambert through the ramp,
a faction-tinted fresnel/ceiling rim (cold fluorescent for the guard, red
for Hiss, green for Mold), a tight bevel sheen, distance haze and the
existing corruption bleed / hit flash. Emissive resin and palette stay.
- [x] **Procedural motion** — saturated (corrupted) vertices jitter at high
frequency in the vertex stage; the guard breathes. No skeleton needed.
- [x] **Guard ink outline** — expanded back-face hull (one extra draw call)
for the guard / future bosses only; the horde keeps the cheap rim.
- [x] **Room shading** — `concrete.fs` uses a matching analytic ramp, explicit
camera position (raylib 6.2 does not auto-bind `cameraPosition`) and the
same haze, so actors and architecture read as one scene.
- *Accept: `--bot --no-damage --screenshot` shows lit, readable actors; no new
draw calls for enemies; ramp binds through a material texture slot because
raylib only binds ad-hoc sampler textures for 2D batches.*
## S10 — Sculpted actors v2 [B][G]
Goal: leave the chamfered cube kit behind — RoR2's chunky-but-polished,
holistic silhouettes built from continuous surfaces rather than stacked boxes.
- [x] **Actor kit** — `tools/blender/actor_kit.py` provides `loft` (stacked
cross-sections with fold modulation), `tube` (swept tapered limbs/fingers),
`blob` (noise-deformed icospheres), `crystal` (irregular bipyramids),
`plate` (tapered extruded armour) and `ring`, all painting linear RGB and
painted AO into one `COLOR_0` attribute. *Accept: one merged mesh /
material per actor, same GLB path as before.*
- [x] **Guard ~5.7k tris** — sculpted head/cap, folded cloth torso, armoured
vest, straps, pouches, articulated sleeves/gloves, tapered legs, boots
with laces, sculpted Service Weapon and restrained Hiss taint on the back.
- [x] **Enemies 1.4–2.9k tris** — Hiss Staff (torn wind-swept shroud, reaching
arm with crystal-tipped claws), Brute (layered plate, core, crystal
spines), Mold Spore (lumpy mass, tendrils, glowing sacs), Shard (154).
- [x] **Budget asserts** — the build script prints and enforces per-actor caps
before export; `importlib.reload` keeps edits to the kit live in Blender.
- [x] **Turnarounds re-rendered** — `enemy_lineup.png` / `enemy_detail.png`
regenerated from the rebuilt `.blend`; in-game bot screenshot validated.
- *Accept: no box silhouettes in the lineup; all GLBs load with the existing
shader; triangle counts inside the agreed 1–3k enemy / ~6k hero budgets.*
## S11 — Props / Objects of Power [B][G]
Goal: the in-game arena should carry the same recognizable Oldest House props
as the Blender diorama and the reference art, without touching the simulation.
- [x] **Prop kit** — `tools/blender/build_props.py` builds seven sculpted GLBs
with the actor kit: Hotline (846 tris), Benicoff TV (484), Service Weapon
pedestal (402), Rubber Duck under a brass frame (926), filing cabinet
(504), supply crate (336), Hiss-corrupted floating slab (492). Each is
one merged mesh / material, painted AO, asserted budget.
- [x] **Arena dressing** — `presenter.cpp` places them at fixed perimeter and
carpet-side spots that keep the combat lanes clear; slabs bob and rotate
slowly above the playfield. The sim is untouched.
- [x] **One pipeline** — props extend `ActorModel` / `ModelBank`, so they reuse
the gradient/rim/haze actor shader, the Blender ramp LUT and the existing
fallback path; no new shader or draw path.
- *Accept: bot screenshots show recognizable OoP silhouettes at gameplay scale
with the grey/red palette intact; 60 FPS held in a horde.*
## S12 — Hiss rot, not rings [B][G]
Goal: the red ground rings and the detached dark-red aura blob read as UI
markers / decals rather than Control's corruption creeping out of a body.
- [x] **No more rings** — removed the baked red tori from Hiss Staff, Brute and
Mold GLBs (the guard keeps its yellow player marker). The bright SDF ring
front in `aura.fs` was also darkened; ground waves are event-only now.
- [x] **No detached aura** — deleted the `hiss_shell` 3D blob shader and the
`draw_shell` path. `CorruptionAura` is back to ground emitters only.
- [x] **Corruption on the body** — `build_enemies.py:hiss_rot()` grows black
crystal spurs, sweeping tendrils, dark resin masses and red veins directly
out of the Hiss humanoids' shoulders/back/torso, all part of the single
merged actor mesh. Staff 2,070 / Brute 2,968 tris, inside budget.
- [x] **Animated by the existing shader** — the rot palette is dark-red with
enough saturation to cross the actor shader's Hiss jitter threshold, so
the growths writhe with the unit instead of floating as a separate FX.
- *Accept: turnaround and bot frames show corruption attached to the human
models; no red rings or detached halos around enemies.*
## S13 — Post, framing, dressing [G][B]
- [x] **Bloom** — `bloom_bright.fs` + `bloom_blur.fs` run a thresholded bright
pass and a separable 9-tap blur on half-resolution render targets in
`main.cpp`; `post_fx.fs` composites `texture1` before the vignette.
Verified with an exaggerated-strength A/B screenshot that the sampler is
bound (raylib only binds ad-hoc samplers reliably in the 2D batch path).
- [x] **Grade** — cool shadows / warm highlights with a slight red lift, on top
of the existing corruption-keyed scanlines, noise and aberration.
- [x] **Camera** — tried fovy 40 / height 11.5 for detail readability, then
reverted past the original framing to the final wide tactical view:
fovy 48, height 18 / offset 14. Horde awareness wins over model detail.
- [x] **Stronger rot** — bigger/denser black spurs and tendrils, brighter
`rot_vein` palette; Staff 2,126 / Brute 3,014 tris.
- [x] **Denser dressing** — extra crates, left-wall cabinets and floor-level
debris near the centre; carpet cross and combat lanes stay clear.
- [x] **Blowout fix** — emissive boost 0.42→0.20 and a darker `mold_glow`, so
the horde doesn't clip under bloom.
- *Accept: 8 s and 25 s bot screenshots show readable actors, visible glow on
strips/crystals and no clipped white mold masses.*
## S14 — Actor animation & sparks [G]
- [x] **Limb rig, no skeleton** — glTF drops vertex-colour alpha here, so
`actor.vs` classifies limbs from model-local position (`uRig` =
hipY / shoulderY / legX / armX, `uRigScale` per actor type). Legs swing,
arms counter-swing, torso bobs. One draw call per actor, no GLB rebuild.
- [x] **Actor by actor** — guard first (walk from actual frame-to-frame motion,
stagger from hit flash), then Hiss Staff / Brute (walk from `e.speed`,
stagger + phase from `hit_flash` / `bob_phase`). Mold, shards and props
keep `uRigScale = 0`; the guard's yellow base ring is excluded by radius
so it stays planted while the legs move.
- [x] **Stagger** — recoil rotates the whole body around the hips plus a short
nervous shake; reuses the existing hit-flash impulse, no new sim state.
- [x] **Mold & shards** — `uRigMode` 2 gives Mold a height-weighted squash /
stretch jelly wobble (amplitude scales with `e.speed`) and a hit recoil;
mode 3 gives Resonance shards a normal-direction facet breath, driven by
the shard's world position as phase alongside the existing spin.
- [x] **Props** — Hotline rings (small yaw wobble + bob), Benicoff TV flickers,
Pedestal breathes, Rubber Duck bobs/tilts, floor debris drifts and turns.
Cabinets and crates stay planted — furniture should not wiggle.
- [x] **Light particles** — `Spark` pool in `Presenter` (160 max) spawns on
`EnemyHit` / `EnemyKilled` / `PlayerDamaged` / `TierUp`, with gravity,
drag, ground bounce and alpha fade. Drawn as camera-facing glows in the
3D pass, post FX applies to them as well.
- *Accept: close crop of an 8 s bot run shows alternating guard feet, a recoiling
Hiss Staff and a bright hit spark; build clean, rig adds no draw calls and
sparks are short-lived billboards from the existing glow sprite.*
## S15 — Polish pass [G][B]
- [x] **Mold in the House** — `actor_kit.py` Mold palette desaturated from neon
lime (`#7fae55` / `#8fc95f`) to sickly olive (`#556b4e` / `#78906b`);
actors re-exported with budgets unchanged. The horde no longer clips as
green glow against the graphite/red room.
- [x] **Readable enemies** — guard ink outline extended to Hiss Staff and
Brute (Mold keeps its own silhouette); colder guard rim. One extra cheap
outline pass per Hiss actor, ~1 FPS cost at 60 enemies in the bot run.
- [x] **Camera / arena edge** — camera target clamped 5 m inside the curb and
the outer service band dressed with plant blocks and dim light pools, so
hugging a wall no longer reveals an empty unlit void. Door lintel and
fluorescent strips dimmed — no overexposed white bar in the foreground.
- [x] **Cleaner image** — HUD-critical aberration roughly halved and VHS noise
reduced; gentle S-curve + 5% exposure lift in `post_fx.fs`. Text stays
legible at high corruption.
- [x] **Ground detail** — faint toner/scorch decals, redacted paper scraps,
cable runs and carpet panel seams; furniture and tactical lanes untouched.
- *Accept: 8 s and 25 s bot screenshots — composed centre-frame guard, outlined
Hiss units, muted Mold, clean HUD and no arena-edge void.*
## How to run
```python
# inside Blender:
exec(open("/home/dandovlatov/Documents/cntrl/tools/blender/build_scene.py").read())
exec(open("/home/dandovlatov/Documents/cntrl/tools/blender/build_enemies.py").read())
exec(open("/home/dandovlatov/Documents/cntrl/tools/blender/build_materials.py").read())
exec(open("/home/dandovlatov/Documents/cntrl/tools/blender/build_lut.py").read())
exec(open("/home/dandovlatov/Documents/cntrl/tools/blender/build_props.py").read())
exec(open("/home/dandovlatov/Documents/cntrl/tools/blender/build_wave.py").read())
exec(open("/home/dandovlatov/Documents/cntrl/tools/blender/render_shots.py").read())
```
Renders land in `docs/concept/`, the scene in `assets/blender/`, sprites in
`assets/sprites/`. Validation: luminance/contrast stats + ASCII luminance and
red-dominance maps per render; hero targets — p5/p50/p95 ≈ 0.10/0.29/0.51,
clipping < 0.5%, red-dominant 15–25%.
## Status log
- 2026-11-23 (concrete material): swapped the in-house procedural concrete set
for maps baked from the CGTrader **"Concrete material"** by KirillP
(`ConcreteMaterial.blend` in the repo root, Royalty Free / no AI — free for
commercial game use, source must not be redistributed as a standalone asset).
`tools/blender/bake_cgtrader_concrete.py` torus-maps the source's 4D
Noise/Musgrave/Voronoi to a seamless tile, bakes albedo + height, derives a
seamless normal from the two bump signals, and remaps roughness before writing
3 x 2K PNGs to `assets/textures/concrete/`. Albedo is tinted to the graphite
palette (mean 0.17, matching the old set) so the material's crack network and
fine aggregate read without breaking the look. Game load verified with a
temporary magenta albedo test; diorama scene rebuilt and concept frames
re-rendered. Old generator in `build_materials.py` remains as a fallback.
- 2026-11-23 (shard redesign): enemy point crystals are now small Control-style
Resonance crystals — a slim faceted cyan bipyramid (`#00c4eb`) with a hot
`#40dfff` core and three dark splinters, 60 tris down from the 154-tri yellow
board shard. `build_scene.py:draw_shard()` matches the sprite (smaller quads,
stronger emission) and the in-game drops get a shard-only `uGlow` in
`actor.fs` plus a soft cyan billboard so they read at the tactical camera.
The GLB, actor turnarounds, concept frames and a stationary bot screenshot
were regenerated; no new draw calls beyond one billboard per alive shard.
- 2026-11-23 (S2): corruption decay layer — seeded Hiss rune sprites drifting up
in six clusters, half-converted FBC/poster signage, sparks and red pools under
the two dead strips, emissive red mist pockets by the door/walls, noise-alpha
grime and drip stains, and six floor slabs (one through a pillar). Scene
405 → 651 objects, 246 in the new DECAY collection; hero/game/detail concept
frames re-rendered. A/B verifies the decay adds red (28.3% → 37.2%) and light
(p95 0.382 → 0.515) without clipping. Note: the overall frame is darker than
the old 0.29 median target under Blender 5.3 EEVEE — that predates S2 (A/B
with DECAY hidden shows p50 0.088) and needs a separate lighting pass.
- 2026-11-22 (S15): polish pass — muted the Mold palette, outlined Hiss units,
clamped the camera and dressed the outer service band, cut glare/aberration
so the HUD stays readable, and added floor/carpet detail plus a gentle
contrast grade. Validated with 8 s / 25 s bot screenshots.
- 2026-11-22 (S14): added a shader-side walk/stagger rig for the guard and
human Hiss units, then added blob squash for Mold, facet shimmer for shards
and restrained idle motion for the OoP props — all classified from local
vertex position, no skeleton or new GLB exports — plus a pooled spark system
for hits, kills, damage and tier-ups. Kept the guard's base ring and the
furniture planted.
- 2026-11-22 (S13): added half-res bloom and a teal/warm grade, then replaced
the initially tightened camera with the final wider tactical view;
strengthened the baked Hiss rot, added centre dressing and fixed mold
emissive blowout under bloom.
- 2026-11-22 (S12): removed the enemy base rings and the detached aura/blob FX;
baked animated black Hiss rot (spurs, tendrils, veins) into the human enemy
meshes. `CorruptionAura` now only owns event ground waves.
- 2026-11-22 (S11): built a seven-piece sculpted props/OoP kit in Blender,
exported GLBs and dressed the in-game arena through `ModelBank`; added
`props_lineup.png` and docs. Fixed 3D plate shifts and palette-key lookups.
- 2026-11-22 (S10): replaced the box/chamfer actor kit with lofts, swept tubes,
deformed masses and crystals. Guard 5724, Hiss Staff 1914, Mold 1434, Brute
2898, Shard 154 tris; re-rendered turnarounds and validated in-game. Fixed
inverted loft end-cap winding and made the kit module reload on rebuild.
- 2026-11-22 (S9): added a Blender-generated lighting ramp, gradient-map actor
shading with faction rims, procedural Hiss jitter, a guard ink outline and
matching haze/ramp in the concrete shader. Fixed the LUT pixel-buffer layout
and bound the ramp through raylib's texture-slot path.
- 2026-11-22 (S8): removed the static orbiting Hiss shards, added an SDF
dark-crimson aura on Hiss units (fixed a billboard matrix transpose that had
been laying the quads on the floor), and made the ground variant a reusable
fading emitter for tier-ups / bosses. Saved an animated Blender reference
scene and preview.
- 2026-11-22 (S7): generated one seamless 2K concrete PBR set in Blender,
applied it to diorama walls/floor/pillars and to a single triplanar in-engine
material that draws all 22 concrete boxes in one call. Validated with bot
screenshots — mottled grain on floor and pillars, palette held.
- 2026-11-22 (S6): replaced the 2D standee cards with five Blender-built GLB
actors and a custom lit actor shader; rebuilt the presenter around `ModelBank`,
re-framed the tactical camera and cleaned up the set dressing. Validated with
`--bot --no-damage --screenshot` (lit actors, red/paper/navy palette intact).
- 2026-10-24 (S5): wired the art into the game — sprite standees + diorama scene
dressing + `assets/shaders/post_fx.fs` corruption post chain. Validated via
`--bot --screenshot`: sprites load with correct orientation (card stripe
down), post FX provably active (noise/scanline signature on flat patches),
palette held (red-dominant 18%), frame readable (p50 0.19, clip 0.1%).
- 2026-10-24: S0 + S1 implemented in `build_scene.py`; scene 243 → 405 objects
(119 beveled boxes, 83 prop objects, 70 dust motes, 4 light-spill decals).
Compositor post chain live: bloom → chromatic aberration → vignette.
Concept frames re-rendered (96 samples) and validated — hero: p5/p50/p95 =
0.10/0.30/0.53, clipping 0.15%, red-dominant 15.9%, teal 1.4% (palette now
4/4 in frame); game cam: 0.12/0.34/0.50, red 20.3%; detail: punchy close-up.
Next up (2026-11-23): S4 floor breadth and the font-dependent HUD items in S5;
S2 is done and S3 was retired by the S6 3D-actor switch.