Turning 117 photographs of rain into generator rules
117 photographs of real rain on glass, analysed drop by drop, became 44 rules for the generator that draws the site’s rain, each carrying the photographs that support it. In one place, how patchy the rain should be, the count disagreed with what I had wanted.
By 4 October the references had grown to a set: 117 photographs of rain on glass, from Wikimedia Commons, Unsplash and Pexels, on free licences, used for study only. None of them ships on the site. The question was what the whole set agrees on.
Each photograph was analysed drop by drop, stream by stream and empty patch by empty patch, into one file per photograph. A reference catalogue then tallies those files. Its counts are photo counts, some from keyword matching and some from manual sorting of free text, and the catalogue says to treat them as plus or minus a few.
Every rule carries the photographs that support it
The catalogue ends with 44 generator rules, and each has the same shape: the rule, the photos that support it, and an importance. Eighteen are marked must, sixteen should, ten nice. “Make specks the majority of drops” carries “87/117 have ≥50% specks”; “Put irregularity on the upper edge” carries about 32 photos against about 12 for the opposite.
The median photograph is 55% tiny specks. The largest static drop is about 4% of the frame width. Only 14 photographs are 80% round or more.
In about 43 photographs the teardrop has its point up. In 88 the optics notes describe an inverted image of the background. A dark rim sits on the top of the drop in 59 photographs and on the bottom in 23, because it follows where the dark part of the scene is refracted.
Two counts of streams appear in these files and they are not the same. The first pass found 117 streams in 30 photographs. The streams were then traced by hand, after an automatic tracer was tried and rejected because it cut streams into rungs, and the count was 233 in 40.
Where the photographs disagree with my critique
The catalogue lists ten contradictions between photographs and what decides each. The one that concerns me most is density. On 2 October, comparing renders with six photographs, I had noted that real rain is patchy: some areas hold far fewer drops and others are more concentrated.
The catalogue says most photographs are uniform (55 or more), and that large empty-looking regions, median about 25% of the frame width, are usually visibility effects: a dark background, low contrast over bright sky, or focus. Real cleared lanes are narrow, about 5% of the width. Hence rule 37: “Do not create large truly dry areas.”
This is not settled. My handover notes of 9 October, written for the next round of work, still list patchy density with empty lanes among my standing critiques. Both can be right if the patches come from what the eye can see and not from where the water is, but that has not been shown on the glass.
The rain gained specks, and a rule about what is not water
A note in the rain code, dated 8 October, says why droplets per drop went up: 157,000 drops traced in the 117 photographs, with tiny specks a third or more of everything on the glass, filling the gaps between the bigger drops. My rain had read too even, like clusters of boils.
Rule 44 says never to reproduce processing artefacts or non-water marks as rain: sharpening halos, HDR ridges, JPEG blocks, scratches, hairs, stickers.
Sources and notes (4)
- Rain reference catalogue — the notes this was written from; also records the 117 photographs' sources, listed in the catalogue's Sources table
- Rain system design — the notes this was written from; also records his reference photos of rain on clear glass, as recorded in the repo
- Rain types code — the notes this was written from
- Water session handoff — the notes this was written from
Water, rain & windAll 11 parts →
