Neural Depth Errors on Wet Asphalt and How to Mask Them

Wet pavement lies to us. When there's a thin layer of water, asphalt becomes like a specular surface and any neural net for estimating depths that has been trained on non-glossy stuff will interpret it as if there was a hole or a wall or another street further away (or some other depth). This gives you a pretty looking disparity map in the viewport. But when you do camera moves with it, everything falls apart. We compared 3 different depth models against our ground truth LiDAR scan of wet pavement to see exactly where this mirror thing breaks the math for us.

It's about practical consequences. If the compositor believes in an incorrect depth pass he will place his digital rain tower or matte extension or CG car at the wrong distance. The error propagates across the shot. It is not simply a matter of a better model - it is having a lighting and blocking discipline that provides accurate clues to the estimator, together with some kind of masking technique that wipes out the puddle before it's ever even sent off to the network.

Low-angle cinema camera gliding over wet asphalt with a mirror puddle reflecting a streetlight, focus puller adjusting lens, misty night street
Motivated 3200K streetlight key with 5600K rim and black negative fill sculpts the wet asphalt's specular sheen while a shallow depth of field isolates the puddle reflection.

Why Mirror Puddles Break Stereo Disparity Before the Network Even Runs

Classical stereo matching requires texture (surface scattering of light back to both cameras). Wet asphalt breaks this assumption in grazing angle situations. At eye level camera distance 2.2m to subject, incidence angle for a puddle can drop below 15 degrees which will drive reflectance over 60%. Now the left sensor and right sensors see different reflected worlds. No stable match found in correspondence search. The network gets bad input and hallucinates depth that is not there.

This is pretty much what we should expect. Puddles are planar mirrors which means that you see the scene reflected at some virtual depth behind the road surface. When your neural estimator (trained on indoor and dry outdoors datasets) doesn't have any prior knowledge about this kind of geometry, it will just use the depth of the object being reflected instead of the puddle itself. So if there is a far away streetlamp reflected in a nearby puddle you'll end up with that lamp at its real distance while the rest of the world. This results in depth discontinuities which can't be smoothed over no matter what.

Building a LiDAR Ground Truth Rig for Wet Street Validation

To measure how much error there was, we attached a 32 beam lidar at 1.4m high to a stabilized rig, along with a stereo camera baseline of 120mm. Water is sparse in lidar returns because it specularly reflects away from the sensor so we added a structured-light projector that projects a random dot pattern (850nm). We got dense ground truth data for dry parts and had invalid puddle regions marked out which was our desired mask!

We shot the same street scene three times under these conditions: 1) Overcast sky 5600K (no direct sun), flattest possible specular response 2) Single 2K tungsten fresnel at 3200K raking asphalt from 30 degrees camera left to maximize mirror-ness. 3) Bare open face 650W at 45 degrees behind cam, which puts a large highlight into the puddles. We found each of these presented different breakpoints in our depth models. The tungsten rake was hardest because we're driving right into the stereo baseline with the specular lobe.

A puddle is not a hole in the ground. It is a window to a virtual world that no stereo matcher was trained to see.

Diagnostic Failure & Correction Matrix — Neural Depth Errors on Wet Asphalt and How to Mask Them
Common On-Set FailureOptical / Lighting Root CauseVerified Field Correction
Focal Length & Stop50mm cinema prime at T2.4Isolates subject contours with natural falloff
Primary Key & Diffusion300W LED fresnel with barn doors through 4x4 grid cloth diffusionDelivers smooth skin roll-off and specular control
Contrast & Negative Fill4:1 key-to-fill anchored by 4x4 Black Negative FillCarves dimensional shadow separation without crushing blacks
Kelvin Color Separation3200K key balanced against 5600K rimSeparates foreground silhouette cleanly from background planes
Wide 35mm view of wet street at night, camera rig and focus puller in three-quarter view, puddle reflections leading to distant light shafts through mist
The 35mm frame uses the puddle as a foreground mirror, with the 3200K key creating directional shafts through haze and the 5600K rim separating the focus puller from the deep background.

Masking Puddles Before Inference with a Specular Probability Pass

The best way would be to completely eliminate it from the network's input. We created a specular probability mask using a polarization filter (rotated to block dominant reflection angle) + luminance threshold - any pixel with value greater than 85% of local maximum is marked. Then we perform dilation by 12 pixels to account for gradual disappearance of water film edge, invert and use this map as validity input to the depth model.

This comes at a cost though - by masking we're eliminating true geometry near the puddle boundary which leaves us with a hole in the depth map. To fill this hole you either have to use some form of inpainting or project LiDAR returns from dry surroundings into it. In our case, simply harmonic inpainting over the masked area gave less artifacts compared to letting the network guess. On the flip side - thin puddles (less than 2 centimeters deep) sometimes escape the mask and still mess up disparity so we need tuning for each shot threshold.

Minimalist black-line instruction-manual set diagram showing 50mm camera rig, 3200K key light with 4x4 grid cloth diffusion, and 4x4 black negative fill for Neural Depth Errors on Wet Asphalt and How to Mask Them
A 3200K key from a streetlight is softened with a 4x4 grid cloth, while a 4x4 black negative fill on the shadow side deepens contrast, and a 1K Fresnel at 5600K provides a cool rim from behind the puddle.

Lighting and Blocking Choices That Give Depth Models Honest Cues

You can limit the problem in post by managing your puddle reflection. If you have a 4x4 grid cloth diffusion frame above (3m) then you will turn sky into a big light source and fill your puddle with a nice gradient instead of a hard mirror image. This will bring down specular contrast ratio from around 8:1 to 3:1 and give the stereo matcher textured micro-shadows for asphalt aggregate to grab onto. Combine that with -55 degrees 4x4 black negative fill, so you don't end up with flat wet road sheen.

Blocking is important too. If you want more grazing angle (and thus a worse mirror) by keeping your camera under 1.0 meter we recommend lens height of 1.5-1.8 for any shot where you need to be sure about depth. Use something like a 50mm prime T2.4 that will have enough DOF for road surface sharpness while blurring reflected background (thus less false correspondence between reflection and object) etc. Minor tweaks that save hours in cleanup time.

A Compositing Checklist for Wet Ground Depth Passes

Before you trust any depth pass on wet ground, run this sequence. First, verify the LiDAR or structured-light ground truth covers at least 30 percent of the frame. Second, generate the specular mask and inspect it at 200 percent zoom for missed thin films. Third, compare the raw depth map against the ground truth and flag any region where the error exceeds 5 centimeters at the puddle boundary. Fourth, inpaint the masked region and re-project the dry surround. Fifth, render a test camera move through the corrected depth and check for popping at the water edge.

The last test is perceptual. Depth maps may be numerically correct but visually incorrect when composited (the human eye wants reflections on top of things not behind them). We put a false-color depth ramp over the plate to see if we have the typical bullseye pattern indicating mirror artifact. If you've got concentric rings around the highlight in your ramp, then there was something missing from the mask and you need another pass at it.

Troubleshooting & Production Q&A

Can a better neural depth model solve wet asphalt without masking?

Not reliably. The problem is physical, not architectural. A planar mirror creates a virtual image that violates the multi-view geometry assumption, and no amount of training data fully resolves the ambiguity between a reflection and a real surface at the same pixel. Masking remains the most robust first step.

What is the minimum LiDAR coverage needed to validate a depth pass?

We recommend at least 30 percent of the frame, concentrated on the dry surround and the puddle boundary. Sparse returns on the water itself are expected and should be flagged as invalid rather than interpolated.

Does polarization filtering work on all puddle angles?

No. A linear polarizer rejects reflection best near Brewster's angle, which for water is about 53 degrees from normal. At very grazing angles the rejection weakens, so the mask must combine polarization with a luminance threshold to catch the remaining mirror pixels.