Texture Compiler

a wall you can measure by touch

Photograph a patch of wall under raking light and get back the surface itself — how deep the mortar is cut, how proud the brick sits, how coarse the render is — as a height map in thousandths of an inch. The RAP texture rig holds one lamp on a ring that clicks round twelve detents; you lift, turn one click, drop, and shoot. This page does the maths: photometric stereo with the lamp treated as a point source inches from the wall rather than at infinity, so the light direction and its falloff are computed for every pixel instead of once per frame. It rectifies each shot to the rig’s 4″ aperture, which is what makes the answer metric rather than merely pretty, and it can solve for unknown per-frame exposure — the one that matters on an iPhone, where no browser can lock it. Everything runs in this tab; the photos never leave the phone that took them. The whole tool is operable by voice, because the person it is built for is holding a rig against a wall.

Nothing uploads. Frames are read and solved entirely in your browser.

No frames loaded.

Capture plan — read this before the shoot

Shoot at detents
0, 2, 4, 6, 8, 10 (0°, 60°, 120°, 180°, 240°, 300°)
Grazing angle, patch centre
39.2° above the wall
Across the patch
26.1° to 67.8° — a 42° swing
Falloff, near to far edge
2.1 stops of headroom
Shadow cast by a bump
1.2× its own height
Aperture
4″ square, lamp 3.0000000000000004″ out and 2.45″ up
Assumes
posts pinned at the nominal hole

That 42° swing across a 4″ patch is the reason this tool computes a light direction per pixel. A textbook implementation uses one direction per frame and bakes that swing into the answer as a dome.

These figures assume the posts are pinned at the nominal hole. The three posts are the feet, and they pin through holes at ½″ centres — so seating them one hole up or down moves the lamp half an inch closer to or further from the wall. That is not a tolerance, it is a different rig: it changes every light direction the solve depends on, by far more than anything else on this page. If your posts are not at the nominal hole, these numbers and the solve are both wrong, and the fix is a code change rather than a setting.

Frames (0 lit, no ambient)

or say “upload photos”

No frames yet. Shoot the plan above, then load every photo including the lamp-off one.

Solve

Was exposure locked in the camera?
Which lamp is in the carriage?

The carriage takes either plug and nothing in a photograph says which one is in it — the rig’s own calibration publishes this as unknown for that reason. It matters twice: the two sit a little over a sixteenth of an inch apart, and, far more, they light differently.

Result

Texture Compiler · Good Tools