Rebuilding glass edges from photographs of float glass
Real glass has no drawn lines on its edges. Everything you see there is a reflection, a refraction or a highlight, softened over 1 to 3 px. On 27 September I rebuilt the site’s pane edges on that principle, from reference photographs, then measured five of those photographs and found my first colours far too pale and too yellow.
Before that, the edges were pictures of edges: teal stripes painted in CSS, identical along the whole width of every pane, a one-pixel hairline round the outside, a hard echo line five pixels inside, a painted Fresnel wash (the brightening of reflections at grazing angles), and a white glare band the width of the page whenever the lamp came near.
The side of float glass is deep teal
On 26 September I had recorded what photographs of stacked clear sheets show. The side of float glass (ordinary window glass) is deep teal, because iron in the glass absorbs along the long path of the edge. It is polished, with pale reflection streaks, a crisp near and far arris (the eased corner of the glass), and a thin green echo of the edge just inside the rim. My side strip had been a rainbow; it became green.
Next I rebuilt each feature as the optics it is. The arris holds every surface direction from face to side, so it mirrors the lamp only where the half-vector, the direction halfway between lamp and eye, falls inside that arc. That makes a band one or two pixels wide, bright beside the lamp and gone along the rest of the edge, and the lamp’s size sets the glint’s length.
The side window shows what is behind it, absorbed over the long path. The side mirror reflects the photograph facing it, flipped, brighter the more grazing the look.
The first colours were too pale and too yellow
That first pass took the side’s absorption from written notes. The same day I measured it, from five photographs of clear float glass with their sides against a white ground, so a pixel over the ground is the side’s transmittance (the share of light that gets through).
Absorption is given as optical depth: the higher it is, the less of that colour gets through. The optical depth of blue to green came out at 1.2 to 1.35 in every photo, red to green at 2 to 4.5, and green alone at 0.5 in the pale middle of a side up to 1.3 where it was most saturated.
Against those measurements the first pass was far too pale and too yellow. The numbers for red, green and blue went from 1.15 / 0.28 / 0.55 to 2.7 / 0.9 / 1.2, and a test now holds the model to the measured ranges. The far arris loses 0.55 of the light, up from 0.45.
Light and dark blocks come from under the pane
Measuring turned up something the notes never mentioned: light and dark blocks along every side. Looking into a side you look along the slab, and light reaches you from under the pane by total internal reflection, where light inside the glass can’t get out. So the side now relays the photograph beneath it, squeezed and flipped, and the side layer absorbs it into teal.
Only a sliver of side should show
On 29 September I limited how much of a side may show at all. The stacks of panes on the site’s lab page showed far too much side, where a pane seen from above should show only a thin strip of it.
The width became offset × thickness / (distance + thickness), which is perspective and nothing else. An 18 px slab half a view past the eye shows under 5 px of side.
Still open
The calibration rests on five photographs, and the assumption that the ground behind each side is white is the project log’s own. More photographs of other glass would narrow the ranges.
Sources and notes (6)
- Clear float glass data sheet (Vitro) — float glass is slightly green and deepens with thickness, as in the repo's optics note
- Total internal reflection (Wikipedia) — light guided along the slab to the side, as the repo's glass notes cite it
- Beer-Lambert law (Wikipedia) — absorption over the long path of the side, as the repo's shadow note cites it
- Ony's reference photographs of clear float glass — his five photographs, as recorded in the commit that calibrated the edges
- Edge rebuild from the reference photographs — the commit that replaced the drawn lines
- Edge side model — the notes this was written from
Light & shadowAll 19 parts →
