Particles node
Particle Depth Field
A depth image gives the particles a Z. Surface: each particle's z springs toward the depth surface, so a swarm lies on the relief. Flow: a force along the height gradient (downhill or uphill) plus the surface spring — water on terrain. Parallax: z is set from the depth, nothing else moves. Near / Far / Invert / Gamma map the picture's values to 0…Depth; Live Source rebuilds every frame for a camera or video.
Inputs
| Port | Type | Default |
|---|---|---|
| EnableOff leaves the particles' z alone; the height grid is kept. | bool | true |
| ImageThe depth or height picture — a Depth Estimation output, a 3D Scene's Depth pass, or any grayscale image. Brighter = closer by default (Invert flips it). | image | 0 |
| ModeSurface — each particle's z springs toward the depth surface (a swarm lying on the relief). Flow — a force along the height gradient in xy plus the surface spring (water on terrain). Parallax — z is set from the depth, nothing else moves. | int | 0 |
| DepthThe z of a fully bright (or, inverted, fully dark) pixel, in Grafit units; 0 is the picture plane. Negative pushes away from the camera. Read every frame — dragging it never rebuilds the grid. | float | 1.0 |
| NearThe picture value that maps to z = 0 (0…1). Raise it to flatten the far background. | float | 0 |
| FarThe picture value that maps to z = Depth (0…1). Lower it to bring mid-tones fully forward. | float | 1 |
| InvertSwap near and far — for depth maps where dark means close. | bool | false |
| GammaCurve between Near and Far: below 1 lifts the mid-tones forward, above 1 keeps them back. 0.1…8. | float | 1 |
| StrengthSurface / Flow: how hard the spring pulls z to the surface, and how hard the gradient pushes in Flow. 0 disables the dynamics; 0…10. | float | 1 |
| DampingSurface / Flow: how quickly the z spring settles, 0 bouncy … 1 dead. Default 0.5. | float | 0.5 |
| DirectionFlow only: Downhill slides particles toward lower height (away from the camera), Uphill climbs toward the peaks. | int | 0 |
| ScaleHow large the picture is in the view: 1 fills it exactly as a Canvas at Scale 1; outside the picture the field is off. | float | 1 |
| ResolutionHeight grid long side in texels, 64…1024. The picture is sampled to this grid; 256 is plenty for a depth map. | int | 256 |
| SmoothBox blur of the height grid in texels, 0…8 — settles noisy depth so particles do not jitter. | float | 1 |
| ChannelWhich picture channel is the height: Luminance, R, G, B or Alpha. | int | 0 |
| Live SourceRebuild the grid every frame for a camera or video source. Off, it rebuilds only when the picture or a setting changes. | bool | false |
How It Works
A child of the Particle System container: drop it inside one and any depth or height picture — a Depth Estimation output, the 3D Scene's own Depth pass, a plain grayscale image — gives every particle a Z.
Three modes, and they are genuinely different behaviours rather than settings of one:
| Mode | What the picture does |
|---|---|
| Surface | Each particle's z springs toward the depth surface, so a swarm settles onto the relief and follows it as the video moves |
| Flow | That same spring plus a force along the height gradient — downhill or uphill, set by Direction. Water on terrain. |
| Parallax | z is simply set from the depth and nothing else moves: a flat picture gaining depth for the camera |
The picture becomes a height grid on the GPU, built once per change rather than per frame, and each particle reads one bilinear sample from it. Depth, Strength and Damping are read fresh every frame and are not part of what triggers a rebuild, so dragging them is free.
Two things worth knowing up front: a depth map is relative, not metric — Near, Far and Gamma (plus whatever smoothing the estimator already did) are what make it stable; and a relief is invisible from straight ahead, so give the Camera an orbit or light it from the side.
Parameters in Depth
Image (image) — the depth or height picture. Anything with a usable gradient works; Channel chooses what is read: Luminance · R · G · B · Alpha.
Mode (int, default Surface) — Surface · Flow · Parallax, as above.
Depth (float, default 1.0) — the z extent in Grafit units that the mapped picture spans. Negative values push the relief the other way.
Near (float, default 0) and Far (float, default 1) — which picture values map to z = 0 and z = Depth, so you can use only the part of the range the picture actually occupies. Invert flips near and far, and Gamma (default 1) bends the mapping between them.
Strength (float, default 1) — how hard the spring pulls in Surface and Flow, and how strong the gradient force is in Flow. Damping (float, default 0.5) settles it: low values let the swarm bounce around the surface, high values plant it.
Direction (int, default Downhill) — Flow only: downhill or uphill along the height gradient.
Scale (float, default 1) — how large the picture is in the view; 1 fills it.
Resolution (int, default 256) — the long side of the height grid; the short side follows the viewport's aspect. Smooth (float, default 1) is a blur radius in grid cells, which settles a noisy map — the difference between a swarm that lies on a surface and one that chatters.
Live Source (bool, default false) — rebuild the grid every frame. Turn it on for a camera or a video; leave it off for a still, where one build is all the work there is.
The node has no outputs: it is configuration for the particle simulation it lives inside.
Typical Patches
- A swarm on a face: Camera Input → Depth Estimation → Particle Depth Field (Surface, Live Source on) inside a Particle System — the particles lie on the relief of whoever is in front of the camera.
- Water on terrain: a noise or heightmap image, Mode Flow, Direction downhill, Damping high — particles run down the valleys and pool in them.
- Depth from the scene itself: a 3D Scene's Depth pass into the field, so particles settle onto real geometry without any mesh work.
- Flat picture, real parallax: Mode Parallax with a Camera node orbiting slowly — a still image gains depth without anything appearing to move.
- Uphill: Direction uphill with a modest Strength for sparks that climb a silhouette instead of falling off it.
Companion node: Material Displacement does the same thing to a mesh's vertices rather than to particles.
Open Particle Depth Field in the interactive catalog →
Particle Depth Field 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.