Cellular Regions¶
generator.cellular_regions ยท Generators
Worley cells as flat, discrete regions (plates, zones) to shape or scatter.
Purpose¶
Flat, discrete cells, for plates or zones you can shape or scatter one region at a time. Reach for it as a control field that varies in patches rather than smoothly.
Inputs¶
values(optional)
Outputs¶
out
Parameters¶
| Parameter | Type | Range | Default | Unit | Description | Field-driven |
|---|---|---|---|---|---|---|
Cell Size (cell_size) |
float | [0, 100000] | 128 | m | How wide one cell is, in world units. Larger cells mean fewer of them across the map. | no |
Jitter (jitter) |
float | [0, 1] | 1 | no | ||
Seed (seed) |
int | [0, 2147483647] | 0 | The random seed; changing it regenerates a different variation of the same pattern. | no | |
Offset X (offset_x) |
float | [-100000, 100000] | 0 | m | Slides the sampling window along the X axis, in world units, to take a different patch of the pattern without changing its shape. | no |
Offset Y (offset_y) |
float | [-100000, 100000] | 0 | m | Slides the sampling window along the Y axis, in world units, to take a different patch of the pattern without changing its shape. | no |
Antialias (antialias) |
bool | true | no | |||
Placement (placement) |
enum | square, hex | square | no |
Layer contract¶
Reads and writes the height layer.
Behaviour¶
Left unwired, every cell takes a random value of its own. Neighbouring cells are unrelated, so the field is patchy at every scale, and a cell that lands high has no neighbours near it.
Wire a field into values and each cell reads a single value from it instead, taken at that cell's own position. The cell stays flat, but cells near each other now take nearby values.
Two things this is for:
Feed it a low-frequency noise and the variation between cells becomes gradual across the map, so no cell stands alone. This is what jointed rock looks like: groups of blocks at similar heights, not a bed of spikes.
Feed it a gradient and the cells step down across the terrain while each one stays flat. Blending a gradient in afterwards instead would tilt every cell top, and stepping the gradient would cut bands straight across the cells; sampling once per cell does neither.
Cell size is a real width in world units, so cells stay the size you asked for when the world extent changes and a larger world simply holds more of them. Jitter sets their regularity: 0 is a square grid, 1 fully organic.
Placement sets where the cells start from. square puts one point per square of a grid, so at jitter 0 the cells are squares. hex uses a triangular lattice, where every point is the same distance from its six nearest neighbours, so at jitter 0 the cells are regular hexagons.
Reach for hex when the pattern is cracking rather than tiling. Rock cools and mud dries by contracting, and contraction joints meet at 120 degrees, which makes hexagons. Columnar basalt is the clearest case. Raise jitter from there and you get irregular but still six-sided-on-average cells, which is what real jointing looks like.
Antialias softens the join between cells by one pixel, and is on by default. A cell boundary is a hard step, so without it the pixel grid can only approximate the boundary's angle by stair-stepping, and building at a higher resolution makes the steps smaller without removing them. Turn it off when you want the region map as a selection and a half-selected pixel would be wrong.