LightingGuide

Photometric stereo light distance: avoid shadows that flatten detail

How far to mount photometric stereo lights: distance, shadow length and falloff numbers with worked arithmetic, plus ring versus four-bar geometry choice.

LumaSpec Vision12 min read Share on LinkedIn

On this page 8 sections
  1. 01Why light-to-part distance decides the result
  2. 02The four numbers that set the geometry
  3. 03Worked example: embossed code on a 30 mm cap
  4. 04When four bar lights beat a quadrant ring
  5. 05Driving the four channels
  6. 06Checks before you order
  7. 07When the usual answer is wrong
  8. 08Questions

Photometric stereo fires four lights at a part in sequence and combines the frames into one image where embossing, engraving and texture stand out regardless of surface reflectance — plus a surface normal map for depth-sensitive checks. Whether that composite comes out sharp or smeared is decided before the first exposure, by the lights' distance and angle to the part. Sit them too close and the shadows harden, the solver loses the pixels behind every tall edge, and the depth map over-smooths. This guide gives the geometry rules with the arithmetic shown: how elevation sets shadow length, how distance sets falloff and direction spread, a worked station design, and the point at which four bar lights beat a quadrant ring.

Why light-to-part distance decides the result

Photometric stereo holds the camera still and changes only the light direction between exposures. Software compares the frames pixel by pixel, separates reflectance from shading, and returns two things: a composite in which surface detail reads at even contrast, and a normal map of the local surface tilt. The classical method assumes each light acts as a distant point source — one illumination direction for the whole field, no brightness gradient across it.

Real quadrant hardware rarely meets that assumption. A ring or bar sitting tens of millimetres from the part is a near-field light: intensity at each pixel depends on that pixel's 3D position, the effective direction swings across the field, and any feature taller than its neighbours casts a hard shadow into at least one frame. The documented failure mode follows: when many strongly shadowed frames are processed, the solver discards occluded pixels, the smoothness term fills the gaps, and the depth map comes out over-smoothed with a lower-contrast composite.

Distance is therefore a trade to set on purpose. Pull the lights back and the falloff flattens, the direction spread narrows, and the occluded fraction shrinks — at the cost of intensity, which falls with the square of distance. Push them in and every pulse carries more signal, but more of the field sits in shadow in more frames. The numbers below bound both sides; for the wider question of how angle sets contrast, see lighting geometry for image contrast: camera, light and part positions.

The four numbers that set the geometry

Four quantities decide the geometry, and all of them are yours to choose:

  • θ — beam elevation: the angle of the light direction above the part surface.
  • h — the height of the tallest feature you must keep unshadowed.
  • r — field radius: half the camera's field of view at the part plane.
  • L — slant distance from emitter to part centre.
  • a — emitter size along the beam direction: the arc of a quadrant, the width of a bar.
s = h / tan θ shadow length behind a feature of height h Δφ ≈ r / L direction spread across the field, in radians F ≈ (L / (L − r))² edge-to-centre brightness ratio, inverse-square falloff p ≈ a · h / L penumbra width at the shadow edge

The spread and falloff are small-angle estimates: a field point at radius r sees the light direction tilted by about r/L, at a distance shorter by about r. The penumbra is the emitter's angular size a/L projected over the feature height.

The shadow budget sets elevation. Keep s under half the finest pitch you must read:

Beam elevation θ Shadow length s Typical use
30° 1.7 × h deliberate grazing: texture, dents, scratches
45° 1.0 × h general embossing
60° 0.58 × h embossed codes, threads, raised marks
75° 0.27 × h tall features, pins, dense 3D parts

The distance budget sets L. Stay at or above three field radii for a contrast composite, and five or more when you also want usable normals:

Slant distance Direction spread Falloff F Fits
L = 3 r 19° 2.3× composite on low relief
L = 5 r 11° 1.6× composite plus usable normals
L = 10 r 6° 1.2× near-distant-light regime for depth work

Worked example: embossed code on a 30 mm cap

The part is a moulded cap with raised date characters 0.5 mm tall on a 1.0 mm pitch. The camera fields 40 mm at the part, so r = 20 mm. Plan: a four-quadrant ring with quadrant centres 35 mm off axis and the emitter plane 60 mm above the cap top.

Elevation and slant distance:

θ = atan(60 / 35) ≈ 60° L = √(35² + 60²) = √(1225 + 3600) = √4825 ≈ 69.5 mm

That is 3.5 field radii — just past the composite floor. Check each budget:

  • Spread: Δφ ≈ 20 / 69.5 = 0.29 rad ≈ 16°, inside the 19° three-radius limit, so one direction per quadrant stays a fair description of each frame.
  • Falloff: F ≈ (69.5 / 49.5)² ≈ 2.0× from the near edge to the centre of each frame. Opposing quadrants mirror the gradient, so the composite evens it out, and a flat-field correction removes the rest.
  • Shadow: s = 0.5 / tan 60° = 0.5 / 1.732 = 0.29 mm, which is 29% of the 1.0 mm pitch. Most of every character survives unshadowed in each frame, and the opposite quadrant lights whatever the active one hides.
  • Penumbra: with a ≈ 25 mm of emitter arc, p ≈ 25 × 0.5 / 69.5 = 0.18 mm — comparable to the umbra, so the shadow edges arrive soft, which the solver handles cleanly.

Decision: the geometry passes for the flattened code image, and at 3.5 radii the normal map is usable though not metrology-grade.

Now drop the same ring to 20 mm above the cap — the tempting move in a tight cell or a dim image:

θ = atan(20 / 35) ≈ 30°, and L = √(35² + 20²) = √1625 ≈ 40.3 mm.

  • Spread: 20 / 40.3 = 0.50 rad ≈ 28°.
  • Falloff: (40.3 / 20.3)² ≈ 3.9×.
  • Shadow: 0.5 / tan 30° = 0.87 mm — 87% of the pitch, so a character facing away from the active quadrant is mostly shadow in that frame.

Decision: the composite still forms, but the depth map over-smooths, the documented near-light failure. Raise the ring and buy intensity back with pulse current instead of proximity: doubling L costs (2)² = 4× the light, which a strobe driver recovers from its duty-cycle headroom — see LED overdrive and current control: stable machine vision lighting.

When four bar lights beat a quadrant ring

Scale the cap station up and the ring body grows with it. At 60° elevation the emitters stand H = 0.87 × L high and R = 0.5 × L out, so a 360 mm slant distance wants a ring about 360 mm across, mounted 312 mm over the part — bulky to bridge over the field and awkward to service. Four discrete bars reach the same geometry on brackets, and each keeps its own channel, aim and pulse.

Take a 240 mm field (r = 120 mm) and hold the distance floor, L = 3 r = 360 mm, at θ = 60°:

R = L cos θ = 360 × 0.5 = 180 mm lateral radius H = L sin θ = 360 × 0.866 = 312 mm mounting height

Four bar lights of about 290 mm lit length, set on a 360 mm square around the part, cover the field with margin, and a 3 mm tall boss casts s = 3 / 1.732 = 1.7 mm of shadow — short against any realistic spacing between features. Bars also bring a long emitter, and in the penumbra formula a longer a softens the shadow edge at the same L, which is friendlier solver input than a compact quadrant of the same output.

For a station in this class, three catalog bars cover the usual choices:

Specification LS-BAR-0400 LS-BAR-1047 LS-BAR-0484
Voltage 24 V – 24 V
Colour temperature of white 6600 K – 6600 K
Cable length 500 mm 500 mm (per dimension drawings) 500 mm
Operating temperature 0 to 50 °C – 0 to 50 °C
Operating humidity 20-85% (non-condensing) – 20-85% (non-condensing)
Lifespan 50000 h (to 50% of factory default luminance) – 50000 h (to 50% of factory default luminance)
Adapted controllers Analog controller, digital controller, high power controller – Analog controller, digital controller, high power controller
Extension cable options PVC extension cable (high flexibility, bending and high-temperature resistant, for use inside equipment); high-flexibility extension cable (harder, more abrasion resistant, for drag-chain production lines) – PVC extension cable (high flexibility, bending and high-temperature resistant, for use inside equipment); high-flexibility extension cable (harder, more abrasion resistant, for drag-chain production lines)
Power (R) 8.6 W – 4.8 W
Power (G/B/W) 14.4 W – 7.2 W
Weight 446 g – 277 g
Luminous surface width (mm) 30 – 16
Price $459.00 $449.00 $459.00

Values as printed in each product's data sheet; open a part for its drawing and full specifications.

All three are 24 V standard-type bars in the 200-400 mm size class. Choose by lit width for the penumbra you want and by luminance class for short strobe pulses. If the part needs two elevations from one station, angle-switching rings are the ring-side route — see stacked ring lights: switching angles to catch more defect types. For a smaller field, stay with the quadrant route from the ring lights range; its build is laid out in photometric stereo ring lighting for surface inspection.

Driving the four channels

Each quadrant needs its own channel, fired once per exposure: quadrant 1 flashes during exposure 1, quadrant 2 during exposure 2, and so on through the set. A four-channel strobe controller with independent pulse width and delay per channel does this directly — the event patterns are laid out in multi-channel light controller sequencing for photometric stereo. If an image comes back black while the light visibly flashes, the pulse is landing outside the exposure; the timing checks are in strobe light on but camera image is black: fix the timing.

Keep the channels matched. A dim quadrant biases every surface normal it illuminates, and mismatched pulse widths show up as brightness steps between frames. Constant-current output holds the balance as the LEDs warm and age; if you trim brightness per channel, trim against a measured grey part, not by eye. One four-channel digital control box with strobe and RS232 covers the sequence:

Light controllersDigital control box, 4 ch, 200 W, RS232 (LS-CTL-0070)LS-CTL-0070
Output
Constant voltage 24 V
Channels
4 channels
Control
Digital
Feature
Strobe
$549.00View partBuild a system with it

Wavelength can ride the same sequence: give opposing quadrants different colours and a monochrome sensor separates four directions and two wavelengths from one frame set — the pattern is in multi wavelength light: sequence colours to get more from one camera.

On a moving line, add a fifth, full-illumination frame: all quadrants together, or one diffuse ring, gives the registration image that locates the part in every strobe frame — moving part photometric stereo: synchronize image capture walks through the synchronization. A diffuse full ring covers that role in one unit:

Ring lights100 mm dia. ring light with diffuser, 30° (LS-RNG-0143)LS-RNG-0143
Size
100-200 mm
Type
Diffused
Angle
30°
Voltage
24 V
$169.00View partBuild a system with it

Checks before you order

Run the arithmetic, then confirm it on a first article before the cell is built:

  • Measure h and the finest pitch p on a real part. Require s = h / tan θ ≤ p / 2 at the elevation you plan to mount.
  • Compute R = L cos θ and H = L sin θ at the chosen L, and check the frame has H of headroom plus the camera's own working distance above the part.
  • Confirm the controller: four channels minimum, strobe output, independent width and delay per channel — the light controllers category filters by channel count, strobe and constant-current output directly.
  • Capture the four single-quadrant frames and check three numbers: edge-to-centre ratio ≤ 2× within each frame, shadow length ≤ half the feature pitch, and clearly different shading between frames. Two frames that look alike mean the directions have collapsed, and no distance will fix a weak solve.
  • On a moving line, confirm dwell: the four pulse widths plus gaps must fit the time the part spends inside the field at belt speed.

When the usual answer is wrong

The decisions, in one line each: low-relief marked part in a field up to about 60 mm — quadrant ring or four compact lights at θ = 45° to 60° and L ≥ 3 r. Large field or features 3 mm and taller — four bar lights at the corners, θ = 60° to 75°, L ≥ 3 r, extended to 5 r when the normal map matters. Moving belt — sequenced flashes plus a full-illumination registration frame. Size the field first with the lens focal length calculator, then take θ and L to the lights finder or start at the light configurator step; more illumination patterns sit on the lighting topic page, and we will check a station geometry against a part drawing through the contact page.

Questions

Can one ring light do photometric stereo?

Only if its emitting surface is split into independently switched segments. A continuous ring fired as one unit is plain diffuse front light and gives a single direction. Look for quadrant-segmented or multi-angle types in the ring-light range, or build four directions from separate lights on a multi-channel controller. The segments must fire in sequence, one per camera exposure, never all together.

Why does my photometric stereo depth map look blurred?

Over-smoothing. Each tall edge shadows pixels in at least one of the four images; the solver drops those pixels and the smoothness term fills the gaps with flat surface. Steepen the beam elevation, move the lights back to soften gradients, or shrink the field so fewer tall features sit in view. Test: check that the features you care about are unshadowed in all four input images.

Does photometric stereo work on parts moving down a belt?

Yes, with sequenced strobing. Each part must see all four flashes while inside the field, so belt speed times the four exposures must fit the field length: at 100 mm/s and four 0.5 ms flashes you need 2 ms of dwell, or 0.2 mm of travel, well inside a 40 mm field. If the part shifts between flashes, re-register with a full-illumination frame.

How many light directions does photometric stereo need?

Four directions at 90° azimuth steps is the working standard: opposing pairs fill each other's shadow gaps, so most pixels survive in at least two images. Eight directions help on parts with tall, dense features such as connector blocks, but they double capture time and rarely change the composite. Extra directions add the most value when you also want a reliable normal map.

Do I need a special controller for a four-light station?

A four-channel strobe controller with independent pulse width and delay per channel is enough. Size the total power with headroom: four bars at 12 W each need about 50 W of continuous rating and far more strobe peak, which is why 200 W-class four-channel units are common. Constant-current output keeps the four quadrant brightnesses matched as the LEDs age, which matters because a dim quadrant biases every normal it illuminates.