Nodes/Atlas Camera/Atlas Ground Depth Map
ComfyUI Node

Atlas Ground Depth Map

A ground-plane depth heatmap generated from the camera itself

By mikejamesvfx·Created 3 months ago·Updated a day ago· 1
Atlas Ground Depth Map
  • solve
  • depth_image
  • ground_mask
image_width0
image_height0
near_m1.0
far_m50

AtlasGroundDepthMap is the "fake depth that's actually real" node. Instead of running a monocular depth model to estimate where things are, it works out the answer analytically: for every pixel, cast a ray through the recovered camera and compute where that ray hits the ground plane at Y=0. The result is a perfect ground-plane depth map - warm near, cool far, in metres - plus a mask of which pixels actually see ground.

Why bother, when Depth Anything is right there? Because monocular depth is an estimate with systematic error, and for a flat-ish ground plane the camera solve gives you ground depth exactly - no model, no hallucinated floor bumps, no GPU. It's a great reference for sanity-checking the learned depth, and an even better one for grounding: if you know the camera height, a ground depth map tells you the scale of every pixel sitting on the ground, which is exactly what you need when you're anchoring the projection to real-world dimensions.

How it works

The node ports the pack's projection-material shader (the same GLSL the viewport uses) to numpy: per-pixel ray cast → intersection with the Y=0 plane → warm-to-cool colormap. It's the same math a 3D renderer uses to draw a ground plane, run in reverse across the image. The output is a float depth_image heatmap and a ground_mask marking the pixels whose ray actually hits the plane (sky and above-horizon pixels are out).

near_m and far_m set the depth range for the display colormap - the default 1 m to 50 m is a reasonable outdoor span, but they're display controls, not physics. The underlying geometry doesn't care.

The inputs

solve is required, then:

  • image_width / image_height - 0 = auto, adopting the source image size.
  • near_m (default 1) / far_m (default 50) - the colour range of the heatmap, in metres.

Outputs are depth_image (IMAGE) and ground_mask (MASK).

Install and gotchas

Part of the pack: ComfyUI Manager → search atlas-camera, or git clone https://github.com/mikejamesvfx/atlas-camera.git into custom_nodes, restart. It needs numpy and torch (already in any ComfyUI) and nothing else - no model weights, no GPU.

The one honest caveat: this assumes a flat ground plane at Y=0. A road sloping away from the camera, a staircase, or a hill will be wrong by however much the ground departs from flat - the node doesn't know about terrain. Keep it for the cases where flat is a fair assumption, and treat the mask as the ground-truth ground region rather than the depth values over anything that isn't actually level ground.

For its intended job - "give me the metric depth of the ground in this shot, cheaply and exactly" - it's hard to beat.

CategoryAtlas/03 · Depth

Inputs (5)

NameTypeDefaultDescription
solveATLAS_SOLVE
image_widthINT00–81920 = auto (adopt source image width)
image_heightINT00–81920 = auto (adopt source image height)
near_mFLOAT1.00.01–500
far_mFLOAT501–5000

Outputs (2)

NameTypeDescription
depth_imageIMAGE
ground_maskMASK