garage44.eu/jeroen/cartopolis

logclone: git clone https://garage44.eu/jeroen/cartopolis.git

.. /docs/notes/crows.md

raw


topic: crows triggers: [crows.rs, "systems::crows", "crows", "birds", "flock", birds_enabled, birds_visible, CrowModel, wingbeat, WingPose] updated: 2026-10-20

Crows over the camera and on its open ground

systems::crows (2026-10-20), the model in cartopolis_geo::agent_models::crow. Asked for as "flocks of low-poly crows flying around and crows on the ground pecking — natural and lively". Under Layers ▸ Life ▸ Birds, on the detail tier's default like Traffic and People.

It is built on the ambient traffic's terms (ambient-traffic.md) and for the same reason: a fixed pool of 78 birds, six shared meshes and one material made at startup, and after that only transforms are written. A group that drifts past 330 m from the camera is placed again near it, never despawned.

The birds are invented; where they come down is not

Crows land only on open ground the paving survey (BGT) names — squares (Paved), footways, car parks, living streets, yards — or on its grass, planting, verges and gardens where the grass layer has not grown blades, and only where the last 30 m of the glide in clears the walls (BuildingColliders::segment_fraction). Outside BGT coverage, or before the cells arrive, no group can land and every group flies — the intended fallback, not a fault. A ground group gives the map 12 s to find ground before it takes to the air instead.

Not on the grass layer's lawns, and that was measured. Its blades are wild grass, 0.38 m jittered to 23–53 cm, and a feeding crow is about 25 cm tall. The first captures (2026-10-20, Noorderplantsoen, CARTO_CROWS_HERE, 4 m up) put a group of seven 7 m in front of the camera on a drawn lawn and showed one dark speck. Flattening the blades round a feeding group would need crow positions in the grass material, which is shared by every patch; not done. City crows forage on squares and paths as much as on grass, so the open ground is no compromise in a street — but in a park the birds are on the paths, not the lawns.

What makes them read as birds

Each of these was a deliberate choice, and each is the first thing to look at if the layer starts to look mechanical:

Not done

No perching on roofs or lamp posts, no avoidance of tall buildings (flocks cruise 18–45 m over the ground, above most Dutch roofs; the Martinitoren is flown through), no night roost.

Calls (2026-10-21)

Asked for as "a subtle crow sound mixed in once in a while, when they are near". Every 7–20 s, if any bird is within 55 m of the camera (straight-line, so the high flock is never heard), one series of 1–3 caws plays at caw_level(distance) — full within 6 m, gone by 55 m, on a square — times 0.35 and the effects volume. A flushed group within earshot gives 2–4 quicker caws at 1.3×. Plain volume, no panning: the client has no spatial listener, and adding one for one sound was not worth the unknowns on Android and the web.

Twelve caws were cut from two CC0 carrion-crow recordings on Freesound (the UK alarm and a German single bird; assets/sounds/LICENSE.md) with ffmpeg on the VPS (installed 2026-10-21 for this; the container has none). None was heard: each was checked as a level against its background and as a spectrogram, which is how a twelfth take showed up as another species. Carrion crow only — American crow recordings, the most common on Freesound, sound different and were not used.

Checking it

ShotMetrics::crows_air / crows_ground count placed birds, on the traffic's "placed, not in frame" terms. Over a square, crows_ground == 0 once the cells have landed means no ground was found — check the paving cells before the behaviour. CARTO_CROWS_HERE=1 puts one group 7 m in front of the camera and circles the big flock just past it, so a capture can be aimed at birds.