cntrl/docs/ENV_ENHANCEMENT.md
dandovlatov ab4a16185d Baked set dressing into static meshes and tripled the prop density
Dressing bakes alive props into one DrawMesh per batch at init, rebuilt only on blasts. Adds 180 non-solid Decor props to Floor 01 (153 -> 333 total). Drops draw calls 95 -> 81 with no measurable GPU-time increase. Baked props give up paper sway and hard shadows; ramp is rebound after the batch so actors keep their shading.
2026-11-25 06:10:09 +04:00

38 KiB
Raw Blame History

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]
S16 Bigger floor + open-plan room 260 × 260 m arena with shared pillar anchors, red approach runners, eight-piece Blender furniture kit (desks, meeting table, chairs, computers, plants, sofas, lamps, partitions) dressed into a Control-style research room, live camera dev slider DONE [B][G]
S17 Rigged reference agent ~6k-tri player model built from the Control reference art (yellow helmet, glowing respirator, sage coveralls, harness, radio, boxy angled rifle with red rounds), 19-bone Blender armature, Idle/Run/Dash/Fire/Stagger actions, skinned GLB playback in game DONE [B][G]
S18 Projector-screen blackout kit 20-table red-phone grid prop, translucent case panes, plinth/posts and yellow Board roof; alpha-blended glass in the actor shader and a black-room presentation pass DONE [B][G]

S0 — Light, surface & post pass [B][R]

Goal: kill the "starter render" tells — hard edges, even lighting, clean frame.

  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • Dust motes — ~70 seeded emissive micro-voxels in the air. Accept: visible sparkle in light pools, deterministic per seed.
  • 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".

  • Hotline — red phone on a side table, faint red glow (left, near far wall).
  • Benicoff TV — boxy TV on a stand, dark emissive screen (right of the door).
  • Service Weapon pedestal — concrete plinth, angular dark weapon form, white inlay glow (left of the carpet cross).
  • Rubber Duck under glass — plinth + duck + transparent case (right of the carpet cross) — the joke that sells the tone.
  • Security desk — desk + monitor + papers + chair (front-left, the guard's post).
  • Filing cabinets — row along the right wall with drawer seams.
  • Scattered redacted papers — ~24 seeded scraps on floor/desk.
  • 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).

  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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]

  • 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).
  • 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.
  • 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.

  • 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.
  • Export pipeline — GLB per actor into assets/models/, source scene in assets/blender/fbc_enemies.blend, concept frames in docs/concept/.
  • 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.
  • 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.
  • 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.

  • 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.
  • 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.
  • 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]

  • 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.
  • 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.
  • 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.
  • 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.

  • 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.
  • 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.
  • Procedural motion — saturated (corrupted) vertices jitter at high frequency in the vertex stage; the guard breathes. No skeleton needed.
  • Guard ink outline — expanded back-face hull (one extra draw call) for the guard / future bosses only; the horde keeps the cheap rim.
  • 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.

  • 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.
  • 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.
  • 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).
  • Budget asserts — the build script prints and enforces per-actor caps before export; importlib.reload keeps edits to the kit live in Blender.
  • 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.

  • 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.
  • 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.
  • 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.

  • 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.
  • No detached aura — deleted the hiss_shell 3D blob shader and the draw_shell path. CorruptionAura is back to ground emitters only.
  • 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.
  • 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]

  • 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).
  • Grade — cool shadows / warm highlights with a slight red lift, on top of the existing corruption-keyed scanlines, noise and aberration.
  • 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.
  • Stronger rot — bigger/denser black spurs and tendrils, brighter rot_vein palette; Staff 2,126 / Brute 3,014 tris.
  • Denser dressing — extra crates, left-wall cabinets and floor-level debris near the centre; carpet cross and combat lanes stay clear.
  • 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]

  • 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.
  • 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.
  • Stagger — enemy-only recoil rotates the whole body around the hips plus a short nervous shake; reuses the existing hit-flash impulse, no new sim state. The player never gets this recoil — hits must not look like a movement freeze.
  • 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.
  • 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.
  • 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]

  • 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.
  • 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.
  • 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.
  • 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.
  • 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.

S16 — Bigger floor + open-plan room [B][G]

  • Scale — GameConfig::arena_half 26 → 130 (52 m → 260 m square). src/render/layout.hpp holds the central and outer pillar anchors shared by the merged concrete mesh and the presenter; spawn annulus widened to 22–34 m, camera margin raised to 8 m, light strips extended across the slab.
  • Room — teal-grey carpet island at (-62, 52), 76 × 56 m, low partitions with a wide entrance, signal-red approach runner from the hub, tile seams and pooled task light. Workstation rows, meeting table, lounge, plants and storage fill the space without occluding the tactical view.
  • Blender kit — build_room_props.py sculpts nine one-mesh GLBs (desk 408, meeting table 312, chair 356, computer 336, plant 410, sofa 576, lamp 364, partition 152, lightswitch 64 tris) with painted COLOR_0; exported to assets/models/props/, lined up in docs/concept/room_props_lineup.png and saved as assets/blender/fbc_room_props.blend.
  • Camera dev slider — draggable FOV / height / forward controls in the HUD (ui::draw_camera_dev, F9 to hide) plus --fov / --cam-height overrides and --room-test for repeatable framing captures.
  • Accept: 1080p --room-test captures at several heights/FOVs; props read at tactical distance; desk footprint scaled 1.35× after a human/table proportion pass.

S17 — Rigged reference agent [B][G]

  • Reference build — build_agent.py sculpts a 5972-tri agent (vs. 2898-tri Brute / ~2k others) with a worn yellow helmet, gas mask with a bright orange visor and filters, pale sage coveralls, harness pouches, shoulder patch, radio and a boxy Service Weapon carried across the chest with flat red rounds in the muzzle brake. Painted COLOR_0, one merged mesh, feet at origin, facing -Y in Blender.
  • Real rig — 19-bone armature (root/hips/spine/chest/neck/head/weapon, arm and leg chains) with painted hard weights and small joint blends; baked Idle (48f), Run (36f), Dash (18f), Fire (16f), Stagger (20f) actions.
  • Integration — assets/models/agent.glb is skinned; ModelBank loads/validates the clips, Presenter selects Idle/Run/Dash/Fire from sim state, and raylib CPU skinning feeds the existing actor shader. The baked Stagger action is unused: damage only tints the player, so enemy contact never interrupts movement or the walk cycle.
  • Accept: 1080p close-ups and bot captures show the reference silhouette and two distinct run frames; no shader changes needed for the horde.

How to run

# 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/build_room_props.py").read())
exec(open("/home/dandovlatov/Documents/cntrl/tools/blender/build_agent.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-25 (dressing density): destructible set dressing is now baked into two static meshes at init (one DrawMesh per batch instead of one DrawModelEx per prop per pass), rebuilt only when a blast destroys props. Added 180 non-solid Decor props to Floor 01 (153 → 333 total; 215 dressing), keeping the plaza carpet cross and combat lanes clear. Bot captures show ~6x the props with 95 → 81 draw calls and unchanged GPU time; baked props give up paper sway and hard shadows. See docs/VISUAL_DRESSING_INVESTIGATION.md.
  • 2026-11-24 (S18): built phone_table.glb (746 tris, red handset/dial/cord), case_frame.glb (176 tris, brass plinth/posts and yellow roof) and case_glass.glb (64 tris, four panes) in Blender via the reproducible tools/blender/build_blackout_props.py; concept lineup rendered to docs/concept/blackout_props_lineup.png. Added uAlpha to the actor shader so the exported glass draws translucent in-engine, and a black-room presentation pass with a dedicated overhead camera. See docs/BLACKOUT_RITUAL.md.
  • 2026-11-23 (S17): replaced the procedural-only guard with a reference-based agent.glb: 6.2k tris, 19-bone armature, five baked actions, CPU-skinned by raylib through the existing actor shader. Verified with close and bot captures.
  • 2026-11-23 (S16 polish): critical-lens pass — default camera lowered to 16 m / 15 m forward / fovy 55 for readable actors and furniture, 16 mid-field pillars plus survey/cable lines, scuffs, papers and light pools across the far slab, rugs and wall strips in the open room, darker wood and brighter teal screens on the Blender kit, and a real switch.glb so the lightswitch ritual no longer falls back to a cube. Re-verified with room/bot captures.
  • 2026-11-23 (S16): scaled the sim arena 5× (260 m square), added the shared pillar/room layout header, extended the outer band and light strips, and built the open-plan Research room with a Blender-authored furniture kit. ModelBank gained eight GLB props with fallbacks; the HUD gained the camera dev slider. Bot and --room-test 1080p captures verified framing; desk and meeting-table footprints were enlarged 1.35× after a proportion pass against the 2 m guard.
  • 2026-11-23 (value pass): dropped the concrete albedo from mean 0.51 to 0.416 so the floor sits under the carpet/actors again, and darkened the signal-red carpet in both the game and the diorama (base 150→112 in the game, 0.42→0.26 in Blender). Added carpet detail: worn traffic lanes, panel seams and soft scuff patches (8 in each presenter), keeping the runners readable at tactical camera distance. Re-baked maps, rebuilt scene and re-rendered concept frames.
  • 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/. Follow-up (same day): albedo lifted to 80% of the source value (mean 0.51, light grey) at the user's request; the high-frequency speckle is blurred to stop aliasing/shimmer, the Voronoi crack network is darkened into the albedo so the pattern reads at camera distance, and the derived normal is softened with a broader roughness range for a slick, non-sparkly floor. 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. The bake needs two interpreters: Blender for the Cycles maps, system Python + PIL for process_concrete_maps.py.
  • 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.