Theme

The thread: Made by something finite

The departures in these fields are not optical. Depth is kept in a fixed number of bits, the picture is a grid of samples that need not be square, and the frame is read over an interval and mostly a row at a time. None of that changes what a projection is; all of it changes what this particular picture is a projection of, and each one has a closed form and a control.
x/z, y/z — the pinholeM·p, then divide by wworst disagreement 4.0e-14 px over 8 verticescorrect from 21 cm, at 160 mm wide42° across · near 0.1 m, far 1000 m What a machine computes

The divide is postponed, not avoided

A renderer does not divide by depth. It multiplies by a four-by-four matrix that carries the depth in a fourth coordinate and divides later, and the postponement is not an optimisation — it is what makes clipping and texture interpolation possible at all. The matrix and this site's pinhole put every point on the same pixel to five parts in a hundred trillion.

00.2500.5000.7501-10123distance from the eye — log₁₀ metresfraction of the buffer's codes used uphalf the codes by 0.20 ma linear map, for comparisonnear 0.1 m, far 1000 mharmonic mean 0.20 m against arithmetic 500 m What a machine computes

The precision a depth buffer has left

Depth is stored as an affine function of one over the distance, so half of a buffer's codes are spent before the harmonic mean of the near and far planes — twenty centimetres out of a kilometre. The resolution goes as the square of the distance, and the fix that works is not more bits.

0.0 ms8.3 ms16.7 ms25.0 ms33.3 mslean 1.052° drawn against 1.055° predicted · a still world leans 0.000°no single viewpoint — the rays miss by 33.3 ms of travelthe frame is a stack of projections indexed by row The rectangle behind the lens

Every row is a different camera

A shutter that reads its rows one after another images each of them from wherever the camera was at that instant, so a frame is a stack of projections indexed by height — a handscroll with the roll running down the picture. Its rays miss their own best centre by the spread of the eye's track, at a ratio of 0.988, and a global shutter's meet to 2 × 10⁻¹⁶ m.

one pixel is an areacentrescornersprincipal point moves0.707 pxfocal length changes by4.5e-13 pxan edge-versus-centre viewport1.303 pxa half-pixel convention is a principal-point error; an off-by-one viewport is a focal-length error8 vertices, all shifted by the same 0.7071 pxspread across marks 0.0e+0 px What a machine computes

A pixel is not a point

Where the sample sits inside a pixel is a convention, and getting it wrong shifts every mark by half a pixel in each axis. What that costs can be measured by recovering the camera from the picture — the answer is a principal point exactly 0.707 px from the truth with the focal length untouched, and the other half-pixel mistake does precisely the reverse.

3 m · 47 px6 m · 24 px12 m · 12 pxnear ÷ far = 4.000 against a depth ratio of 4.000exposure 33.3 ms · 6 m/s across the frameeach streak is straight; the set of them is not one kernel The rectangle behind the lens

A frame is an interval

An exposure is not an instant, so a frame is an integral of projections and every moving point draws a streak. The streak is straight, because the image of a straight path is straight — and its length goes as one over the depth, so two objects at 3 m and 6 m blur by lengths in the ratio 2.000. No single kernel describes the frame.

-0.400-0.200000.2000.4000.6000.8001position across the drawn surfacehow far along the real surface, minus how far along the drawn one(√k−1)/(√k+1) = 0.5195at the page's midpoint, 40.9%depth ratio 10 : 1peak 0.5195 at s = 0.760 What a machine computes

A texture does not interpolate on the page

Walking across a drawn surface at a constant rate walks across the real one at a rate that changes, and the worst gap is a closed form in the depth ratio alone — 0.52 at ten to one, more than half the whole range. It is exactly the error a person makes dividing depth by eye, made by a machine, and the fix is the fourth coordinate the pipeline kept.

the eyenear 0.90 mfar 4.20 mfocal 740 pxprincipal 345, 210 What a machine computes

Four numbers and a window

A projection matrix is built from six numbers and one of them is not a number at all. Four sides carry the focal length and the principal point; the near and far planes move nothing a reader can see; and the bottom row, (0, 0, 1, 0), is the only place the depth divides — set it to (0, 0, 0, 1) and the same machine draws a parallel projection.

worst 1e-13 px outcorrect from 17 cm, at 160 mm wide3 × 3 tiles What a machine computes

A tile is an off-centre frustum

Rendering a picture in tiles is exact, and the way to do it is one line of arithmetic: a tile's sides are the whole frustum's sides read at the tile's own pixel bounds. Aiming the camera at each tile instead is defensible at every step and is a different picture, out by about a tenth of a tile whatever the tile size.

00.50011.50-0.25000.2500.5000.750the blur a reader is prepared to call sharp, in pixels (powers of ten)near and far limits of the band, in metres (powers of ten)the focus distance2 pxone lens, one focus setting, five criteria5 bands The rectangle behind the lens

The sharp band is a decision

One 50 mm lens at f/2.8 focused at three metres has a sharp band half a metre deep or an unbounded one, and nothing about the optics changes between them — only how large a blur disc a reader is prepared to ignore. Every quantity usually quoted about depth of field is that acceptance restated, including the rule that a third of the band lies in front, which is true at one distance and nowhere else.

24 kept · 26 clipped · every mark unmovedcorrect from 17 cm, at 160 mm wideclip plane tilted 18° What a machine computes

The near plane can be any plane

Rewrite one row of a projection matrix and the near plane stops being perpendicular to the axis and becomes whatever plane is asked for. Every x and every y is untouched — it is the same projection of the same scene from the same eye — and the depth order is wrecked, which is a clean separation of the two things a projection matrix does.

-0.10000.1002.5057.5010depth reported from the stepped disparity (m)height reported for each image row (m)the floor as it is35 platesspacing 3.9 cm → 1.95 mslope 1.997 What a pair is for

Whole pixels cut space into shells

A disparity read to whole pixels can report only the depths fB/k, so a stereo pair does not measure distance on a scale — it chooses among 113 shells between half a metre and twelve, 6.7 cm apart at two metres and 1.39 m apart at ten. A level floor comes back as 35 standing plates. And a finer step and a better reading are different purchases: at a quarter pixel with a quarter pixel of matcher error the pair prints 449 depths and can tell 149 apart.

leftfrontrightbackupdownacross the left/front seam: 1.80°, with each side straight to 7e-16corner area ×5.196anisotropy √3 = 1.7321 there Surfaces that are not flat

Six flat pictures of everything

There is one way to photograph the whole sphere and keep every straight line straight, and it is to stop using one surface. Six flat pictures at ninety degrees cover everything, each of them a perfect pinhole, and the price is paid entirely at the seams — where a straight line does not bend but kinks, by an angle that reaches 45 degrees and is exactly zero for the lines lying in the seam's own plane.

01230123the plane moved by a factor of ten to the …depth resolution, relative (powers of ten)near plane, brought infar plane, pushed out1/near − 1/farone term does all the work What a machine computes

One plane is nearly free

The near and far planes enter a depth buffer's precision through 1/near − 1/far, and one of those reciprocals is enormous. Pushing the far plane out by a factor of a thousand costs a tenth of a per cent; bringing the near plane in by the same factor costs a factor of a thousand — and an infinite far plane is the limit of the first rather than a separate case.

the seat3 chords against the arccurved monitor, 3 flat pieces6.80 mm of sag · 5.50 px at the seat What a machine computes

A curved screen is eight flat ones

A projection matrix is a plane and nothing else, so a curved display cannot be rendered — it has to be driven as several planes and assembled. The gap between chord and arc is the whole error, it goes as the square of the angle each piece spans, and the piece count therefore goes as the inverse root of the tolerance — three for eight pixels, eight for one, fifteen for a quarter.

at one depth — a stadium, to 1.8e-5receding — tapered, 4% outone point, one exposure, the whole pupil1.8e-5 against 4% The rectangle behind the lens

The disc and the streak

A frame integrates over the pupil and over the exposure at once. Hold the point's depth and the patch is exactly the streak of its centres with one disc slid along it, to 1.8 × 10⁻⁵ of its own width. Let it recede over the same exposure and the disc's radius falls by 3.7 along the streak, and the patch departs from any single kernel by 16 pixels.

00.2500.5000.7501-10-50510across the edge, in pixels of the picturehow much of the background reaches the sensorwhere a pinhole puts the edgethe pupilone depth per samplethe same edge, two ways of blurring it70% apart What a machine computes

One depth per sample is not enough

A depth buffer keeps a single distance at each sample, so a post-process blur can only ask how far away the thing at this pixel is. Across an occluding edge that answer is two depths and an occlusion, and the gather it produces differs from the pupil's own integral by 70 per cent of full scale over a band eleven pixels wide.

21 of 36 tiles still countablethe floor starts 18 m away Measuring from one picture

Counting is a measurement

A tiled floor gives its area with no reference length at all — count the tiles and multiply. The count is an integer, so it is exact wherever it can be made, which is a completely different error law from the rectifier's smooth decay. And the distance at which it fails is set by the tile's depth edge, which foreshortens as one over the depth squared, so 18.7 m for a 62 cm tile, where the across edge alone would have allowed 217.

23468121632640.010.1110depth (m, log scale)streak length over the exposure (px, log scale)turning: still worldturning: moving with ittravelling: still worldtravelling: everything moving with the subject 0e+0 px4 m/s at 8 m · 33.3 ms The rectangle behind the lens

Turning and travelling blur different worlds

A subject 8 m away crosses the frame at 4 m/s, and the camera keeps it sharp over a thirtieth of a second. Turn to follow it and every still thing blurs by the same 13.5 px, whatever its depth. Travel beside it and the still world blurs as one over its depth — 49 px at 2 m, 1.5 px at 64 m — while everything moving with the subject is sharp at every depth.

where the eyes are aimedin plan, framed to the shells drawnzero at 0.92 m, 40° aside What a pair is for

Vergence moves the shells and does not respace them

Turn two eyes inward and the depths a whole-pixel reading can report stop being planes and become a family of near-circles through both eyes — the twenty-pixel shell standing at 0.74 m forty degrees aside where a parallel pair puts it at 3.82. The spacing between consecutive shells is the same to 0.07 per cent across the whole field, so vergence relabels the rays and does not sharpen them, and the resolution argument for turning the eyes in does not exist.

5710142028400.31310distance along the floor from below the eye (m, log scale)pixels one shadow-map texel spans on screen (log scale)1 pxlamp beside the eyelamp 30 m overheadlamp 40 m ahead, facing backmeasured against the closed form: 4e-91024-texel map · eye 1.7 m · 50° field What a machine computes

A shadow map's texels land by two distances and two cosines

A renderer finds its shadows by taking a second picture from the lamp and storing a depth in every texel. Each texel reaches the screen through the surface it falls on, and how many pixels it covers there is a closed form — two focal lengths, two distances and two cosines. From a lamp beside the eye every texel lands at 0.79 px; from a lamp 40 m ahead facing back, the same map lands texels of 8.69 px on the floor 5 m out.

the object0 of them no light reaches7 of 7 seen Mirrors that are not cameras

Two mirrors show fewer images than they make

Two mirrors at 55° generate seventy-one images of a point and an eye between them can reach six. The count the field teaches — three hundred and sixty over the angle, less one — is out by as much as sixty-six against the orbit and never by a whole image against what a viewer standing on the bisector actually sees. It is a correct rule about the eye, quoted as a rule about the mirrors.

left pictureright picturethe post it is matched toone image row, drawn as two strips19.8 m instead of 9.0 What a pair is for

A third eye that lands on the next post

Match one post of a railing to its neighbour and the pair reports it at 19.8 metres instead of 9.0, with every test two photographs can run at the arithmetic floor. A third picture usually exposes that by hundreds of pixels — but at five azimuths in seventy-eight degrees the wrong point lands within three pixels of another post, and the third view confirms the mistake. Narrow the railing to twenty centimetres and those places cover 28 per cent of the arc.

0.2000.4000.6001.8022.20range, mheight above the plane of the eyes, mhorizontalverticalat 2 m, 40 cm off the plane79° between them What a pair is for

The second disparity cuts cells

A point off the plane of the eyes has a vertical disparity as well as a horizontal one, and quantising both, on an 86,400-point lattice of a room, gives 7,663 labels where one coordinate gives 179 — a count that belongs to the lattice rather than the room, as the essay after this one found. The gain is entirely vergence's — two eyes looking straight ahead have no vertical disparity at all, exactly — and it is largest where the first reading is already finest: 60.8 in the near metre and 3.7 in the far band.

the constant-depth direction, 20.0°a floor banked 20°, 40 pixels of the walkworst 0.60 px off the line What a machine computes

A tilted span walks a staircase

A span along a banked floor's constant-depth direction is exact, and a renderer visits pixels rather than the span. Snapped to the grid, a 120 px span at a 20° bank costs 0.577 px where the same span along a page row costs 13.26 — twenty-three times better — and it never rises above 1.22 px at any bank. The price is bookkeeping: a band of twenty-four such spans draws 53 of its 1,368 pixels twice.

All themes