growth
Rusticles: the thing on this wreck that is alive.
A rusticle is a hanging column of iron-eating bacteria and their oxide, and on a real wreck it is the only thing that MOVES — it hangs from the plating, sways in the bottom current, and eventually parts under its own weight and falls its whole length. Every shot the wreck slice serves has rusticles in it and every one of them has to be moving.
local Growth = require("deadlight.wreck.growth")
Growth.clump(mesh, seed, count, scale) -- geometry hanging from the ORIGIN
Growth.plan() -- deterministic placement, one per clump
Growth.sway(clump, t) -- the rotation at film time t
They are built as CLUMPS with the hang point at the mesh origin, one entity each, so rotating the entity swings the whole clump the way a real one swings. The slice builds fourteen template meshes and reuses them across sixty-odd placements, which keeps the whole population to one upload per template.
plan() festoons everything the lamps get near: down the whole port side,
sparser to starboard for the wide shots, under the bulwark cap where shot 9 runs
the camera past at deck height, along the torn break for shot 14, and under the
bridge wings for shot 11. Its generator is a private LCG rather than
math.random, because three other slices share this engine and the wreck has to
look the same on every build.
sway is a slow pendulum with a faster flutter on it, so two frames two seconds
apart are never the same picture — and it is a function of film time alone, so
two runs of the film are the same film.
Scoped to this part · feeds back into the world's score.