Filter node

Fog

Atmosphere from a depth image: the farther a pixel sits on the depth ramp, the more of the fog Color it breathes in, fading in between Start and End. Cable the 3D Scene's Depth pass in, pick a color, and the scene has weather — animate Density and it rolls in. Any grayscale image can stand in for depth, which makes Fog a general distance-tinting tool.

Inputs

PortTypeDefault
EnableOff passes nothing: the texture is cleared.booltrue
ImageThe picture to weather.image—
DepthThe depth image that says how far each pixel is — the 3D Scene's Depth pass, or any grayscale.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
ColorWhat the distance breathes in — grey-blue for haze, black for darkness, a colour for mood.color(0.65, 0.7, 0.78, 1)
DensityHow thick the fog gets at its fullest. Animate it and the weather rolls in.float0.7
StartWhere on the depth ramp the fog begins.float0.2
EndWhere it reaches full Density.float0.9

Outputs

PortType
ImageThe picture to weather.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

Fog gives a picture atmosphere from a depth image. The farther a pixel sits on the depth ramp, the more of the fog Color it breathes in, fading in between Start and End with an overall Density.

Cable a 3D Scene's Depth pass in, pick a colour, and the scene has weather. Animate Density and the weather rolls in. And because any grayscale image can stand in for depth, Fog doubles as a general distance-tinting tool: a gradient, a mask, a luminance pass all work.

Use Cases

  • Aerial perspective — Distant geometry fades toward the sky colour, which is what makes a rendered landscape read as deep.
  • Rolling weather — A Timeline curve on Density brings fog in and out over a performance.
  • Separate the subject — Fog the background so the foreground reads clearly without moving anything.
  • Colour grading by distance — A warm fog on the far plane and the picture gains depth without any blur.
  • Live camera atmosphere — Depth Estimation into Depth and a webcam feed gains distance-graded haze.

Tips

  • Start and End define where on the ramp the fog begins and saturates — tune them before reaching for Density.
  • Pick the fog colour from the background or sky; a fog colour that does not exist elsewhere in the frame reads as a filter, not as air.
  • Fog before Depth of Field: air is between the lens and the subject, so it should be blurred along with everything else.
  • A Depth Adjust in front gives you precise control over which distances get any fog at all.
  • For coloured light shafts rather than uniform haze, use the 3D Scene's lights and a particle cloud instead.

Open Fog in the interactive catalog →

Fog 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