Measuring simulated rain against real footage
Six clips of real rain gave measured targets, and the site’s rain is recorded one fixed step per saved frame so its speed is true. On 9 October only one of eight measures sat inside the footage’s range.
Rain on glass moves too fast and too irregularly to judge by eye. So there were two jobs: take real rain apart into measured targets, and record my rain one fixed step at a time so its speed is true. On 9 October most of my numbers were still outside the targets.
Six clips of real rain on a window were tracked drop by drop: 21,834 tracks. From one of them, 18 streams in ten seconds, the numbers are specific. The front of a runner moves about 138 pixels a second in a frame 552 tall. The median lifetime is 1.3 seconds, and about half start at the top edge.
A fixed step per saved frame keeps the recorded speed true
In a browser rendering graphics in software, without a graphics card, the first frame takes a few minutes while the shaders compile, and each frame after that 15 to 30 seconds. A screen recording of that would show the water at the wrong speed.
So the effect has switches for development only. The recording rig sets a fixed step, one over the frame rate, then for every saved frame asks for exactly one step, waits until it has been taken, lets the picture settle and takes a screenshot. Another switch stops the rain drawing between steps, and to start a clip mid-storm, a warm-up runs many steps per drawn frame.
The clips on this site are 800 by 450 at 8 frames a second, 5 or 6 seconds long, each described by a small settings file.
The rig needs a throwaway page that is not kept in the project, and it must not run while source files are being edited, because the reload kills the frame loop. The scripts used for measuring were temporary files that were not kept, and my handover notes of 9 October say to recreate them from the written method.
Stills had to be approved before motion clips. After that I made a 15 second GIF, which at 12 frames a second for 16 seconds was about 35 minutes under software rendering.
On 9 October most of my numbers were outside the footage’s range
My handover notes list measured targets to match before anything is shown. Here they are against ours at that date.
My rain was at about 150 drops per 100,000 square pixels against 46 to 135 in the footage, so a little dense. Spacing was 1.14 against 1.15 to 1.25. (Clark–Evans compares the average distance to a drop’s nearest neighbour with what random scattering gives: 1 is random, higher is more even.)
Inside a drop on a dark window ours were 1.2 to 1.6 times the glass where the footage said 2.8. Streams started 0.7 to 1 a second against 1.2 to 1.5. The streams’ middle, peak and darkest points were 1.85, 2.9 and 1.26 against 1.5, 2.4 and 0.83.
Each of those can be moved and measured again until it sits inside the footage’s range.
Sources and notes (5)
- Motion rig readme — the notes this was written from
- Streams research — the notes this was written from; also records his six rain clips, as recorded in the repo
- Water session handoff — the notes this was written from
- WaterDrops component — the notes this was written from
- Water and weather page — the notes this was written from
Water, rain & windAll 11 parts →
