Scatter Nodes
Align to Direction
Aligns all spawn rotations so that the spawn’s +Y axis faces toward a world-space direction. The Direction input is a float3 world direction (not Euler degrees) and is normalised before use.
Inputs
- Spawns (Scatter)
- Direction (Vector3)
Outputs
- Spawns (Scatter)
Options
- direction: World-space float3 direction that the spawn’s +Y axis is aligned toward. Normalised before use. If zero, identity rotation is applied.
Tips
- Wire a scene handle’s position to the Direction port for spawns that face toward a scene object.
- For spawns that should face away from a point, negate the direction by subtracting refPoint - spawnPosition upstream.
- If Direction is zero, spawns receive identity rotation (Y-up).
- The spawn attribute is carried through unchanged on every spawn.
Altitude Filter
Removes spawns outside the [Min Altitude, Max Altitude] range, measured on the graph-local Y axis (from the tool’s origin, not world height).
Inputs
- Spawns (Scatter)
- Min Altitude (Float)
- Max Altitude (Float)
Outputs
- Spawns (Scatter)
Apply Noise to Points
Displaces scatter point positions with a coherent Perlin noise field: neighbouring points drift together rather than independently. Scale sets the field frequency, Strength the maximum XZ displacement.
Inputs
- Spawns (Scatter)
- Strength (Float)
- Scale (Float)
- Seed (Float)
Outputs
- Spawns (Scatter)
Clip To Polygon
Keeps spawns inside (or outside) a polygon boundary, with optional edge margin in Erosion or Clearance mode.
Inputs
- Spawns (Scatter)
- Polygon (Polygon)
Outputs
- Spawns (Scatter)
Options
- keepInside: On (default) removes spawns outside the polygon (use for filling an area). Off removes spawns inside the polygon (use to create exclusion zones).
- edgeMargin: Minimum distance in metres from the polygon edge that a spawn must be to survive. 0 = hard clip at the outline; positive values activate the margin mode.
- _marginMode: Clearance (default for new nodes) drops near-edge spawns on both sides of the boundary. Erosion (legacy) only reclassifies inside spawns that are within the margin distance.
Tips
- Wire a polygon from Rectangle, Circle, or any polygon node into Polygon. In Keep Inside mode (default), spawns outside the polygon are removed.
- Edge Margin with Clearance mode (default for new nodes) creates a buffer zone on both sides of the polygon edge: spawns within that distance of the boundary are removed regardless of which side they are on. Use this to keep spawns away from a path or wall.
- Edge Margin with Erosion mode (legacy) erodes the effective boundary inward: only inside spawns near the edge are reclassified. Use this to reproduce old graph behaviour.
- Switch Keep Inside off to invert the filter, useful for exclusion zones or areas where spawns should not appear.
- Compose as: Poisson Scatter → Clip To Polygon → Scatter Output to scatter within a polygon footprint.
Density Mask
Thins a spawn list using a spatially stable mask: Random hash or Coherent Noise (fBm) for smooth clearings and clumps.
Inputs
- Spawns (Scatter)
- Density (Float)
- Seed (Float)
Outputs
- Spawns (Scatter)
Options
- patternMode: Masking strategy. Random: each spawn is kept or removed by hashing its world XZ position: no spatial correlation, fast. CoherentNoise: fBm noise is sampled at the spawn position: produces smooth clearings and clumps. Noise Scale, Noise Threshold, Noise Octaves, and Invert are only active in CoherentNoise mode.
- noiseScale: Frequency of the fBm field in world units. Smaller values produce larger features (wider clearings). Active in CoherentNoise mode only.
- noiseThreshold: Spawns are kept where noise is below this value (0–1). Matches Density semantics: 0.5 keeps roughly half the spawns. Active in CoherentNoise mode only.
- noiseOctaves: Number of fBm layers stacked for fractal detail. More octaves add fine-grained edges to clearings at a small cost. Active in CoherentNoise mode only.
- noiseInvert: When on, keeps spawns where noise is above the threshold instead of below; flips clearings to clumps and vice versa. Active in CoherentNoise mode only.
Tips
- Random mode: the keep/discard decision is keyed on each spawn’s XZ position and Seed; the same point with the same seed always gives the same result across frames and chunks.
- Use different Seed values when stacking multiple Density Mask nodes to avoid correlated removal patterns between passes.
- Coherent Noise mode: fBm noise is sampled at each spawn’s world XZ position. Lower Noise Scale = larger features. Noise Threshold works like Density: 0.5 keeps roughly half the spawns.
- Invert flips the keep/discard decision in Coherent Noise mode, useful to carve a path through a forest rather than keeping the path.
Falloff Filter
Keeps spawn points where the distance falloff to a reference point is at or above a threshold. Mirrors the Altitude Filter and Slope Filter pattern for distance-based culling.
Inputs
- Spawns (Scatter)
- Reference (Vector3)
Outputs
- Spawns (Scatter)
Options
- minDistance: Distance at or below which falloff is 0.
- maxDistance: Distance at or above which falloff is 1.
- threshold: Spawns with falloff below this value are removed (or kept if Invert is enabled).
- invert: When enabled, keeps spawns below the threshold and removes those at or above it.
Tips
- Enable Invert to keep spawns inside the falloff radius and remove those outside.
- For chunk-streamed terrain use a world-space constant as the reference; passing chunk-local geometry produces seam discontinuities.
- The spawn attribute is carried through unchanged on every spawn that passes the filter.
Filter By Category
Keeps only spawns whose prefabHandle matches the target category. Wire after GridDungeonNode or CaveNode to separate floor (0) and wall (1) cells for different instancer inputs.
Inputs
- Spawns (Scatter)
- Category (Int)
Outputs
- Spawns (Scatter)
Geometry to Points
Converts every vertex of a mesh into a spawn point. Rotation is derived from the vertex normal. Use to place objects on mesh vertices.
Inputs
- Geometry (Geometry)
Outputs
- Spawns (Scatter)
Tips
- Emits one spawn per vertex in face order; a Box emits 24 spawns – 4 per face in order Front, Back, Right, Left, Bottom, Top – because each face carries independent normals and UVs.
Grid Scatter
Places spawn points on a uniform grid within an XZ region. Add jitter to break the regularity.
Inputs
- Center X (Float)
- Center Z (Float)
- Size X (Float)
- Size Z (Float)
- Spacing (Float)
- Jitter (Float)
- Seed (Float)
Outputs
- Spawns (Scatter)
Tips
- Jitter 0 = strict uniform grid (fences, floor tiles, pavements). Jitter 1 = maximum random offset up to one full cell width, good for slightly irregular ground cover.
- For fully natural-looking distributions with guaranteed minimum separation, use Poisson Scatter instead. Grid Scatter is faster but can show visible regularity at low jitter values.
Merge Points
Concatenates two spawn lists into one combined list.
Inputs
- A (Scatter)
- B (Scatter)
Outputs
- Spawns (Scatter)
Mesh Selector
Assigns a prefab variant index (0 … Mesh Count-1) to each spawn point by hashing its position.
Inputs
- Spawns (Scatter)
- Mesh Count (Int)
- Seed (Float)
Outputs
- Spawns (Scatter)
Options
- key: How randomness is keyed. Position: each spawn’s variant is determined by its world position — stable when upstream list changes (streaming rule). List order: keyed by list index — re-rolls when any earlier spawn is added or removed.
Phyllotaxis Scatter
Scatter points in a sunflower spiral (phyllotaxis) pattern.
Inputs
- Count (Float)
- Radius (Float)
- Height Offset (Float)
Outputs
- Spawns (Scatter)
Limitations
- Count is capped at 10,000. Requesting more when the spawn arena is nearly full will raise a SpawnOverflow error.
Tips
- The phyllotaxis pattern produces no clumping or straight rows: useful for natural-looking ground cover, seeds, and decorative surface layouts.
- Wire Radius from a noise field to vary the disc size per chunk.
- Use Height Offset to lift all spawns above the ground plane before ProjectToSurface snaps them to terrain.
Points on Line
Places evenly spaced points along a line.
Inputs
- Origin (Vector3)
- Direction (Vector3)
- Count (Float)
- Spacing (Float)
Outputs
- Spawns (Scatter)
Options
- includeEndpoints: On (default): first point is at Origin, last point is at Origin + Direction * (Count-1) * Spacing. Off: distribution shifts by Spacing * 0.5 so no point sits at an exact endpoint, centering the run between Origin and Origin + Direction * Count * Spacing.
Tips
- Wire Direction into a normalised vector for world-aligned rows. Any length is accepted; the kernel normalises it.
- Combine with Instancer or Scatter Output to place objects. Add Random Rotation after for variation.
- Use Include Endpoints off when tiling: two adjacent lines share no overlap at the boundary.
Poisson Scatter
Places spawn points with guaranteed minimum separation (Radius): natural-looking foliage and rock distributions.
Inputs
- Center X (Float)
- Center Z (Float)
- Size X (Float)
- Size Z (Float)
- Radius (Float)
- Seed (Float)
Outputs
- Spawns (Scatter)
Limitations
- Min-distance spacing is per-chunk only. Points near chunk borders may be closer than the min-distance to points in adjacent chunks.
Tips
- Approximate max point count ≈ (Size X × Size Z) / Radius². Very small Radius over a large area can hit the 1,000,000 spawn-point limit and abort the evaluation.
- Start with Radius equal to the desired minimum spacing between objects. Scale up if the preview shows too many points.
Polygon Corners to Points
Extracts each corner of a polygon as a spawn point. Rotation points along the corner bisector in XZ.
Inputs
- Polygon (Polygon)
- Contour Index (Int)
Outputs
- Spawns (Scatter)
Polygon Scatter
Generates random spawn points uniformly distributed inside a 2D polygon footprint.
Inputs
- Polygon (Polygon)
- Count (Int)
- Seed (Float)
Outputs
- Spawns (Scatter)
Tips
- Count is clamped to 1,000,000. Requesting more shows a warning badge on the node and returns exactly 1,000,000 points; no evaluation is aborted.
Project To Surface
Projects spawns onto a geometry surface: place before filters, not after.
Inputs
- Spawns (Scatter)
- Surface (Geometry)
- Direction (Vector3)
- Max Distance (Float)
- Offset (Float)
Outputs
- Spawns (Scatter)
Options
- alignToNormal: On replaces each hit spawn’s rotation with one that stands its up axis on the surface normal; trees follow the hillside. Off keeps the incoming rotation and only moves the spawn.
- onMiss: What happens to a spawn whose ray found no surface within Max Distance. Drop removes it (default). Keep leaves it untouched where it was. Keep At Max Distance moves it to the far end of the ray.
Tips
- This is a transform that can drop, not a filter. Place before AltitudeFilter and other filters; a filter placed upstream tests the pre-projection positions and rotations, which is almost never what you want.
- Direction defaults to straight down (0, -1, 0). Point it up to hang spawns from a ceiling, or sideways to press them against a wall.
- Max Distance is the ray length, not a distance filter. A spawn further from the surface than Max Distance counts as a miss and is handled by On Miss.
- Align To Normal replaces the spawn’s rotation with a surface-aligned one, so Slope Filter placed AFTER this node reads the projected surface; that is the standard drop-to-terrain-then-cull-steep-ground chain.
- Offset lifts along the hit normal, not along the ray; a small negative value embeds objects into the surface consistently on flat ground and on slopes.
- Cost is spawn count × surface triangle count; there is no acceleration structure. Project onto a coarse collision mesh rather than the fully detailed one.
Proximity Filter
Reduces density toward zero based on proximity strength. Wire a normalised distance field (0=near, 1=far) into Proximity and tune Clearance Strength. Output = saturate(Density * saturate(1 - Strength * Proximity)).
Inputs
- Density (Float)
- Proximity (Float)
Outputs
- Filtered (Float)
Random Rotation per Point
Applies a random Euler rotation to each spawn. Y-only mode is ideal for foliage and rocks; All Axes adds full 3D tumble for debris or volumetric particles.
Inputs
- Spawns (Scatter)
- Min Rot (Float)
- Max Rot (Float)
- Seed (Float)
Outputs
- Spawns (Scatter)
Options
- mode: Axes to randomise. YOnly: randomises rotation around the vertical axis only; natural for trees, rocks, and ground-plane props. AllAxes: randomises all three axes for fully tumbled debris, particles, or floating objects.
- key: How randomness is keyed. Position: each spawn’s rotation is determined by its world position — stable when upstream list changes (streaming rule). List order: keyed by list index — re-rolls when any earlier spawn is added or removed.
Random Scale per Point
Applies an independent uniform random scale to each spawn point. Multiplies the existing scale by a value in [Min, Max].
Inputs
- Spawns (Scatter)
- Min (Float)
- Max (Float)
- Seed (Float)
Outputs
- Spawns (Scatter)
Options
- key: How randomness is keyed. Position: each spawn’s scale is determined by its world position — stable when upstream list changes (streaming rule). List order: keyed by list index — re-rolls when any earlier spawn is added or removed.
Relax Points
Relaxes scatter points toward their Voronoi cell centroids (Lloyd relaxation), enforcing more even minimum spacing.
Inputs
- Points (Scatter)
- Bounds (Polygon)
- Iterations (Float)
Outputs
- Spawns (Scatter)
Tips
- Iterations 0 = pass-through: the raw Poisson/grid distribution is unchanged. This is a valid artistic choice for irregular, shattered-rock looks, not a defect.
- Wire a bounding Polygon into Bounds to constrain relaxed positions to the polygon’s footprint. Leave Bounds disconnected to use the auto-computed AABB of the input points.
- 2-3 iterations produces a noticeably more even distribution. Above 5 the improvement is marginal and the cost grows linearly.
- Compose as: Poisson Scatter -> Relax Points -> Voronoi Cell Polygon for city-block or stone-pavement layouts.
Row Offset Scatter
Emits spawn positions for one wall row with half-stone joint stagger. Use inside a loop to build stacked dry-stone walls.
Inputs
- Axis (Vector3)
- Stone Width (Float)
- Row Parity (Float)
Outputs
- Spawns (Scatter)
Scale Points by Falloff
Multiplies each spawn’s scale by a falloff derived from distance to a reference point. Spawns at or closer than Min Distance receive falloff 0 (scale 0); spawns at or farther than Max Distance receive falloff 1 (unchanged scale).
Inputs
- Spawns (Scatter)
- Reference (Vector3)
Outputs
- Spawns (Scatter)
Options
- minDistance: Distance at or below which falloff is 0 (spawn scale is multiplied by 0).
- maxDistance: Distance at or above which falloff is 1 (spawn scale is unchanged).
Tips
- Use inverted min/max (Min=far, Max=near) to scale up near the reference instead of fading out.
- For chunk-streamed terrain use a world-space constant as the reference; passing chunk-local geometry produces seam discontinuities.
- The spawn attribute is carried through unchanged on every spawn.
Scatter
Places points on an area, inside a shape, or across a mesh, without overlaps, at the density you choose.
Inputs
- Center (Vector3)
- Size (Vector3)
- Polygon (Polygon)
- Surface (Geometry)
- Density (Float)
- Count (Float)
- Min Distance (Float)
- Scale Min (Float)
- Scale Max (Float)
- Relax (Float)
- Noise (Float)
- Seed (Float)
Outputs
- Spawns (Scatter)
Options
- domain: Area (0) = XZ axis-aligned box. Polygon (1) = inside a polygon shape. Surface (2) = on a 3D mesh surface.
- spread: Random (0) = stochastic placement, Count mode available. Even (1) = cell-hash disc packing, always Density mode.
- amount: Density (0) = points per square metre. Count (1) = exact point count (Random spread only).
Tips
- Even spread uses a cell-hash lattice with disc-packing elimination: every pair of points is at least MinDistance apart. Guaranteed no overlap; deterministic across chunks.
- Random spread places points with no overlap guarantee but is faster for large counts. Set Count mode to request an exact number of points.
- Area domain needs only Center and Size. Polygon domain filters points to inside a polygon shape. Surface domain scatters points across a 3D mesh face by face.
- Relax (0-8 Lloyd iterations) redistributes points away from each other for more even coverage. Only runs when the scatter list has 500 or fewer points.
- Scale Min / Max randomises each point’s scale independently. Wire the same value to both for uniform scale.
Scatter Output
Terminal node for a scatter chain: routes SpawnDescriptors to the GPU-instanced renderer.
Inputs
- Spawns (Scatter)
Set Point Rotation
Sets all spawn rotations to a constant Euler angle (ZXY order, degrees). Overrides any rotation assigned by the upstream scatter node.
Inputs
- Spawns (Scatter)
- Euler (Vector3)
Outputs
- Spawns (Scatter)
Options
- eulerDegrees: Rotation as Euler angles in degrees (ZXY order, matching Unity’s standard rotation order). X=pitch, Y=yaw, Z=roll.
Tips
- Wire a Vector3 parameter or a scene handle to the Euler port to control orientation at edit time.
- Use Align to Direction when you want to orient spawns toward a world direction rather than a fixed angle.
- The spawn attribute is carried through unchanged on every spawn.
Set Point Scale
Sets all spawn scales to a constant uniform float. Overrides any scale assigned by the upstream scatter node.
Inputs
- Spawns (Scatter)
- Scale (Float)
Outputs
- Spawns (Scatter)
Options
- scale: Uniform scale factor applied to every spawn in the list. Clamped to 0 minimum.
Tips
- Wire a Float parameter to drive the scale from the graph’s exposed parameters.
- Negative scale values are clamped to 0.
- The spawn attribute is carried through unchanged on every spawn.
Slope Filter
Removes spawns on surfaces steeper than Max Slope or shallower than Min Slope (degrees).
Inputs
- Spawns (Scatter)
- Min Slope (Float)
- Max Slope (Float)
Outputs
- Spawns (Scatter)
Tips
- Slope is decoded from each spawn’s stored rotation, not sampled from world geometry. Grid, Poisson, and Volume scatter on a flat plane produce slope=0; the filter passes everything.
- Pipe through Surface Scatter first so spawns carry the mesh surface normal; then Slope Filter gives meaningful results.
- Slope is measured against the tool’s local up axis, not world up; if the tool instance is rotated in the scene, slope still reads relative to the graph’s own Y axis.
- Place Slope Filter before Random Rotation: this node reads the spawn’s stored rotation to determine slope, so applying Random Rotation upstream overwrites that data and makes Slope Filter useless.
Sort Points
Sorts a spawn list by ascending distance from a reference point. Use before a Density Mask or index-based filter to create proximity-weighted distributions.
Inputs
- Spawns (Scatter)
- Ref X (Float)
- Ref Y (Float)
- Ref Z (Float)
Outputs
- Spawns (Scatter)
Space Objects
Post-filters a spawn list to enforce a minimum separation distance between any two spawns.
Inputs
- Spawns (Scatter)
- Min Distance (Float)
- Seed (Float)
Outputs
- Spawns (Scatter)
Splat Filter
Filters spawns stochastically by sampling a splat texture at each spawn’s world XZ position; per-region density controls keep probability.
Inputs
- Spawns (Scatter)
- Texture (Texture)
Outputs
- Spawns (Scatter)
Options
- tileSize: Size in world units that the splat texture tiles across. Larger values = the texture covers more terrain per tile; smaller values = the texture repeats more frequently. Match this to the terrain tile size your splat map was painted for.
- offsetU: Horizontal UV offset applied before sampling (0–1 wraps). Use to align the splat map to world origin if the texture was painted offset from zero.
- offsetV: Vertical UV offset applied before sampling (0–1 wraps). Use to align the splat map to world origin if the texture was painted offset from zero.
- density0: Keep probability (0–1) for spawns in splat region R (red channel). 1.0 = keep all spawns in this region, 0.0 = remove all.
- density1: Keep probability (0–1) for spawns in splat region G (green channel).
- density2: Keep probability (0–1) for spawns in splat region B (blue channel).
- density3: Keep probability (0–1) for spawns in splat region A (alpha channel). Defaults to 0: no spawns in unmapped areas.
- authoredSeed: Base seed for the stochastic keep decision. Change this when stacking multiple Splat Filter nodes to prevent correlated removal between layers.
Tips
- Wire a Texture2D Parameter (RGBA splat map) → Texture and a spawn list → Spawns. Density 1 = keep all spawns in that region; 0 = remove all.
- The keep decision hashes world-XZ + Seed (NOT the chunk seed), so chunk seam boundaries stay perfectly consistent with no visible pop.
- Stack multiple Splat Filter nodes with different authored seeds and densities to layer independent grass, rock, and tree distributions from one splat map.
- Call AFTER any scatter node that assigns world positions: the splat sample uses spawn.position.xz, so spawns must already be placed in world space.
Spline Scatter
Scatters spawn points along a spline at uniform or jittered arc-length positions into the scatter/filter pipeline. Use downstream filter and instancing nodes.
Inputs
- Spline (Spline)
- Spacing (Float)
- Jitter (Float)
- Seed (Float)
Outputs
- Spawns (Scatter)
Options
- fitMode: Original (0): legacy floor(L/spacing) count, leftover gap at path end. Keep Spacing (1): exact spacing from start, leftover at end. Fit to Length (2): rounds count to the nearest whole number so spawns cover the full path length.
Surface Scatter
Randomly places spawn points on the surface of a mesh, aligned to surface normals.
Inputs
- Geometry (Geometry)
- Count (Int)
- Seed (Float)
Outputs
- Spawns (Scatter)
Tips
- Count is absolute (not density-normalised). For density-like control, use Poisson Scatter with Radius, or pair Surface Scatter with Density Mask to thin the result.
- Points are weighted by triangle area; larger triangles receive proportionally more spawns. Ensure the source mesh has even triangulation for uniform distribution.
Thin Points
Reduces a spawn list by a fraction: Random mode keeps each point by chance; Every Nth keeps exactly every N-th point.
Inputs
- Points (Scatter)
- Keep Fraction (Float)
- Seed (Float)
Outputs
- Spawns (Scatter)
Options
- mode: Random uses a per-spawn index hash for Bernoulli sampling: each point has an independent keep probability equal to Keep Fraction. Every Nth keeps exactly one spawn per N regardless of Seed.
- key: How randomness is keyed (Random mode only). Position: keep/drop decision is determined by each spawn’s world position — stable when upstream list changes (streaming rule). List order: keyed by list index — changes when any earlier spawn is added or removed.
Tips
- Random mode: each spawn is independently kept with probability = Keep Fraction. Different Seed values produce different thinnings of the same input.
- Every Nth mode: Keep Fraction 0.5 → keep every 2nd point; 0.25 → every 4th. The Seed parameter has no effect in this mode; result is fully deterministic.
- Keep Fraction = 1.0 keeps all points; 0.0 removes all points.
- Stack after Poisson Scatter to thin a dense scatter to a specific fraction without changing the minimum-separation guarantee.
Volume Scatter
Generates random spawn points uniformly distributed inside a 3D axis-aligned bounding box. Useful for volumetric effects such as foliage canopy or particle-like fills.
Inputs
- Center X (Float)
- Center Y (Float)
- Center Z (Float)
- Size X (Float)
- Size Y (Float)
- Size Z (Float)
- Count (Int)
- Seed (Float)
Outputs
- Spawns (Scatter)
Tips
- Count is clamped to 1,000,000. Requesting more shows a warning badge on the node and returns exactly 1,000,000 points; no evaluation is aborted.
Weighted Mesh Selector
Assigns a prefab variant index to each spawn by weight: set Mesh Count and per-variant weights; higher weight means more frequent selection.
Inputs
- Spawns (Scatter)
- Mesh Count (Int)
- Weight 0 (Float)
- Weight 1 (Float)
- Weight 2 (Float)
- Weight 3 (Float)
- Seed (Float)
Outputs
- Spawns (Scatter)
Options
- key: How randomness is keyed. Position: each spawn’s variant is determined by its world position — stable when upstream list changes (streaming rule). List order: keyed by list index — re-rolls when any earlier spawn is added or removed.