Sample
Evaluate fields, sample curves, or query spatial relationships at positions.
What it does
Sample reads a value at a position. Wire in a field, a curve or shape, or a set of points, and Sample evaluates it at the positions given, walks along it, or asks a spatial question about it: how far, how many nearby, what the nearest one looks like. Mode switches between these behaviours, and the node relabels its own controls to match.
With nothing wired to Position, Field mode passes the source field straight through unchanged, so a bare Noise or Distance Field into Sample previews exactly like the source alone.
When to use it
Baking a field, noise, a distance field, an image, onto points or geometry as an attribute → Field
Scattering or aligning elements along a curve or shape outline → Curve
Copying an attribute from one point set onto another by proximity, or blending several nearby values → Nearest Attribute or KNN Blend
How far the nearest point is, or how crowded a location is → Nearest Distance or Density
The splats nearest to a point on screen, for click-to-select on a Gaussian splat cloud → Splat Pick
| Parameter | Type | Default | What it does |
|---|---|---|---|
source | Field or Curve or Collection or Color Field | — | Source: Field (SDF, noise, color), Curve/Shape (for curve sampling), Points/Geometry (for proximity queries), or Image (auto-coerced to ColorField). |
position | Collection or Vec3 or Vec3[] | — | Elements to evaluate at. Points, Geometry, or Shape collection. |
mode | String | "Field" | Field: evaluate continuous field. Curve: distribute elements along a curve. Splat Pick: nearest splats to a screen-space NDC point. Others: query discrete point sets. One of: Field, Curve, Nearest Attribute, Nearest Distance, Density, KNN Blend, Splat Pick. |
camera | Camera3D | — | Camera used to project splat positions into NDC for distance comparison |
screen_point | Vec2 | (0, 0) | NDC point to pick around. (0,0) = screen centre; (-1,-1) = bottom-left; (+1,+1) = top-right. |
aspect_ratio | Number | 1.778 | Viewport aspect ratio (width / height). Must match the NDC the query point is expressed in. 16:9 = 1.7778. |
attribute | String | "Cd" | Source attribute to read and transfer to query positions |
neighbors | Number | 1 | KNN Blend: count of nearest neighbors to blend. Splat Pick: count of splats nearest to the screen point. |
max_radius | Number | 100 | Maximum search distance. 0 = unlimited (except Density which requires > 0). |
density_mode | String | "Normalized" | Count: raw count in radius. Normalized: 0-1 range. One of: Count, Normalized. |
field_attribute | String | "sampled" | Attribute name to write sampled field values to |
source_channel | String | "" | For a multi-channel field source (a captured record): which named channel to evaluate. |
apply_mode | String | "Set" | Set: replace, Add: add to existing, Multiply: multiply existing. One of: Set, Add, Multiply. |
time | Number | 0 | Time value passed to field evaluation (for animated fields) |
channel | String | "All" | All: output full RGBA (ColorArray). Others: extract single channel as NumberArray — useful for sonification pipelines. One of: All, Red, Green, Blue, Alpha, Luminance. |
parameterization | String | "Arc Length" | Uniform: equal parameter spacing. Arc Length: equal distance spacing. By Attribute: read t-values from a named attribute. One of: Uniform, Arc Length, By Attribute. |
t_attribute | String | "t" | Attribute name containing t-values (0-1) for curve sampling. Used when parameterization is 'By Attribute'. |
align | Boolean | true | Output tangent rotation for aligning elements to the curve direction |
curve_offset | Number | 0 | Perpendicular offset from the curve |
curve_loop_mode | String | "clamp" | Behavior when curve parameter goes outside 0-1 range. One of: clamp, loop, ping_pong. |
opacity | Number | 1 | Layer opacity (0 = transparent, 1 = opaque). Editable, wirable, keyframable. |
Gotchas
Field mode has two shapes depending on whether Position is wired. Left empty, the source field comes back unchanged, which previews a field node through a Sample without committing to positions. Wired, the field is evaluated at those points and written onto them as the Field Attribute.
Distance and Nearest Index are filled in by the point-query modes only: Nearest Attribute, Nearest Distance, Density and KNN Blend. In Field, Curve and Splat Pick mode they are left empty; use the primary output.
Density needs a real search radius. A Max Radius of 0 is treated as unlimited for the nearest-neighbour modes, but Density requires a radius greater than zero to have an area to count within.
Splat Pick needs both Source and Camera wired to project splats into screen space. With Camera unconnected there is nothing to project against and no result is produced.
Worked example
Add a Sample node and wire a Noise field into Source.
Wire a Points node into Position, and set Mode to Field.
Set Field Attribute to
densityand leave Apply Mode on Set. Each point now carries adensityvalue read from the noise at its location.Switch Mode to Nearest Attribute, wire a second point set into Position, and set Attribute to
Cdto copy colour from the nearest source point onto the new set instead.
See also
Attribute Reader · Fetch · Lookup · Fields