Filter node

Depth Adjust

The Levels tool for a depth image — or any grayscale driver. Invert swaps near and far; In Black/White clip and stretch the range like a Levels dialog; Gamma bends the midtones, Contrast steepens them; Out Black/White compress into a target band; Posterize cuts the ramp into discrete depth slices. Band mode is the scalpel: a mask that peaks at Band Center and falls off over Band Width — one exact slice of distance, ready to gate any filter. Sits perfectly between the 3D Scene's Depth pass and a Depth of Field, Fog or Film Grain mask.

Inputs

PortTypeDefault
EnableOff passes nothing: the texture is cleared.booltrue
ImageThe depth image — or any grayscale — to reshape.image—
WidthWidth of the output picture in Grafit units (default 2, the full height of the view). Cable the source's Width to keep its size.float2
HeightHeight of the output picture in Grafit units (default 2).float2
ModeLevels reshapes the whole ramp like a Levels dialog; Band carves ONE slice of it into a mask.int0
InvertSwaps near and far — the negative depth.boolfalse
In BlackEverything at or below this reads black; the range above stretches to fill. The clip-and-stretch half of Levels.float0
In WhiteEverything at or above this reads white.float1
GammaBends the midtones: above 1 lifts them, below 1 sinks them. The curve half of Levels.float1
ContrastSteepens the ramp around the middle; at +1 it approaches a hard threshold, negative flattens.float0
Out BlackWhat black becomes on the way out — compress into a target band.float0
Out WhiteWhat white becomes on the way out.float1
PosterizeCuts the ramp into this many discrete steps — depth SLICES, contour bands. 0 or 1 is off.int0
Band CenterWhere on the depth ramp the band mask peaks — the exact distance you want to isolate.float0.5
Band WidthHow much of the ramp the band covers before falling to black.float0.3
Band FeatherHow soft the band's edges are, as a fraction of its half-width.float0.1

Outputs

PortType
ImageThe depth image — or any grayscale — to reshape.image
WidthWidth of the output picture in Grafit units (default 2, the full height of the view). Cable the source's Width to keep its size.float
HeightHeight of the output picture in Grafit units (default 2).float

How It Works

Depth Adjust is a Levels dialog for distance — or for any grayscale driver. Invert swaps near and far. In Black and In White clip and stretch the incoming range exactly like a Levels dialog. Gamma bends the midtones and Contrast steepens them. Out Black and Out White compress the result into a target band. Posterize cuts the ramp into discrete depth slices.

Band mode is the scalpel: instead of a ramp it produces a mask that peaks at Band Center and falls off over Band Width, feathered by Band Feather — one exact slice of distance, ready to gate any filter downstream.

It is designed to sit between the 3D Scene's Depth pass and a Depth of Field, a Fog or a Film Grain mask, where the raw pass rarely lands in the range the consumer wants.

Use Cases

  • Get depth into range — A scene whose depth all sits between 0.4 and 0.6 becomes a full ramp with In Black and In White.
  • Isolate a slice — Band mode masks exactly the objects at one distance, for a colour grade or an effect that only they receive.
  • Stylised depth — Posterize turns a smooth ramp into flat planes, the cel-shaded look.
  • Gate grain to the background — Band the far distances and feed the mask to Film Grain.
  • Tame an estimated map — Depth Estimation's relative output becomes predictable after a Levels pass.

Tips

  • Set In Black/In White first, then Gamma. Doing it the other way round means re-tuning the gamma every time you clip.
  • Band Feather stops a mask from having hard edges — a little always looks better than none.
  • Any grayscale works here, not just depth: a luminance pass, an ID pass or a hand-painted mask all respond to the same controls.
  • Chain two Depth Adjusts when you want a ramp and a band from the same source.
  • Preview the result by cabling it into a Canvas — reading a depth ramp by eye is much easier than by numbers.

Open Depth Adjust in the interactive catalog →

Depth Adjust is one of 381 nodes in Grafit Pro.

Free download. Every feature for 7 days, no card. Then €99.99 once — or keep playing your projects as a Player.

More Filter nodes