Grid

Grid

Function. Outputs a 3D point on a rectangular grid of nodes.

Valid input range is [0; 1]. The block provides stable (deterministic) output: the same input always produces the same node. To scatter particles across the grid, connect the input to a Random block with range [0; 1].

The grid is placed and resized visually in the Preview window when the block is selected.

How the input picks a node

The input is quantized to the nearest node — the grid never returns a point between nodes:

index = round(t × (columns × rows − 1))

Nodes are visited row by row, left to right, so t = 0 is the bottom-left node and t = 1 is the top-right one. With a 4×3 grid the first row takes the first four steps, the second row the next four, and so on.

Because every input lands exactly on a node, a Random input gives you particles snapped to grid positions rather than spread continuously — which is the point of the block. If you want continuous placement across a rectangle, use an expression on Position instead.

Properties & inputs:

  • Position (vec3): Centre of the grid in the world.
  • Width / Height: Full extent of the grid along its local X and Y axes — not half-extents.
  • Columns / Rows: Number of nodes along each axis. A count of 1 puts its single node at the low edge of that axis — the left edge for Columns, the bottom edge for Rows — so a one-column grid is a line down the left-hand side rather than through the middle.
  • Show visualizer: Keeps the grid outline visible in the Preview window even when the block is not selected.

Width, Height, Columns and Rows can each be pulled out into an input connector, so another part of the scheme can drive them. Connectors carry floats, so a driven count is rounded down to a whole number.

Outputs:

  • position (vec3): Position of the selected node.
  • normal (vec3): Direction the grid faces (its local Z axis).
  • (width) / (height) (float): Current extents, useful when they are driven from elsewhere.
  • (cell width) / (cell height) (float): Spacing between neighbouring nodes.
  • (size) (float): Area of the grid, width × height.

The grid lies in its local XOY plane — width along local X, height along local Y, normal along local Z — and is placed in the world by its position and orientation. This matches the Strip convention.

Placing the grid

Select the block and the Preview window turns into a grid editor: the grid is drawn as a wireframe with four corner handles and a centre handle.

What you drag Result
Centre handle Move, rotate or scale the whole grid, depending on the active gizmo
Corner handle Resize width and height from that corner

Dragging a corner keeps the centre in place, so the grid grows symmetrically, and pulling a corner past the centre does not flip the grid inside out. Scaling changes the stored Width and Height rather than adding a scale factor, so the numbers in the properties always match what you see.

A newly added grid is oriented to face the current view, so dropping one into a Front or Top view gives a grid you can work with immediately rather than one seen edge-on.

What is drawn

  • Not selected — just the outline, and only when Show visualizer is on.
  • Selected — outline, the inner grid lines, the four corner handles and the centre.

Very dense grids are not drawn node by node: above roughly four thousand cells the inner lines are skipped and only the outline and handles remain, so the preview stays responsive. The same applies when Columns or Rows is driven by a connector, since the number of nodes can then change every frame.

In the Emitter Guide

The grid is also available as a value type in the Emitter Guide — pick Grid from a 3D value's type menu, most usefully on Starting Position, to spawn particles on grid nodes without building the scheme by hand.

The row shows the grid's own values (columns, rows, width, height), each editable in place, and the distribution feeding the grid. The distribution defaults to a Random over [0; 1], which is what scatters particles across the nodes; replace it to pick nodes deliberately — say, from a custom value, so several values land on the same node.

Wherever you put it, a particle keeps the node it was given rather than hopping between nodes as it ages — but that happens in two different ways, depending on the value.

On Starting Position the whole value is worked out once as the particle is born, so the grid is read exactly once and there is nothing to freeze. On a value that is otherwise recalculated every frame — a Colour, say — a Grid row is frozen at birth for you, and the row's padlock is fixed on: re-picking a node every frame would make the particle jump around the grid, which is never what a grid is for.

A Movement offset is the exception: its value is added to the position every frame, so there the padlock is yours to switch on or off. Leave it off and the distribution is re-read each frame — which is where a curve becomes interesting, since an Over Particle Life distribution then walks the particle from node to node as it ages.

See Multi-values in the Emitter Guide for how that freezing works across values in general.

Related

  • Area2 — for placing particles anywhere across a painted region rather than on a fixed lattice.
  • Path2 — for placing particles along a line.